Why Sparkplug B and not plain MQTT
MQTT on its own defines neither a data structure nor a standardized way of handling connection state. Sparkplug B adds explicit data types, sequence numbering (to detect lost messages) and a death certificate, so you know instantly when an Edge device disconnects — critical in an industrial setting, where a silently stalled reading is worse than a visible error.
Step 1: MQTT broker
iGromi OS ships with its own Sparkplug-aware MQTT broker on port 8883 (TLS). You can also point it at an existing corporate broker if your organization already runs one.
Step 2: Namespace structure
Sparkplug enforces a fixed topic hierarchy: spBv1.0/{group}/{message}/{node}/{device}. Use the group to represent the plant or area, and the node for each Bridge — that keeps the namespace legible as devices multiply.
Step 3: Birth and death certificates
- On connecting, the device publishes
NBIRTHwith the full metadata of every tag (name, data type, numeric alias). - Subsequent
NDATAmessages send only the numeric alias and the value — not the full name — to save bandwidth over cellular or satellite links. - Configure the broker's Last Will and Testament (LWT) to point at the
NDEATHtopic, so an abrupt disconnection is published immediately instead of waiting for a long timeout.
Step 4: Verification in iGromi OS
Under Data Sources > MQTT/Sparkplug, the node should show as ONLINE as soon as the NBIRTH arrives. If it shows STALE, check that the device clock is synchronized (Sparkplug is sensitive to skewed timestamps).