tarek316
tarek316

Reputation: 21

How can I get the name (string) of a node from a data changed_notification in OPCUA?

I am new to opcua. I have a simple python3 client that I want to use to monitor a few voltages and currents from the opcua server.

I can subscribe to them and when they change, I can see the changed value but I don't know what the value is for.

I am trying to figure out how to use the info I know I can get like the node.nodeid.Identifier and use that to somehow get the path which is associated with the the id. That should tell me what the value is(?)

I thought it might be in the browse_name but that got me nowhere.

Any push in the right direction would be greatly appreciated. Thanks!

Upvotes: 0

Views: 1650

Answers (1)

Camille G.
Camille G.

Reputation: 3256

When your OPC UA Client want to get notified of the value update of a Node, it actually subscribe to the Attribute Value of this Node. You could try to subscribe to the Attribute BrowseName or DisplayName of the Node to get notified for the name. You should then send a CreateMonitoredItems and set the corresponding AttributeId for each iTemToMonitor.

However, not every OPC UA Server support this feature.

Most OPC UA Client use the Browse and Read Services just before sending a CreateSubscription/CreateMonitoredItems in order to get the BrowseName/DisplayName or other attributes values they want.

Upvotes: 1

Related Questions