Bridge OPC-UA data from industrial equipment to cloud via an MQTT gateway

domain: opcfoundation.org · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Deploy an OPC-UA to MQTT bridge tool (e.g., EMQX Neuron, Unified Automation UaGateway, or a custom stack using an open-source OPC-UA client library like open62541 or node-opcua) on an edge gateway with network access to the OPC-UA server
  2. Connect to the OPC-UA server endpoint (e.g., opc.tcp://<plc-ip>:4840) using the appropriate security mode and authentication (anonymous, username/password, or X.509 certificate); browse the server's address space to identify the NodeIds of the variables to monitor
  3. Configure monitored items or subscriptions on the OPC-UA server for the target NodeIds with a sampling interval matching the process update rate; the server pushes data changes to the gateway client via Publish responses
  4. Map each OPC-UA NodeId to an MQTT topic (e.g., site/<plant>/<machine>/<variable>) and serialize the value, timestamp, and status code into a JSON payload; publish to the MQTT broker on data change or at a maximum publication interval
  5. Implement a store-and-forward buffer on the gateway: queue messages in local storage (e.g., SQLite) when the MQTT broker is unreachable and flush the queue in order when connectivity is restored to prevent data loss during network outages
  6. Apply payload normalization: OPC-UA data types (Int16, Float, DateTime, StatusCode) must be explicitly cast to JSON-compatible types; include the OPC-UA quality/status code alongside the value so consumers can filter bad-quality readings

Known gotchas

Related routes

Bridge OPC UA node data to cloud MQTT using a gateway with Sparkplug B encoding
opcua-mqtt-gateway · 6 steps · unrated
Bridge OPC UA machine data from a shop-floor device to SAP S/4HANA production order confirmations via SAP Integration Suite with an MQTT adapter
help.sap.com · 6 steps · unrated
Implement Modbus TCP polling on a gateway and forward readings to AWS IoT Core via MQTT
modbus-iot-gateway · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans