Nodes
ua.nodes It is a Lazy Load node accessor that allows you to access remote nodes just as you would local objects; at the same time, the OpcUaSession previous set of methods browse directly uses strings NodeId.
Subpage Redirect
- For the node container entry point, see NodeCollection.
- For single-node wrapping, please refer to OpcUaNode.
- For single-level browsing, please see Browse.
- To continue reading, please see the next page. BrowseNext.
- For information on ContinuationPoint [...], please refer to BrowseWithPaging.
- For batch parsing of paths, please refer to TranslateBrowsePaths.
- For high-frequency access acceleration, please refer to RegisterNodes.
Three Ways to Access Nodes
# Method 1: Direct String NodeId Access (Simplest and Most Efficient RPC)
with ua.read("ns=2;s=Temperature") as dv:
print(dv.value)
# Method 2: Lazy Load Indexer (like local objects, exploratory)
node = ua.nodes["ns=2;s=Temperature"]
print(node.display_name)
with node.value as dv:
print(dv.value)
t = ua.nodes.server["ServerStatus"]["CurrentTime"]
with t.value as dv:
print(dv.value)
# Method 3: Path Resolution
node = ua.resolve("/Objects/Server/ServerStatus/CurrentTime")
with node.value as dv:
print(dv.value)
All three methods work the same way under the hood RPC; just choose the one that feels most natural to you. (Note: is resolveSegment by segment browse Yes, post as many times as there are sections in the path RPC — See translate_browse_paths (Comparison table.)
Selection Guide
| Scenario | Recommendations |
|---|---|
| Known to be accurate NodeId (Production Code) | Method 1: String |
| Standard ns=0 Node | Method 2 + WellKnownNodes |
| Browse Tree / One-Time Script | Method 2: Indexer |
| Batch Initialization of 100+ Paths | translate_browse_paths |
| Long-term operation with high-frequency access | register_nodes Accelerate |