BiancoRoyal / node-red-contrib-iiot-opcua

deprecated - very new developed by PLUS for Node-RED - https://plus4nodered.com
https://www.npmjs.com/package/node-red-contrib-iiot-opcua
BSD 3-Clause "New" or "Revised" License
34 stars 9 forks source link

Pass through from the "name" and "datatypeName" in the listener does not work #115

Closed Flumpje closed 4 years ago

Flumpje commented 5 years ago

I'm submitting a ... (check one with "x")

Feature

Support

Problem

Information

Current behaviour

Pass through from the "name" and "datatypeName" in the listener does not work is: "addressSpaceItems": [{ "name": "", "nodeId": "ns=2;s=Application.GVL_TTM.OpMode", "datatypeName": "" }]

Expected behaviour

Should be: "addressSpaceItems": [{ "name": "MachineStatus", "nodeId": "ns=2;s=Application.GVL_TTM.OpMode", "datatypeName": "Int16" }]

Minimal reproduction of the problem with instructions Inject nod -> Listener -> Debug

  1. Make data available in your opc server
  2. Add the nodes
  3. Test

Your Environment

Please tell us about your environment:

Flumpje commented 5 years ago

flows.zip

teeffelen commented 5 years ago

I think the issue may come from this line where the name and datatypeName are defined as empty, instead of using the values before the Listener node.

Edit: Line 411 and Line 477 may also be the problem.

biancode commented 4 years ago

@Teeffelen but there is no name and no datatype as you see ;) in this version of node-opcua it is only to fix on browsing for every monitor event to read that information from the key (nodeId) - maybe I missed some, then let me know ...

biancode commented 4 years ago

recipe to enhance:

biancode commented 4 years ago

That could better and easier be done with a browse once for the node-id if it is unknown and organizing them in a context dictionary inside Node-RED.