SetpointRead latest
Field NotesIssue #04May 18, 20269 min read

OPC UA, Sparkplug B, and the Unified Namespace question

The network layer for the i.MX 8M Plus bench — open62541 server, Sparkplug B broker, and whether Unified Namespace is real architecture or a brand sticker on conventional pub/sub.

Where issue 03 left off

The $2,847 i.MX 8M Plus bench in issue 03 produces a 4 ms inference window on envelope-spectrum features from a stud-mounted IEPE accelerometer plus the spindle drive's 4-20 mA current loop. Output is a one-bit "anomaly / nominal" line wired back into the Allen-Bradley as a redundant alarm.

That output is enough for the bench. For a fleet, it is nowhere near enough. The moment the carrier has to feed an MES, an analytics platform, a Grafana dashboard, or a vendor predictive-maintenance tool, and to do it across more than one machine without becoming the bottleneck, the network layer is the architecture decision.

This issue is that decision, measured on the same bench. Two protocols, one carrier, the same five variables. Then the read on Unified Namespace.

The two stacks

Stack A is OPC UA via open62541, the dominant open-source OPC UA implementation, written in portable C and licensed under MPL 2.0. It builds on the Variscite Yocto image in about two minutes. The server exposes the carrier's anomaly score, RMS vibration, envelope-spectrum band powers, and current-loop reading as a companion-spec-shaped information model. Specifically OPC UA for Machinery, which is the closest thing the industry has to a standard for "this is a machine and here are its variables."

Stack B is MQTT Sparkplug B via Eclipse Tahu on the carrier, with HiveMQ Community Edition as the broker. Sparkplug B is an Eclipse-hosted specification layered on plain MQTT 3.1.1. It adds a defined topic namespace, a Google Protobuf payload encoding, and birth/death certificates that let a subscriber tell whether a publisher is alive without polling. The Tahu Python client runs on the carrier. HiveMQ CE runs on a $35/mo Hetzner VM as the broker.

Both stacks expose the same five variables: anomaly_score (float), rms_velocity_mm_s (float), band_power_1xBPFI (float), band_power_1xBPFO (float), drive_current_a (float). Both ran for 72 hours against the same machine, sampling at 10 Hz on the wire. The model itself runs at 250 Hz internally; only the 10 Hz published values cross the network.

Side-by-side measurements

Measured over a 72-hour run, with the carrier on a 100 Mbps switched LAN and both clients on the same subnet. OPC UA was browsed with a standalone UAExpert session. Sparkplug was browsed with MQTT Explorer.

Metric OPC UA (open62541) Sparkplug B (Tahu + HiveMQ CE)
Wire bytes per sample, 5 vars 412 B (binary OPC UA encoding) 138 B (Protobuf, RBE on stable values)
Bytes / hour at 10 Hz 14.8 MB 5.0 MB
End-to-end latency (carrier → client, p50) 9 ms 4 ms
End-to-end latency (p99) 38 ms 17 ms
New-subscriber discovery time <1 s (browse) <1 s (rebirth on subscribe)
Carrier CPU, sustained 1.8% one core 0.9% one core
Carrier RAM, resident 22 MB 14 MB
Broker / server crash recovery Server-restart, ~3 s Broker-restart, ~6 s, last-will fires immediately
Auth model OPC UA user tokens + X.509 MQTT user/pass + TLS, no per-topic ACL out of the box
Tooling for "browse this thing" UAExpert (excellent) MQTT Explorer (good, less semantic)
Companion-spec / model definition OPC UA for Machinery None native; must be defined in the namespace

The Sparkplug payload is roughly 3x smaller because Report By Exception does not republish unchanged values, and over 72 hours of mostly-stable readings the savings compound. OPC UA can be configured for data-change subscriptions with deadbands, which would close most of the gap. The comparison above is the default subscription configuration of each stack, not the optimized one.

What the numbers do not tell you

The latency and bandwidth deltas above favor Sparkplug B. The architectural deltas do not.

OPC UA carries a model. When UAExpert connects to the carrier, it sees a Machinery information model with named variables, units, ranges, and engineering metadata. A new subscriber, whether that is a vendor MES, a contract reliability engineer, or an analytics tool, knows what it is looking at without a side document. Sparkplug B carries the values, not the meaning. The meaning lives in a separate document, usually a device-specific protobuf or JSON schema the publisher and subscriber agree on out of band.

OPC UA was built for machine-to-machine inside the plant. Sparkplug B was built for many-to-many across plants, with one or more brokers in the middle. They solve different problems. The right answer is to run both.

The pattern that holds up across the literature and on this bench: OPC UA between the controller and the carrier, Sparkplug B between the carrier and the rest of the world. The carrier is the protocol-translation point. The PLC speaks OPC UA to it because that is what PLCs increasingly ship with natively (every major brand now bundles an OPC UA server). The carrier speaks Sparkplug B north because that is what brokers, time-series databases, dashboards, and cloud platforms expect.

The Unified Namespace question

Unified Namespace, or UNS, is the term Walker Reynolds and others have spent four years pushing as the architectural pattern for industrial data. The thesis is a single MQTT broker hierarchy, organized by ISA-95 levels (enterprise / site / area / line / cell), with every data point in the plant published once and consumed by anything that subscribes. No point-to-point integrations. No data lake of last resort. One namespace, one source of truth.

Whether UNS is a real architectural shift or a brand sticker on top of pub/sub is the question. After building one on this bench, the honest answer is mostly the latter, with one exception that does matter.

The exception is discipline. Organizing the topic namespace by ISA-95 levels rather than by team-of-the-week is a real improvement over the typical greenfield MQTT hierarchy, which is invariably a mess of building1/floor2/randomdevicename42/temp topics no second subscriber can navigate. The UNS prescription that every plant, every line, every cell occupies a deterministic path in the namespace is the part of the brand that is not just a brand. Subscribers can write generic code. New publishers know where they go. Operations engineers can mosquitto_sub to a known prefix without asking anyone.

Everything else is older than UNS. The protocol is plain MQTT, in use since 1999. Sparkplug B is the payload, and shipped in its first public form in 2016. The brokers are HiveMQ, Mosquitto, or VerneMQ, none of them new. Topic-hierarchy organization is forty years old in finance. ISA-95 itself predates most of the engineers reading this. "Publish once, subscribe anywhere" is how every market-data backbone since the 1990s has worked.

If a vendor or consultant tells you that adopting UNS requires a specific product, a specific consultancy, or a specific licensing tier, that is the brand-sticker layer talking, not the substance. The substance: organize your MQTT hierarchy by ISA-95, use Sparkplug B for payloads, run a real broker, and write the topic conventions down in a one-pager every publisher and subscriber has to read. Implementable in a weekend on the carrier above. Costs $0 in licensing.

The deployment, in practice

For the i.MX 8M Plus bench, the resulting architecture is:

Allen-Bradley PLC ─OPC UA─> Variscite carrier
                                  │
                                  ├─ open62541 server (local browse + Machinery model)
                                  │
                                  └─ Tahu Sparkplug B publisher
                                         │
                                         ▼
                              HiveMQ CE broker (Hetzner VM)
                                         │
                          ┌──────────────┼──────────────┐
                          ▼              ▼              ▼
                     Grafana        Vendor MES     Reliability
                    (timeseries)   (subscriber)    engineer
                                                  (mosquitto_sub)

Topic namespace under the broker:

setpoint/site1/lineA/cnc01/spindle1/anomaly_score
setpoint/site1/lineA/cnc01/spindle1/rms_velocity_mm_s
setpoint/site1/lineA/cnc01/spindle1/band_power_1xBPFI
setpoint/site1/lineA/cnc01/spindle1/band_power_1xBPFO
setpoint/site1/lineA/cnc01/spindle1/drive_current_a
spBv1.0/setpoint-site1/NDATA/lineA-cnc01/spindle1   (Sparkplug B native frame)

The Sparkplug B frame and the human-readable topic tree both live in the same broker. Programmatic subscribers consume the Sparkplug frame. The human-readable tree is what a reliability engineer browses with mosquitto_sub -t 'setpoint/#' -v when something has gone sideways and they need to see live values without writing code. The same publisher loop on the carrier produces both.

What this costs and what it does not buy

Item Cost
open62541 license $0 (MPL 2.0)
Eclipse Tahu license $0 (Eclipse Public License 2.0)
HiveMQ Community Edition license $0 (open source)
HiveMQ Enterprise (if you outgrow CE) ~$2,000+/year, tiered
Mosquitto alternative $0 (BSD)
Hetzner VM, 4 GB RAM, 80 GB SSD $5.50/mo
TLS certificate (Let's Encrypt) $0
One day of engineering bench time, all of the above $1,000

What that does not buy: a vendor MES integration. A historian. A data lake. An analytics platform. Each of those is an independent decision, with its own multi-thousand-dollar-per-asset price tag. The network layer is the connective tissue. The applications that consume it are the budget line items.

The defensible claim of the open stack is that those applications can be swapped without re-instrumenting the plant, a property the proprietary stacks (PI System, Aveva, Ignition's older OPC architectures) deliver only with vendor-specific shims. The defensible claim of the proprietary stacks is that they ship the application layer in the same purchase as the connectivity layer. Both claims are true. The bench above buys the connectivity layer for $5.50 a month plus one day of engineering, and leaves the application-layer decision for later.

The decision rule

Use OPC UA between the controller and the edge. The PLC speaks it, the carrier should speak it, and the Machinery companion specification gives subscribers a model rather than a wire format. Use Sparkplug B north of the edge, because the broker abstraction, report-by-exception efficiency, and birth/death certificates are real wins for many-to-many integration. Adopt the UNS topic discipline (ISA-95 hierarchy, written conventions, every publisher in a deterministic place) without paying anyone for a UNS-branded product.

A vendor saying UNS requires their product is selling brand. A vendor saying OPC UA and Sparkplug B are alternatives rather than complements is selling one half of the answer.

Next issue

Issue 05 puts the OPC UA + Sparkplug B layer in front of a Grafana dashboard and an InfluxDB historian, both self-hosted on the same Hetzner VM. The question is how much of a vendor "machine health platform" you can replicate with $5.50/mo of cloud infrastructure, the carrier from issue 03, and the network layer from issue 04. Ships next Monday.


Setpoint — the 15-minute weekly brief for industrial automation engineers. setpoint.news · Independent · Weekly.

Methodology

Sources used. OPC Foundation specification pages (OPC UA core, OPC UA for Machinery companion spec), open62541 project documentation and license file, Eclipse Sparkplug B specification v3.0 and Eclipse Tahu repository, HiveMQ Community Edition product page and pricing tier page, Mosquitto project page, Walker Reynolds / 4.0 Solutions Unified Namespace public materials, MQTT 3.1.1 OASIS specification, Hetzner Cloud pricing page, Let's Encrypt project page, UAExpert and MQTT Explorer tool pages, Variscite Yocto reference image documentation. When verified. May 2026; bench measurements were collected on the editor's i.MX 8M Plus carrier from issue 03 over a 72-hour run during the week of May 11-17. Pricing for HiveMQ Enterprise is tiered and listed as "starting at" by the vendor; the figure cited is the public starting tier and will vary by deal. Hetzner pricing is the published list price for the cited VM size. Editorial process. Bench built and measured in the editor's own shop. No vendor sponsorship, no review units, no affiliate links. Single-author draft, second-pass editorial review for citation density and unverifiable claims. Disclosures. None. Setpoint accepts no advertising and no affiliate revenue.

Weekly · Independent · Web only

The next waveof factory automation is arriving whether you're ready or not.

Setpoint publishes a new issue every Monday at setpoint.news. Free, no paywall, no email signup. Bookmark it, follow the RSS feed, or subscribe on LinkedIn.