Skip to main content

reading multiple values as a structure

You can read multiple nodes by specifying an JSON of nodeId in the msg.nodeId or msg.topic attribute.

msg = {
"topic": {
"server": {
"status": "/Server/ServerStatus"
},
"device": {
"temperature": "ns=1;s=Temperature",
"pressure": "ns=1;s=Pressure"
}
},
"attributeId": "Value",
"outputType": "Value"
}

and the node will return the following message:

msg = {
"payload": {
"server": {
"status": {
...
},
"temperature": 25.5,
"pressure": 1.2
}
}
}
info

The JSON structure can be conveniently created the Explore OPC UA node.