relay | Documentation SmartMarket
Skip to main content


A single-channel relay is a device that, on command, turns on and off the power of the connected device: a lamp, sockets, etc. Usually it is connected to electrical wiring.

Device functions available

The device may have all the following functions or just some of them. For example, if a smart relay cannot measure a current power consumption, you do not need to include the current, power, and voltage functions into the model description.

A device shall comply with two mandatory functions: online and on_off. All relays must have this functions.

currentCurrent amperage, mA
on_off✔︎Switching the device on and off remotely
online✔︎Device availability: offline or online
powerCurrent power, W
voltageCurrent voltage, V

Sample description of the relay model

The model is described in accordance with the model structure. The sample describes a relay that can, on remote command, turn on and off the power of the connected device and also measure energy consumption.

"id": "QWERTY124",
"manufacturer": "Xiaqara",
"model": "SM1123456789",
"hw_version": "3.1",
"sw_version": "5.6",
"description": "Xiaqara smart relay",
"category": "relay",
"features": [

Sample description of a relay of a user

The model is described in accordance with the device structure. In the sample there is no description of the relay model, therefore we believe that the models are described in a separate file and it is sufficient to specify only the model ID (in this case, QWERTY124).

"id": "ABCD_004",
"name": "My relay",
"default_name": "Smart relay",
"nicknames": [
"Intelligent relay",
"Smart switcher",
"home": "My home",
"room": "Living room",
"groups": [
"Video equipment",
"model_id": "QWERTY124",
"hw_version": "3.1",
"sw_version": "5.6"