Contact Sensor

May 16, 2026 · View on GitHub


Device List Information

KeyValue TypeDescription
deviceIdStringdevice ID
deviceNameStringdevice name
deviceTypeStringdevice type. Contact Sensor
enableCloudServiceBooleandetermines if Cloud Service is enabled or not for the current device
hubDeviceIdStringdevice's parent Hub ID

Device Status

KeyValue TypeDescription
deviceIdStringdevice ID
deviceTypeStringdevice type. Contact Sensor
hubDeviceIdStringdevice's parent Hub ID
batteryIntegerFour-segment battery level division,<10%, shown as 10;10%~20%, shown as 20;20%~60%, shown as 60;≥60%, shown as 100
versionStringthe current firmware version, e.g. V4.2
moveDetectedBooleandetermines if motion is detected
openStateStringthe open state of the sensor. open, close, or timeOutNotClose
brightnessStringthe ambient brightness picked up by the sensor. bright or dim

Webhook Events

Key NameValue TypeDescription
eventTypeStringthe type of events
eventVersionStringthe current event version
contextObjectthe detail info of the event
deviceTypeStringthe type of the device
deviceMacStringthe MAC address of the device
detectionStateStringthe motion state of the device, "DETECTED" stands for motion is detected; "NOT_DETECTED" stands for motion has not been detected for some time
doorModeStringwhen the enter or exit mode gets triggered, "IN_DOOR" or "OUT_DOOR" is returned
brightnessStringthe level of brightness, can be "bright" or "dim"
openStateStringthe state of the contact sensor, can be "open" or "close" or "timeOutNotClose"
batteryIntegerthe current battery level, 0-100
timeOfSampleLongthe time stamp when the event is sent
{
    "eventType": "changeReport",
    "eventVersion": "1",
    "context": {
        "deviceType": "WoContact",
        "deviceMac": DEVICE_MAC_ADDR,
        "detectionState": "NOT_DETECTED",
        "doorMode":"OUT_DOOR",
        "brightness": "dim",
        "openState": "open",
        "battery":100,
        "timeOfSample": 123456789
    }
}