Skip to content

MQTT sensor-node adapter

Some signals come from a small “retrofit” sensor node that already speaks plain MQTT on its own — rather than a protocol the edge reader polls, like Modbus or OPC UA. For these, the edge reader subscribes to that device’s own topic (rather than polling it) and republishes each reading onto the Unified Namespace.

Modbus and OPC UA are both pull: the edge reader opens a session to the device and asks for values on a poll interval. A sensor node is push: it already publishes its own readings to the broker under its own topic prefix, and the edge reader’s job is narrower — grant that device’s broker account the specific publish rights it needs, and map its topic into a registered signal path.

The demo plant’s sensor-node emulators (for the press, conveyor and compressor) publish plain JSON under their own broker user, and deploy/demo/edge.yaml documents the read grant that lets the edge reader bridge that prefix into the Unified Namespace alongside the Modbus and OPC UA devices in the same config — see Quick start to see all three protocols land in the same historian in one run.

The edge reader keeps a local SQLite buffer so a brief broker outage does not drop samples — readings queue locally and are forwarded once the broker is reachable again, for all three adapter kinds alike.