Changes

18 bytes removed ,  12:27, 27 April 2022
no edit summary
Line 7: Line 7:     
==How MQTT works==
 
==How MQTT works==
In general an MQTT connection takes place between two Clients and a Broker. A TRB device and RUT/TCR router can be Broker, Client or both. The MQTT Publisher(Client) present in TRB devices and RUT/TCR routers subscribes to two topics by default: '''<TYPE>/get''' and '''get/<SERIAL>/command'''. Where '''<TYPE>''' is device type, for RUT/TCR routers and TRB2 devices type is '''router''' and for TRB1 devices type is '''device'''. Parameter  '''<SERIAL>''' is the router's serial number. When a third party client connects to the Broker, it sends the message '''id''' to the the topic '''<TYPE>/get'''. The publisher then sends a response containing its serial number to the topic '''<TYPE>/id'''. Now that the Client knows the router's or device's serial number it can ask for values of various parameters by sending requests to the topic '''<TYPE>/<SERIAL>/parameter_name'''. The MQTT Publisher can send responses containing values of these system parameters, if device supports that parameter:
+
In general an MQTT connection takes place between two Clients and a Broker. A TRB device and RUT/TCR router can be Broker, Client or both. The MQTT Publisher(Client) present in TRB devices and RUT/TCR routers subscribes to two topics by default: '''<TYPE>/get''' and '''get/<SERIAL>/command'''. Where '''<TYPE>''' is device type, for RUT/TCR routers type is '''router''' and for TRB devices type is '''device'''. Parameter  '''<SERIAL>''' is the router's serial number. When a third party client connects to the Broker, it sends the message '''id''' to the the topic '''<TYPE>/get'''. The publisher then sends a response containing its serial number to the topic '''<TYPE>/id'''. Now that the Client knows the router's or device's serial number it can ask for values of various parameters by sending requests to the topic '''<TYPE>/<SERIAL>/parameter_name'''. The MQTT Publisher can send responses containing values of these system parameters, if device supports that parameter:
    
{| class="wikitable"
 
{| class="wikitable"

Navigation menu