ym88659208ym87991671
Device model (model) | Documentation for developers

Device model (model)

Last updated on August 20, 2024

The structure describes characteristics and functions of the model of a device, such as a lamp or a socket.

The structure is used:

The structure is also used when the vendor or Sber Smart Home sends information about the user's device (the structure device) and the model ID model_id is not specified for this device.

FieldTypeMandatory?Description
idstring✔︎Model ID (often product_id)
manufacturerstring✔︎Manufacturer
modelstring✔︎Full model name
hw_versionstringEquipment version
sw_versionstringFirmware version
descriptionstringDescription
categorystring✔︎Device category (see Devices)
featureslist<string>✔︎List of functions (see Device functions)
dependenciesmap<string, object>Function dependencies (see Function dependencies (dependencies)
allowed_valuesmap<string, object>Allowed values of functions (see Allowed values of functions (allowed_values))
{
"id": string,
"manufacturer": string,
"model": string,
"hw_version": string,
"sw_version": string,
"description": string,
"category": string,
"features": [
string,
string,
// ...
],
"dependencies": {
"func_name": {
"key": string,
"value": [
{
"type": string,
"type_value": object
},
{
// ...
}
]
}
},
"allowed_values": {
"func_name": {
"type": string,
"type_values": {
"min": object,
"max": object,
"step": object
},
},
{
// ...
}
}
}

Device model description example

The example describes a lamp that can be switched on/off remotely, supports both the white light mode and the colour mode, can change its light intensity, colour and colour temperature. The lamp has a time-out timer.

Besides, a dependency between the light_colour and light_mode functions is described for the model: the strip light colour may only be changed if switched to the colour mode.

Allowed values for the light_brightness functions have also been changed: it is indicated that devices of this model can change the brightness from 10 to 900 at an interval of 1.

{
"id": "QWERTY123",
"manufacturer": "Xiaqara",
"model": "SM0123456789",
"hw_version": "3.2",
"sw_version": "5.7",
"description": "Xiaqara smart lamp",
"category": "light",
"features": [
"online",
"on_off",
"light_mode",
"light_brightness",
"light_colour",
"light_colour_temp",
"sleep_timer"
],
"dependencies": {
"light_colour": {
"key": "light_mode",
"value": [
{
"type": "ENUM",
"enum_value": "colour"
}
]
}
},
"allowed_values": {
"light_brightness": {
"type": "INTEGER",
"integer_values": {
"min": "10",
"max": "900",
"step": "1"
}
}
}
}
Sber process cookies only to personalize services according to Cookies Usage Policy. You can prevent the processing of cookies in your browser settings.