12 063
правки
(Новая страница: «=== The structure of the message device status === Here is an example message from the 1-Wire temperature sensor driver from the example above: <pre> /devices/wb-…») |
(Новая страница: «The name of the topic consists of nested "subtopics": *''/devices'' - root topic for all "devices" - as built-in functions of Wiren Board (digital, ADC, ...) and…») |
||
Строка 50: | Строка 50: | ||
The part before the space is the name of the topic, then the message itself. | The part before the space is the name of the topic, then the message itself. | ||
The name of the topic consists of nested "subtopics": | |||
* ''/devices'' - | *''/devices'' - root topic for all "devices" - as built-in functions of Wiren Board (digital, ADC, ...) and connected external (e.g. relay modules) | ||
* ''/wb-w1'' - | *''/wb-w1'' - subtopics, which is filled with 1-Wire driver | ||
* ''/controls'' - | *''/controls'' - podtopit all devices in it are recorded all of their parameters are changed ("on / off", the value of the sensor ...) | ||
* ''/28-0115a48fcfff'' - | *''/28-0115a48fcfff'' - directly the "channel" ("control)" - topic, where the value is recorded from the sensor. Its name is the same as the address of the 1-Wire sensor on the bus. | ||
Message content: | |||
* ''23.25'' - | |||
*''23.25'' - temperature value | |||
Если вы хотите самостоятельно написать драйвер устройства, и хотите, что оно отображалось на вкладке Devices и его можно было использовать в правилах, вам необходимо придерживаться такой же структуры топиков. | Если вы хотите самостоятельно написать драйвер устройства, и хотите, что оно отображалось на вкладке Devices и его можно было использовать в правилах, вам необходимо придерживаться такой же структуры топиков. |
правки