Multiple Inputs and Multiple Outputs


Good morning everyone,

I am using Node-Red with OPCUA to connect to a controller and display the values in their own gauge to the dashboard.

I was wondering if there may be a better way to do this.

My thinking is that it is not necessary to create an OPC UA Client node for each OPCUA Node that I want to read. I also wonder if this is creating a separate connection for each node that I want to read.
Can someone please advise if my thinking is correct and if there would be some way to use only one OPCUA Client node to retrieve all of the values and then use a function to disperse the values to their respective gauge?


Just to clarify, this is what the OPCUA Client node outputs with multiple inputs. It seems to output a separate value rather than an array of values.



Okay, if I understood you correctly, you just would like to use a single OPC UA Client node. Your second example shows that this seems possible, you receive the temperature readings one-by-one. So far so good, but now you need to put each one of them into the correct gauge in the dashboard

To do that, you can use the Switch node. Just configure a rule for each temperature sensor/reading and connect the corresponding output from the Switch to the respective gauge node.

To give further advice about the rules configuration, you have to provide a full msg content, only the payload is not enough to give you advice. I can imagine that filtering on PTank[X] somehow could be your solution


Thank you krambriw,

Here is the complete message.

Using the switch node, I would need to configure it so that the property it is checking is msg.browseName

The rules would then need to be setup so that if the browseName == "Tank2_Temp" then output to the first output, and then so on for the others. Correct?




Like in this example:



Thank you krambriw. That did the trick!


In case of future readers,

Each time you add an OPC UA Client node, another session is created on the OPC-UA server.