Read and subscribe to OPC UA server nodes from a Node-RED flow using node-red-contrib-opcua
domain: npmjs.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Install into the Node-RED user directory with npm install node-red-contrib-opcua
Drag an OpcUa-Client node onto the flow and configure its endpoint config node with the target server's opc.tcp:// URL, security policy, and credentials
For a one-off read, send a message with msg.action = "read" and msg.payload set to the NodeId string, e.g. "ns=3;s=Counter"
For a subscription, send msg.action = "subscribe" with msg.payload as the interval and msg.topic set to the NodeId plus datatype
To discover nodes, send msg.action = "browse" with a folder NodeId as msg.payload
Read results from the output message: msg.payload, msg.statusCode, msg.sourceTimestamp, msg.serverTimestamp
Known gotchas
The namespace index (ns=) in a NodeId must match the target server's actual registered namespace — do not assume ns=1
Array reads/writes require a datatype suffix such as FloatArray[5,5]
The package wraps the node-opcua library, so its connection/session quirks apply underneath the Node-RED node
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?