OPC-UA connections by script

Hi all
is there a way to:

  1. Take all the information from the current configured OPC-UA server connections (at least the end-points and the names
  2. Create the OPC-UA connections by script starting from the info gathered at point #1

I am able to do it easily with the devices but at now I can’t find any script to do the same with OPC-UA server connections
Thanks

1-The script function system.opc.getServers() will give you their names, and maybe you can retrieve its endpoint from the taglist
2-It is a lot harder to make the proper connection with a OPC-UA server/client then it is with the device due to the certificates exchange and trust. The designer don’t give an easy way to do so, probably because of the certificates jimbo jambo. They would be some workarounds, but nothing that I recommend for stability sake of your gateway.
Although, I’m curious at to why not have all those connection setup already on your gateway. I would prefer an unused OPC-UA connection then the scripting you are trying to achieve here. Worst case scenario, just toggle the enable propertie of the server.

Thanks for the reply
this kind of stuff with devices and OPC servers connections are useful when you have to move a project to another gateway but you don’t want to move the entire gateway backup. With the devices is quite easy as you can store all the info in a dataset and use it to script the creation of the new devices. For OPC Server connection is something you have to do one by one manually

The certificate should differ from one gateway to another for security reason. So this procedure you are trying to attempt wouldn’t work either way. I think spinning a sort of snapshot of the gateway with the possible transfering items could be a way to go.

agree, but if it’s possible to get rid of the certs by using a straight connection…it can be done . I am going to send out a mail to technical support of Inductive. There can be a workaround on this

You can remove the user credential for login, but the certs are required. They are the security set by the OPC-UA protocol.