7. MQTT PROTOCOL
LogBox Wi-Fi is compatible with the Message Queue Telemetry Transport (MQTT) protocol, a protocol designer for low data bandwidth
consumption and which uses the Publish/Subscribe paradigm for message exchange.
Acting as a Publisher/Subscriber MQTT, LogBox Wi-Fi requires a middleware named Broker, responsible for sending messages from Publishers
to Subscribers, to operate. LogBox Wi-Fi is, simultaneously, a Publisher, with 7 publication topics, to provide information about sensors and
several device statuses and a Subscriber, with 1 inscription topic, to receive possible parameters alterations and to remotely offer a certain control
level to the user.
7.1
PUBLICATION TOPICS
When connected to a Broker, the LogBox Wi-Fi can register up to seven topics, which will be presented below. Check the
section of this chapter for more information about the frames that molded the responses to each publication topic.
The message sent in each topic corresponds to a JSON frame, which encapsulates several parameters. In the frame, these parameters correspond
to strings. Values of each parameter, however, must be processed differently.
7.1.1 STATUS TOPICS
*
novus/<sn>
/status/channels: Topic for the publication of the last log of the analog channels and digital channel in "Pulse Count" mode.
•
Example: {"n_channels":4,"timestamp":43277.69538194,"battery":5.69, "value_channels":[0.000,24.200,0.000,24.200], "alarm_low":[0,1,0,0],
"alarm_high":[0,0,0,1],"buzzer_state":0}
*
novus/<sn>
/status/event: Topic for the publication of the last log of the digital channel in "Event Log" mode.
•
Example: {"timestamp":43277.82236111, "event_type":"down", "millisecond":630}
7.1.2 LOGS TOPICS
*
novus/<sn>
/log/channels: Topic for the publication of all logs of the analog channels and digital channel in "Pulse Count" mode. Used
•
mainly when there is loss of communication link with the Broker or lack of external power, as it will receive all historical logs.
Example: {"n_channels":4, "timestamp":43277.69538194, "battery":5.69, "value_channels":[0.000,24.200,0.000,24.200], "alarm_low":[0,1,0,0],
"alarm_high":[0,0,0,1], "buzzer_state":0}
*
novus/<sn>
/log/event: Topic for the publication of all logs of the analog channels and digital channel in "Event Log" mode. Used mainly
•
when there is loss of communication link with the Broker or lack of external power, as it will receive all historical logs.
Example: {"timestamp":43277.82236111,"event_type":"down","millisecond":630}
7.1.3 CONFIGURATION TOPIC
*
novus/<sn>
/config: Topic for the publication of the device configuration. It shall be published at the latest every five minutes.
•
Example: {"n_channels":4, "timestamp":43277.56898148, "frame_format":"array_static", "channels_enabled":[0,1,0,1],
"hash":"C071DA88ABA151A607AAB1527000E0017335FF08", "gmt":-180, "tag_channels":["","Analog1","","Analog3"],
"tag_units":["","Celsius","","Celsius"], "sp_alarm_low":[0.000,40.500,0.000,0.000], "sp_alarm_high":[0.000,0.000,0.000,20.000]}
7.1.4 RESPONSE TOPIC
*
novus/<sn>
/response: Topic for the publication of the commands response received by the device. Table 06 lists the permissible error
•
responses for this topic.
Example: {"config_receive":"ok","error_type":"none","parameter":"none"}
7.1.5 IDENTIFICATION TOPIC
novus/neighbor: Topic for the publication of the identify from the device(s) connected to the Broker. It shall be published at the latest every
•
five minutes.
Example: {"model":"LogBox Wi-Fi", "serial":12345678, "ip":"192.168.88.10", "mac":"B0:38:29:5D:FE:B1" ,"lqi":-40,"firmware_version":1.00}
* The <sn> is the device serial number. That way, there will be no clash of topics in the Broker.
NOVUS AUTOMATION
Frame Parameters
19/53
Need help?
Do you have a question about the LogBox Wi-Fi and is the answer not in the manual?