MQTTPublishConstTable (Edit the ConstTable via MQTT)

MQTTPublishConstTable can be used to edit ConstTable values by publishing a JSON object to MQTT.

Syntax

MQTTPublishConstTable( QoS )

Remarks

The table values will be published on the following topic:

{MQTT Base Topic}/editConst

To edit the ConstTable via MQTT, publish the new ConstTable values in a JSON object. The JSON keys and the values must be a string. The string values will be converted to the appropriate types by the datalogger. Only the values of the ConstTable to be changed are required in the JSON object. The JSON object must contain the “cmd” key and “editConst” value.

JSON format:

{
  “cmd”: “EditConst”,
  “key1”: “value1”,
  “key2”: “value2”
}

To change values in the ConstTable, publish the above JSON object to the following topic:

{MQTT Base Topic}/CC/editConst

NOTE: The maximum MQTT packet size is 4800 bytes.

QoS

Specifies the MQTT Quality of Service (QoS) level.

Number Description
0 At most once (fire-and-forget)
1 At least once
2 Not supported

Type: Constant Integer