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

Новая страница: «== The principle of operation of a message queue == File:MQTT.png | thumb | 600px | Drivers of internal functions, external devices, web interface, rules system…»
(Новая страница: «== 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 | Через очередь сообщений MQTT работают драйверы внутренних функций, внешних устройств, веб-интерфейс, система правил]]
[[File:MQTT.png | thumb | 600px | Drivers of internal functions, external devices, web interface, rules system work via the MQTT message queue]]
Система сообщений MQTT построена по следующему принципу:
The MQTT message system is based on the following principle:
*есть иерархическая система "топиков" (как на обычных форумах в интернете)
*there is a hierarchical system of "topics" (like on the Internet forums)
*в эти топики клиенты (в случае Wiren Board это драйверы устройств и веб-интерфейс) могут писать сообщения и читать оттуда
*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.
Полное описание системы топиков и подписок [http://mosquitto.org/man/mqtt-7.html http://mosquitto.org/man/mqtt-7.html].
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].


=== Отображение устройств в структуре сообщений ===
=== Отображение устройств в структуре сообщений ===
12 063

правки