Skip to main content

Configuration via MQTT

Device settings can be configured via MQTT by sending AT commands in JSON format. Each AT command is added as a key in the Config array, and the value is the string ending with the # character that represents the value to be set. The device will only receive configuration data while it is awake, through the topic it is registered to via AT+SUBTOPIC.

MQTT Config format:

"params": {
"Config": [
{ "AT+TDC":"1800#" },
{ "AT+5VT":"1000#" },
{ "AT+12VT":"1000#" },
{ "AT+MQOS":"2#" },
{ "AT+FAILNUMB":"5#" },
{ "AT+AINALARM":"1,180,4000,10000,0#" }
]
}

In this example, the data transmission interval is set to AT+TDC 1800 seconds, the 5V and 12V power durations are set to AT+5VT and AT+12VT 1000 ms, the MQTT QoS level is set to AT+MQOS 2, the connection error limit is set to AT+FAILNUMB 5, and the analog input alarm thresholds are defined by AT+AINALARM. When the message is sent to the device, all these settings are applied at once.