I'm using Node-RED to create an OPC-UA structure dynamically. Everything is working fine, but I noticed that the browseName is being appended to the NodeId when adding variables.
Here is how I'm adding a variable:
messages.push({
...msg,
payload: { opcuaCommand: "addVariable" },
topic: `${variableId};browseName=${browseName};datatype=${opcuaType}`
});
And here’s what I see in Prosys OPC-UA Browser:
NodeId: ns=1;s=FESP_100140.Electricity.Phase1.ActivePower;browseName=ActivePower
BrowseName: 1:ActivePower
DisplayName: ActivePower
Expected Behavior:
The NodeId should remain clean (ns=1;s=FESP_100140.Electricity.Phase1.ActivePower), while browseName should only affect the display name and browsing behavior.
Questions:
- Is this the expected behavior in Node-RED's OPC-UA implementation, or is this a bug?
- Should browseName be passed differently in Node-RED OPC-UA?
- How can I properly set the NodeId and browseName separately without concatenating them?
Any insights or fixes would be greatly appreciated!
Thanks in advance.