valve
Motorized valve.
Available device functions
The device can have all the functions listed below or some of them. E.g. if the device cannot be opened at the set percentage, there is no need in including the open_percentage
function in its model description.
The device has mandatory functions: online
, open_state
. In addition, the opening method must be described: open_set
, open_percentage
, or both.
When using open_set
and open_percentage
simultaneously, the following rule must be complied with:
- If
open_percentage
is not equal to zero, thenopen_set
must take theopen
value. And, vice versa, if the value ofopen_set
isopen
,open_percentage
must be more than zero. - If
open_percentage
is equal to zero, thenopen_set
must take theclose
value. And, vice versa, if the value ofopen_set
isclose
,open_percentage
must be equal to zero.
Function | Mandatory? | Description |
battery_low_power | Battery low or not | |
battery_percentage | Batter charge level | |
online | ✔︎ | Device availability: offline or online |
open_percentage | ✔︎* | Device opening, in percent. For the device, the opening method must be described: open_percentage , open_set , or both |
open_set | ✔︎* | Device opening. For the device, the opening method must be described: open_set , open_percentage , or both |
open_state | ✔︎ | Device opening status |
signal_strength | Signal strength |
Valve model description example
The model shall be described in accordance with the model structure. The example describes curtains equipped with all functions except for the ability to be opened at a set percentage.
In addition, the model's allowed values for the signal_strength
function have been changed: it supports only two levels of signal strength. The medium
level is not supported and has been deleted.
{
"id": "QWERTY124",
"manufacturer": "Xiaqara",
"model": "SM1123456789",
"hw_version": "3.1",
"sw_version": "5.6",
"description": "Xiaqara smart valve",
"category": "valve",
"features": [
"battery_low_power",
"battery_percentage",
"online",
"open_set",
"open_state",
"signal_strength",
],
"allowed_values": {
"signal_strength": {
"type": "ENUM",
"enum_values": {
"values": [
"low",
"high",
]
}
}
}
}
User's valve description example
The device shall be describe in accordance with the device structure. The example contains no valves model description as we believe that models are described independently and the model ID will be enough (in this case, QWERTY124).
{
"id": "ABCD_004",
"name": "My valve",
"default_name": "Smart valve",
"nicknames": ["Motorized valve", "Electric valve"],
"home": "My home",
"room": "Storeroom",
"groups": ["Water", "Protection"],
"model_id": "QWERTY124",
"hw_version": "3.1",
"sw_version": "5.6",
"partner_meta": {
"internal-id": 1234,
"specificity": "microchip 2A"
},
}