MQTT/en: различия между версиями

Новая страница: «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…»
(Новая страница: «=== 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'' - коренной топик для всех "устройств" - как встроенных функций Wiren Board (цифровые, АЦП, ...), так и подключённых внешних (например, модулей реле)
*''/devices'' - root topic for all "devices" - as built-in functions of Wiren Board (digital, ADC, ...) and connected external (e.g. relay modules)
* ''/wb-w1'' - подтопик, который наполняется драйвером 1-Wire
*''/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'' - непосредственно сам "канал" ("контрол)" - топик, куда записывается значение с датчика. Его название совпадает с адресом 1-Wire датчика на шине.
*''/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 и его можно было использовать в правилах, вам необходимо придерживаться такой же структуры топиков.
12 063

правки