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
| Field | What to enter | Example |
|---|---|---|
| IP Address | MQTT broker | 192.168.10.50 |
| Port | MQTT broker port | 1883 (plaintext) / 8883 (TLS, planned) |
| Group ID (group-id) | Sparkplug Group — per plant/site | FactoryA, Plant01 |
| Edge Node ID (edge-node-id) | A single node, or + (all nodes) | + (default), edge-01 |
| Keep Alive (keep-alive) | MQTT keep-alive, in seconds | 60 (default) |
| Connect Timeout (connect-timeout) | MQTT connection timeout, in ms | 5000 (default) |
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).
| Notation | Meaning |
|---|---|
edge1/Temperature | Node-level metric Temperature on edge node edge1 |
edge1/motor1/RPM | Metric RPM of device motor1 under edge node edge1 |
edge1/dev2/Status | Example: device status boolean |
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 datatype | Recommended data_type |
|---|---|
| Int8 / Int16 / Int32 / UInt8 / UInt16 / UInt32 | Integer |
| Int64 / UInt64 / DateTime | Long |
| Float | Float |
| Double | Double |
| Boolean | Boolean |
| String / Text / UUID | String |
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.
Reference Links
- 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/>