Skip to main content

Sparkplug B — IIoT Standard (MQTT-based)

Sparkplug B is the IIoT (Industrial IoT) messaging standard defined by Eclipse Tahu / Cirrus Link. It layers a standard topic structure plus Google Protobuf payloads on top of an MQTT broker so that equipment from different vendors can interoperate. PlantPulse Edge subscribes to the broker's Sparkplug topics, automatically caches the metrics, and exposes them immediately through tag read().


Registration Form Entries

FieldWhat to enterExample
IP AddressMQTT broker192.168.10.50
PortMQTT broker port1883 (plaintext) / 8883 (TLS, planned)
Group ID (group-id)Sparkplug Group — per plant/siteFactoryA, Plant01
Edge Node ID (edge-node-id)A single node, or + (all nodes)+ (default), edge-01
Keep Alive (keep-alive)MQTT keep-alive, in seconds60 (default)
Connect Timeout (connect-timeout)MQTT connection timeout, in ms5000 (default)
The Group / Edge Node ID must match the publisher (NBIRTH) on the broker side

Check which group / edge ID the publishing side (Eclipse Tahu, Ignition, Cirrus Link MQTT Engine, etc.) uses for its NBIRTH, then enter the same values. Setting it to edge-node-id=+ subscribes to every node in the group at once.


PLC Address Notation for Tags

Sparkplug metric identifiers use only the portion after the group (the group is specified separately as a driver option).

NotationMeaning
edge1/TemperatureNode-level metric Temperature on edge node edge1
edge1/motor1/RPMMetric RPM of device motor1 under edge node edge1
edge1/dev2/StatusExample: device status boolean
Name vs. alias

On NBIRTH/DBIRTH, the Sparkplug publisher sends both the metric name and an alias (a number). Subsequent NDATA/DDATA messages carry only the alias to reduce payload size. The PlantPulse driver maintains the alias↔name map automatically, so you only ever need to enter the name.


Automatic Data Type Detection

A Sparkplug B payload declares a datatype for each metric (Int8/16/32/64, UInt8/16/32/64, Float, Double, Boolean, String, DateTime, Bytes, and so on). The driver converts each value according to the datatype on the wire and caches it as a String, so match the tag's data_type as follows.

Sparkplug datatypeRecommended data_type
Int8 / Int16 / Int32 / UInt8 / UInt16 / UInt32Integer
Int64 / UInt64 / DateTimeLong
FloatFloat
DoubleDouble
BooleanBoolean
String / Text / UUIDString

Writing (NCMD / DCMD)

PlantPulse writes are dispatched to NCMD or DCMD automatically.

  • edge1/SetPoint (segment 2) → NCMD publish (node-level command)
  • edge1/dev1/SetPoint (segment 3+) → DCMD publish (device-level command)

In the current phase, all command values are published with the String datatype. Since the receiving side (Tahu / Ignition) knows each metric's datatype, conversion is normally handled automatically.


  • Eclipse Tahu — <https://eclipse.dev/tahu/>
  • Sparkplug Spec v3.0 — <https://sparkplug.eclipse.org/specification/>
  • Cirrus Link MQTT Engine — <https://www.cirrus-link.com/mqtt-engine/>