Motion sensor.

Device functions available

The device may have all the following functions or just some of them. For example, if a sensor cannot indicate the battery charge level, there is no need to include the battery_percentage function in its model description.

Some functions are mandatory for all motion sensors.

Function Mandatory? Description
battery_low_power Whether the batter is charged or not
battery_percentage Battery charge level
online ✔︎ Device availability: offline or online
pir ✔︎ Whether there is motion detected
sensor_sensitive The level of sensor sensitivity
signal_strength The strength of the signal

Sample description of a motion sensor model

The model is described in accordance with the model structure. A sensor described in the sample can report motion detected, signal strength, battery level and whether the battery is low in charge. It also has a sensitivity setting.

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

Sample description of a user’s motion sensor

The model is described in accordance with the device structure. In the sample there is no description of the sensor 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).

The parent_id specified for the sensor is the identifier of the hub through which the sensor is connected to the smart home.

    "id": "ABCD_004",
    "parent_id": "A_002",
    "name": "My motion sensor",
    "default_name": "Smart motion sensor",
    "nicknames": [
        "Infrared sensor",
        "Motion detector",
    "home": "My home",
    "room": "Living room",
    "model_id": "QWERTY124",
    "hw_version": "3.1",
    "sw_version": "5.6"