Read a single value
This tutorial will show you how to read a OPC UA Variable when you already know its NodeID or its browse path.
The Read Node is a simple node that allows you to read a single value from a OPC UA server and forward its value to the next node in the flow.
You can specify the nodeId of the variable to read, or its browse path in the configuration of the Read Node itself. Alternatively, you can specify the nodeId in the topic attribute of the Inject Node that triggers the read operation.

Name
You can specify a name for the node, this name will be used in the visual representation of the node in the Node-RED editor.
Endpoint
The Read Node needs to be connected to an OPCUA server endpoint.
Choose the endpoint you want to use in the Endpoint field of the Read Node.
see Create a connection to OPC UA server for more details.
NodeId
The nodeId field is optional, you can specify here the nodeId or the browsePath (originated from the /Objects folder) of the variable want to read.
The first stop of the prefix, just left of the field, decides where the value comes from at runtime — this node, this node, templated, or the message. A node you create today starts on this node, so what you type here is what gets read, whatever the incoming message contains.
To drive the NodeId from the message instead, set that stop to the message and enter a
message path (topic, payload.nodeId, …) rather than an address.
NodeId format:
OPC UA for Node-RED supports different ways to specify which node to read.
- nodeId in BNC format
- browsePath:
- verified browsePath.
For instance:
- direct nodeId
ns=1;s=Temperature
- browsePath
/2:MyDevice/1:MyTemperatureSensor/2:ParameterSet/3:Temperature`
- verified browsePath:
A verified browsePath is a browsePath that has been verified by the OPC UA for Node-RED node and checked against the OPCUA server address space and that has been converted to a nodeId.
The syntax is the following: [browsePath](nodeId);
for instance:
[/2:MyDevice/1:MyTemperatureSensor/2:ParameterSet/3:Temperature](ns=1;s=Temperature)`
You can verify your browsePath or your nodeId by clicking on the button representing a 'flask' on the right of the NodeId field.
Internal, the Read Node will convert the browsePath to a nodeId, so the nodeId is the preferred way to specify the node to read. This will happens only once, at the first read operation or when a reconnect occurs. So there is only a small performance penalty at the first read operation.

You can also client on the ... button to browse the OPCUA server and pick up the nodeId you are interested in.

Note that the browse button will only be effective if you have already configured the endpoint of the Read Node and have also deployed the flow.
To take the NodeId from the message, set the NodeId source to the message and name the path
— for example topic if an Inject node carries it there. Leaving the field empty is no longer
how you express that.
Under this node, an upstream Inject node triggers the read but cannot retarget it, even
if it sets topic or a timestamp payload. That was the classic trap this setting removes —
see Where does the NodeId come from?.
AttributeId
| AttributeId | Description |
|---|---|
| Value | The Value attribute is used to read the current value of a Variable. |
| DataType | The DataType attribute is used to read the NodeId of the DataType of the Variable. |
| BrowseName | The BrowseName attribute is used to read the BrowseName of the Node. |
| DisplayName | The DisplayName attribute is used to read the DisplayName of the Node. |
| All | All attributes are read. |
with the all attribute, the Read Node will return an object containing all the attributes of the node.