12 063
правки
(Новая страница: «== 1 Examples of work via the MQTT queue == ===Getting the value from the temperature sensor and displaying it in the web interface=== File:Web-devices-1-wire.p…») |
(Новая страница: «== The principle of operation of a message queue == File:MQTT.png | thumb | 600px | Drivers of internal functions, external devices, web interface, rules system…») |
||
Строка 20: | Строка 20: | ||
#The wb-mqtt-serial driver receives this notification over RS-485 and sends the message to the queue:<pre>/devices/wb-mrm2_130/controls/Relay 1 1</pre>It means that the first relay on the WB-MRM2 device with address ''130'' is in the logical 1 state (is "on"). | #The wb-mqtt-serial driver receives this notification over RS-485 and sends the message to the queue:<pre>/devices/wb-mrm2_130/controls/Relay 1 1</pre>It means that the first relay on the WB-MRM2 device with address ''130'' is in the logical 1 state (is "on"). | ||
== | == The principle of operation of a message queue == | ||
[[File:MQTT.png | thumb | 600px | | [[File:MQTT.png | thumb | 600px | Drivers of internal functions, external devices, web interface, rules system work via the MQTT message queue]] | ||
The MQTT message system is based on the following principle: | |||
* | *there is a hierarchical system of "topics" (like on the Internet forums) | ||
* | *clients (in the case of Wiren Board - device drivers and web interface) can write messages and read from these topics | ||
* | *to monitor the changes of the desired topic (for example, temperature on the sensor), the client can "subscribe" to it - then it will receive all messages in this topic. | ||
For a full description of topics and subscriptions, see http://mosquitto.org/man/mqtt-7.html.[http://mosquitto.org/man/mqtt-7.html http://mosquitto.org/man/mqtt-7.html]. | |||
=== Отображение устройств в структуре сообщений === | === Отображение устройств в структуре сообщений === |
правки