Skip to content

Commit

Permalink
Merge pull request #1308 from samson0v/master
Browse files Browse the repository at this point in the history
Fixed reading base64string nodes for OPC-UA connector
  • Loading branch information
imbeacon committed Feb 22, 2024
2 parents 26da67d + 9394a3c commit 1edcb40
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions thingsboard_gateway/connectors/opcua/opcua_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1edcb40

Please sign in to comment.