ym88659208ym87991671
Device sensor_door | Documentation for developers

sensor_door

Last updated on May 25, 2023

Opening sensor.

Available device functions

The device can have all the functions listed below or some of them. E.g. if the sensor cannot report the battery charge level, there is no need in including the battery_percentage function in its model description.

Some functions are mandatory, and all opening sensors must have them.

FunctionMandatory?Description
battery_low_powerBattery low or not
battery_percentageBatter charge level
doorcontact_state✔︎Indicates whether the sensor contacts are open or closed. If the contacts are open, it means that the sashes of a door, window or other similar structure are open. Closed contacts mean that the sashes are closed
online✔︎Device availability: offline or online
sensor_sensitiveSensor sensitivity
signal_strengthSignal strength
tamper_alarmTamper alarm

Opening sensor model description example

The model shall be described in accordance with the model structure. The example describes an opening sensor that can report whether the doors are open or closed and warn that is has been broken. The sensor also reports signal strength, battery charge level and whether the battery is low. Besides, its sensitivity level can be adjusted as appropriate.

In addition, the model's allowed values for the sensor_sensitive function have been changed: it supports only two sensitivity levels. The medium level is not supported and has been exlcuded.

{
"id": "QWERTY124",
"manufacturer": "Xiaqara",
"model": "SM1123456789",
"hw_version": "3.1",
"sw_version": "5.6",
"description": "Xiaqara smart opening sensor",
"category": "sensor_door",
"features": [
"online",
"doorcontact_state",
"battery_low_power",
"battery_percentage",
"sensor_sensitive",
"signal_strength",
"tamper_alarm"
],
"allowed_values": {
"sensor_sensitive": {
"type": "ENUM",
"enum_values": {
"values": [
"auto",
"high"
]
}
}
}
}

User's opening sensor description example

The device shall be describe in accordance with the device structure. The example contains no sensor model description as we believe that models are described independently and the model ID will be enough (in this case, QWERTY124).

For the sensor, parent_id is indicated – a hub ID through which the sensor is connected to the smart home.

{
"id": "ABCD_004",
"parent_id": "A_002",
"name": "My opening sensor",
"default_name": "Smart opening sensor",
"nicknames": ["Magnetic sensor", "Door sensor"],
"home": "My home",
"room": "Living room",
"model_id": "QWERTY124",
"hw_version": "3.1",
"sw_version": "5.6",
"partner_meta": {
"internal-id": 1234,
"specificity": "microchip 2A"
},
}
Sber process cookies only to personalize services according to Cookies Usage Policy. You can prevent the processing of cookies in your browser settings.