Relay Switch 1

May 16, 2026 ยท View on GitHub


Device List Information

KeyValue TypeDescription
deviceIdStringdevice ID
deviceNameStringdevice name
deviceTypeStringdevice type. Relay Switch 1
enableCloudServiceBooleandetermines if Cloud Service is enabled or not for the current device
hubDeviceIdStringdevice's parent Hub ID. 000000000000 when the device itself is a Hub or it is connected through Wi-Fi.

Device Status

KeyValue TypeDescription
deviceIdStringdevice ID
deviceTypeStringdevice type. Relay Switch 1
switchStatusIntegerthe current switch state. 0, off; 1, on
versionStringthe current BLE and Wi-Fi firmware version, e.g. V3.1-6.3
hubDeviceIdStringHub ID, equivalent to device ID

Control Commands

deviceTypecommandTypeCommandcommand parameterDescription
Relay Switch 1commandturnOndefaultset to ON state
Relay Switch 1commandturnOffdefaultset to OFF state
Relay Switch 1commandtoggledefaulttoggle state
Relay Switch 1commandsetMode0~3set the switch mode. 0, toggle mode; 1, edge switch mode; 2, detached switch mode; 3, momentary switch mode

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
onlineBooleandetermines if the device is connected to the internet or disconnected
switchStatusIntegerthe switch state of the device. 1, on; 0, off
overTemperatureBooleandetermines if the working temperature is over 100 degree celcius or not
timeOfSampleLongthe time stamp when the event is sent
{
    "eventType": "changeReport",
    "eventVersion": "1",
    "context": {
        "deviceType": "Relay Switch 1",
        "deviceMac": DEVICE_MAC_ADDR,
        "online": false,
        "overTemperature": true,
        "switchStatus": 1,
        "timeOfSample": 123456789
    }
}