Message Format: Token based formatting for the message payload sent when the sensor publishes to the MQTT Broker. Supported tokens are:
::Sensor_ID:: Variable Type: String This token, when entered in Message format, will be replaced with the MAC address of the sensor.
::Sensor_Data:: Variable Type: JSON Object This token, when entered in the message format, will be replaced with the telemetry data of the sensor readings.
::SSID:: Variable Type: String This token, when entered in the message format, will be replaced with the SSID of the WiFi network the sensor is configured to connect to.
::INFO:: Variable Type: JSON Object This token, when entered in the message format, will be replaced with all info about the sensor.
If the Message Format is left blank the message payload will contain the sensor data and info in a JSON object. Here is an example of a message published by the sensor with the Message Format field left blank:
{
“data”:{
“rms_current_ma”:0,
“transmission_count”:5
},
“info”:{
“ip”:”192.168.1.146″,
“ssid”:”STARLINK”,
“mac”:”F0:08:D1:45:6A:DC”,
“rssi”:-44,
“firmware”:”1.0.0″,
“interval”:5000,
“name”:”NCD-6ADC”,
“timestamp”:1647528359
}
}
Custom Message Format Example:
::SSID::/::Sensor_ID:::{::INFO::,::Sensor_Data::}
This would result in a payload with this format:
{
“STARLINK”:{
“F0:08:D1:45:6A:DC”:{
“INFO”:{
“ip”:”192.168.1.146″,
“ssid”:”STARLINK”,
“mac”:”F0:08:D1:45:6A:DC”,
“rssi”:-43,
“firmware”:”1.0.0″,
“interval”:5000,
“name”:”NCD-6ADC”,
“timestamp”:1647529700
},
“DATA”:{
“rms_current_ma”:0,
“transmission_count”:0
}
}
}
}
Topic Format Token Based formatting of the Publish topic used for sending telemetry to the MQTT Broker. Supported Tokens are:
::Sensor_ID:: Variable Type: String This token, when entered in Topic format, will be replaced with the MAC address of the sensor.
Example:
Token Format entry: /sensors/::Sensor_ID::
Result topic published to: /sensors/F0:08:D1:45:6A:DC