Step 3. Adding device models
For the devices that you want to manage via the Sber Smart Home cloud, you need to describe the models. You will use them when adding devices in the agent or on the controller.
For information about which fields describe the models, see the section Device model (model). Please note that when describing the model, you do not need to fill in all the fields, but the mandatory attributes of the device must be specified.
To add a model:
In Studio, open the integration project.
On the
tab, in the right upper corner, click on Create model (Создать модель).Enter model features and functions in the form fields:
Model ID. Model ID (often, product_id).
Manufacturer. Device manufacturer.
Model name. Model name as used by the manufacturer.
Hardware version. Hardware module version.
Firmware version. Hardware module firmware version.
Description. Free-format device description.
Device category. What category the device model relates to.
Functions list. Device model functions: what devices of this model can do. The available functions range depends on the device category; for more, see the Device functions section.
Function dependencies. This block describes cases when one function will only be available if another one is in a certain state. For example, colored lamps of certain models may work in two modes: colored light mode and white light mode. Depending on which mode the user has selected, the range of available functions should change, too: if the colored light mode is selected, the lamp colour change function should become available; if the white light mode is selected, the colour change function should be blocked.
In the Function list, select a dependent function – its availability will depend on another function. In the depends on (зависит от) list, select the defining function – the dependent function will depend on its state. In the last drop-down list, select defining function's values at which the dependent function becomes available.
For more on dependencies, see the Function dependencies section.
Click on Create model.
Model description example
The example describes a temperature and humidity sensor that can report temperature, and we also know its status: online or offline.
Model ID: my_temp_sensor
Manufacturer: Xiaqara
Model name: SM1123456789
Description: Temperature and humidity sensor
Device category: Датчик температуры и влажности
Functions list: online, temperature