MQTT Topic Examples

Sparkplug B Publishers

For the following example, eACM is collecting data from a device named “Device1”.

AUTOSOL MQTT’s SparkplugB publisher has a GroupID of “LocalGroup” and NodeID of “FirstNode” (set on the Sparkplug B tab).

What topics should appear in the broker?

When the publisher first starts, there will be a node birth:

spBv1.0/LocalGroup/NBIRTH/FirstNode

Followed by a birth message for the device(s). These will contain the initial values for all of the tags associated with each device:

spBv1.0/LocalGroup/DBIRTH/FirstNode/Device1

Finally, in the course of normal operation, there will be a series of data messages. These are published at the rate defined by the Publish Interval in the device object, if any tag’s value has changed within that interval:

spBv1.0/LocalGroup/DDATA/FirstNode/Device1

If communications are lost, or AUTOSOL MQTT is stopped, a node death message will arrive, signaling to all subscribers that the node is down:

As Sparkplug B is not a human readable format, a Sparkplug Decoder is needed to resolve the contents of these messages.

 

Standard Publishers

For the following example, eACM is collecting data from a device named “Device1”, with the tag “Tag1”.

AUTOSOL MQTT’s Standard publisher has a NodeID of “LocalNode” (set on the MQTT tab).

What topics will appear in the broker?

When AUTOSOL MQTT starts up, tag data will appear with the topic:

It has a timestamp reflecting time of publication and the payload is the value of the tag.

When AUTOSOL MQTT stops, or when communication with the end device is lost, a death message will indicate that the node is offline with the topic:

To write to a tag using the standard publisher, publish to the topic below with the value in clear text.

 

For assistance, please submit a ticket via our Support Portal, email autosol.support@autosoln.com or call 281.286.6017 to speak to a support team member.