ETHERLINE® GUARD | Issue 1e | 11.04.2022
25
8 Sending the cable status via MQTT
The built-in MQTT Publisher can be activated in the
"
Settings"
menu under "
Cloud protocol activation".
The MQTT Publisher regularly sends the "cable status"
as an MQTT message to an MQTT broker, which can
be located in the local network or in the cloud.
An MQTT message always consists of a name
("Topic") and the content ("Payload").
The name of the message can be freely chosen in the
input field "
Topic
", but should be in a meaningful
context. No spaces or special characters are allowed in
the topic name.
MQTT messages are always sent to a broker, which
then forwards the message to subscribers. The IP
address and the port of the broker can be specified in
"
Broker address
" and "
Broker port".
MQTT also enables TLS (SSL) encryption of the
transmission. For this, a certificate for the broker ("
Certificate
") and the certificate ("
Client certificate
")
and the public key ("
Client key
") for the client/MQTT publisher must be uploaded.
The structure of the payload sent in the MQTT message is fixed and uses the JSON format:
{
"CableStatus":
99,
"General":
1,
"LinkToControl":
1,
"LinkToApplication":
1,
"uptime":
"49680",
}
"CableStatus
" shows the cable quality from 0 to 100%; if no teach-in has been carried out, this value is
0.
"General
": Corresponds to "General device status" from the web interface (0 = Not OK / 1 = OK).
"
LinkToControl
": Link status of the upper DATA RJ45 (0 = no link / 1 = link present).
"
LinkToApplication
": Link status of the upper GUARD DATA RJ45 (0 = no link / 1 = link present).
"Uptime
": Measuring time in seconds for the cable measurement; if no teach-in has been carried out,
this value is 0.