Calling method with complex objects from Python OPC UA server

I also asked for B&R internal help from our OPC UA experts. Analyzing the communication in Wireshark led to following conclusion:

The B&R Client sends a BrowseRequest to the Python Server and specifically requests the type definition.

But the Python server does not return a proper type definition in the response. Therefore, the B&R client cannot find the required data type node and returns the error 0x80340000 Bad_NodeIdUnknown.

UaExpert seems to resolve the data types from the browse tree and can handle the method. But the B&R client does not do any additional browsing except for the requested objects and can therefore not handle the method.

There seem to be a couple of open issues on the Python OPC UA library around the types topic, but there seems to be no specific plan to fix this.
Browsing for HasTypeDefinition references is broken · Issue #1529 · FreeOpcUa/opcua-asyncio (github.com)
RuntimeError: Unknown datatype for field: StructureField · Issue #1567 · FreeOpcUa/opcua-asyncio (github.com)

For our current project we do not have time to analyze the issue further, or even fix it on Python side. We will probably switch over to sending JSON strings over OPC UA as a workaround, at least for the moment.

1 Like