From 9394a3c2b06704f33422bdae75ce14385a71e373 Mon Sep 17 00:00:00 2001 From: samson0v Date: Thu, 22 Feb 2024 14:39:37 +0200 Subject: [PATCH] Fixed reading base64string nodes for OPC-UA connector --- thingsboard_gateway/connectors/opcua/opcua_connector.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/thingsboard_gateway/connectors/opcua/opcua_connector.py b/thingsboard_gateway/connectors/opcua/opcua_connector.py index 655115ebc..3099d3e38 100644 --- a/thingsboard_gateway/connectors/opcua/opcua_connector.py +++ b/thingsboard_gateway/connectors/opcua/opcua_connector.py @@ -631,6 +631,9 @@ def __search_node(self, current_node, fullpath, search_method=False, result=None if node.nodeid.NodeIdType == ua.NodeIdType.Guid: node.nodeid = ua.NodeId(UUID(node.nodeid.Identifier), node.nodeid.NamespaceIndex, nodeidtype=ua.NodeIdType.Guid) + elif node.nodeid.NodeIdType == ua.NodeIdType.ByteString: + node.nodeid = ua.NodeId(node.nodeid.Identifier.encode('utf-8'), node.nodeid.NamespaceIndex, + nodeidtype=ua.NodeIdType.ByteString) # -------------------------------------------------------------------------------------------------- result.append(node)