Node-red-contrib-opcua "loadAddressSpace" command

Hi All,

Has anyone ever used the "loadAddressSpace" command of the "OpcUa - Server" node of the "node-red-contrib-opcua" library?
I'm trying to create an XML of variables to load into the OPC UA server when the flow starts.
This is so that when the flow starts I already have a correctly configured server without having to execute the "AddVariable" and "AddFolder" commands individually.

As a test I'm doing this:

  1. I modify the server with the "addVariable" and "AddFolder" commands

  2. Use the "saveAddressSpace" command to save the configuration I created

  3. I restart node red and use the "loadAddressSpace" command to reload the previously loaded configuration

When I do this the console gives me this error:

Can anyone tell me why and how I can solve it?

Node JS: 18.19.0
Node Red: 3.0.2
node-red-contrib-opcua: 0.2.320

New update:

I think the problem is in the file I try to upload.
I believe this because seeing the library code the .push() method is used
to "add" the configuration to the already existing one.
image

Therefore the XML does not have to contain the entire server configuration but only a part.

However, I can't find an example of a "configuration piece" in XML to load. :frowning:

Does anyone have more experience with OPC UA or the library itself?

I hope @mikakaraila or other experts could help me

Has anyone ever created an OPCUA server managed by Nodeded?

Do not use build default address space as it will generate double variables.

What should I use instead?

Look OPCUA-TEST-NODES.json under examples. There are commands to addFolder, addVariable.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.