Skip to main content

Different ways to access a node

The same variable on the same server can be written six different ways. All of them are accepted anywhere OPC UA for Node-RED asks for an address, and the notation stop of the field's prefix shows which one you are in — as the characters that notation starts with.

Take one variable, Temperature under the object Boiler, in the namespace urn:sterfive:boiler (index 2, aliased boiler):

TokenNotationThe same variableSurvives a server restart?
ns=NodeIdns=2;s=Boiler.TemperatureOnly if the namespace index is stable
nsu=NodeId with namespace Urnnsu=urn:sterfive:boiler;s=TemperatureYes — the URI is stable, the index is not
na=Aliased NodeIdna=boiler;s=TemperatureYes, via your alias table
/BrowsePath/2:Boiler/2:TemperatureYes, as long as the names do not change
/a:Aliased Browse Path/boiler:Boiler/boiler:TemperatureYes
abctextBoiler.TemperatureNot verified — an escape hatch

Which should I use?

Browse paths (/) are the recommendation, and what the browser writes when you pick a node from the tree. They read like the address space looks, they survive a namespace re-indexing, and they are what a person can check by eye.

NodeIds (ns=) are what the server itself uses and the fastest to resolve — but the leading ns=2 is a positional index into the server's namespace array, and that position can change between server versions. ns= is safe for the standard namespace (ns=0, e.g. i=2258 for CurrentTime) and for servers you control.

nsu= and the aliased forms exist for the case that bites people: two servers, or two versions of one server, that expose the same namespace at different indices. Naming the namespace by URI (nsu=) or by your own alias (na=, /a:) makes the flow portable. Aliases are defined once per connection in the namespace alias table.

text is not verified and not resolved as an address by the editor. Use it when the value is built somewhere else and you just need the field to hold a string.

Converting between them

Pick a different notation from the second stop of the prefix and the value is rewritten in that notation — the editor resolves it against the server and writes back the equivalent form. That is the quickest way to turn a NodeId you were given into a browse path you can read.

The verify button shows all the forms at once for the current value, so you can see the NodeId, the browse path and the aliased variants side by side.

See also