mikakaraila / node-red-contrib-opcua

A Node-RED node to communicate OPC UA. Uses node-opcua library.
Other
208 stars 191 forks source link

Support for displayName #682

Open Mradvanyi123 opened 2 months ago

Mradvanyi123 commented 2 months ago

Hello

Can the OpcUa-Server node be extended to allow the setting of display names? Similarly, as the description is set. I tested the following for adding variables.

let displayName = ""; ...

 const dn = msg.topic.indexOf("displayName=");
  if (dn > 0) {
    displayName = msg.topic.substring(dn + 12);
    console.log(displayName);
    if (displayName.indexOf(";") >= 0) {
      displayName = displayName.substring(0, displayName.indexOf(";"));
    }
  }

... displayName: displayName || browseName,

mikakaraila commented 2 months ago

I added needed code, will come out in next version...

mikakaraila commented 2 months ago

PLease test, new version available.