MQTTPublishMeta (Notify Data Logger Which Topic to Publish On)

MQTTPublishMeta uses the Table parameter to notify the data logger which topic to publish on.

Syntax

MQTTPublishMeta ( Table, Field, Key, Value )

Remarks

The table, if present, notifies the data logger which topic to publish on. If the table parameter is left empty (""), the notification will be published on the "general" metadata topic, which applies to the entire system. This is the same topic used for "static" system information, except "/prog" will be added to the topic so the cloud knows the incoming data was sent by program control and can be parsed differently than the "general" data. The field parameter, if specified, indicates that the published information applies to only the specified field. Otherwise, the field name will be absent from the published topic, and the notification will apply to the entire table.

Parameters

Table

The table, if present, notifies the data logger which topic to publish on. If the table parameter is left empty (""), the notification will be published on the "general" metadata topic, which applies to the entire system.

Field

The field parameter, if specified, indicates that the published information applies to only the specified field. Otherwise, the fieldname will be absent from the published topic and the notification will apply to the table.

Key

The name or identifier used to access the corresponding values within a JSON (JavaScript Object Notation) object. A JSON object is a collection of key-value pairs enclosed in curly braces {}. For example:

{
  “key1”: “value1”,
  “key2”: “value2”

}

Value

The value associated with a corresponding JSON key within a JSON object. For example:

{
  “key1”: “value1”,
  “key2”: “value2”

}