Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connectors/opcua/high load #1501

Merged
merged 37 commits into from
Aug 21, 2024
Merged

Connectors/opcua/high load #1501

merged 37 commits into from
Aug 21, 2024

Conversation

samson0v
Copy link
Contributor

@samson0v samson0v commented Aug 14, 2024

This PR contains optimization for data reading from the OPC-UA server.

  • connector scans nodes only once after starting
  • all nodes reading at once using the read_values method
  • fixed session closing
  • reduced latency on the busy spin by reducing await sleep(.05)

Copy link
Contributor

@smatvienko-tb smatvienko-tb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. the PR contains all improvements discussed.

@ashdam
Copy link
Contributor

ashdam commented Aug 14, 2024

The following error is through
image

It's related to this kind of messages it worked in the current master branch

BuildInfo(ProductUri='http://xxxxxxxx.com/xxxxxxx/v3.1.6.0', ManufacturerName='xxxxxx', ProductName='xxxxxxx', SoftwareVersion='3.1.6.0', BuildNumber='3.1.6', BuildDate=datetime.datetime(2024, 7, 8, 9, 1, 2, 607366, tzinfo=datetime.timezone.utc))

Here is the config

{
  "server": {
    "name": "MB107_UDC1",
    "url": "opc.tcp://xxxxxxxxx:59300/xxxxx/UnifiedDataCollector",
    "timeoutInMillis": 5000,
    "scanPeriodInMillis": 5000,
    "disableSubscriptions": true,
    "subCheckPeriodInMillis": 100,
    "showMap": false,
    "security": "Basic128Rsa15",
    "identity": {
      "type": "anonymous"
    },
    "mapping": [
      {
        "deviceNodePattern": "Root\\.Objects\\.Server",
        "deviceNamePattern": "MB107_UDC1_A0000K9J76",
        "attributes": [
          {
            "key": "server_uai",
            "path": "${ns=2;b=sbnFUIh4jWVrbbrxt463og==}"
          },
          {
            "key": "device_uai",
            "path": "${ns=2;b=sbnFUIh4jWVrbbrxt463og==}"
          },
          {
            "key": "site_code",
            "path": "${ns=2;b=zCGYLEQhEXoiQHQBVhcIoA==}"
          },
          {
            "key": "line",
            "path": "${ns=2;b=WrO0W3muBdo+gdCYlWooSQ==}"
          }
        ],
        "timeseries": [
          {
            "key": "/Server/ServerStatus/BuildInfo",
            "path": "${ns=0;i=2260}"
          },
          {
            "key": "/Server/UaiInfo/UaiCode",
            "path": "${ns=2;b=sbnFUIh4jWVrbbrxt463og==}"
          }
        ]
      }
    ]
  },
  "logLevel": "INFO",
  "name": "MB107_UDC1",
  "enableRemoteLogging": false,
  "id": "xxxxxxx"
}

@ashdam
Copy link
Contributor

ashdam commented Aug 14, 2024

We found another types:

2024-08-14 15:04:55 - |ERROR| - [tb_gateway_service.py] - tb_gateway_service - __send_to_storage - 1103 - Object of type datetime is not JSON serializable
2024-08-14 15:04:55 - |ERROR| - [tb_gateway_service.py] - tb_gateway_service - __send_to_storage - 1103 - Object of type EUInformation is not JSON serializable
2024-08-14 15:04:55 - |ERROR| - [tb_gateway_service.py] - tb_gateway_service - __send_to_storage - 1103 - Object of type Range is not JSON serializable

Range corresponds with this sample value: [Range(Low=0.0, High=0.0)]
EUInformation we couldnt find a node with this name

@ashdam
Copy link
Contributor

ashdam commented Aug 14, 2024

Started the GW with both connectors disabled. This was the output

Cannot load GRPC connector!
2024-08-14 15:42:13 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 168 - Gateway starting...
2024-08-14 15:42:13 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 172 - ThingsBoard IoT gateway version: 3.5.1
2024-08-14 15:42:13 - |INFO| - [tb_loader.py] - tb_loader - import_module - 68 - Import OpcUaConnector from /home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua.
2024-08-14 15:42:13 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 81 - Connector configuration has been updated to the new format.
2024-08-14 15:42:13 - |INFO| - [opcua_connector.py] - opcua_connector - open - 110 - Starting OPC-UA Connector (Async IO)
2024-08-14 15:42:13 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 81 - Connector configuration has been updated to the new format.
2024-08-14 15:42:13 - |INFO| - [opcua_connector.py] - opcua_connector - open - 110 - Starting OPC-UA Connector (Async IO)
2024-08-14 15:42:13 - |WARNING| - [tb_updater.py] - tb_updater - check_for_new_version - 92 - Cannot connect to the update service. PLease check your internet connection.
2024-08-14 15:42:14 - |INFO| - [tb_loader.py] - tb_loader - import_module - 68 - Import OpcUaUplinkConverter from /home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua.
2024-08-14 15:42:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000K9K77
2024-08-14 15:42:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC1_A0000K9J76
2024-08-14 15:42:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBL98
2024-08-14 15:42:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB38Q
2024-08-14 15:42:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB58S
2024-08-14 15:42:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB48R
2024-08-14 15:42:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA97W
2024-08-14 15:42:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBH94
2024-08-14 15:42:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAD80
2024-08-14 15:42:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA77U
2024-08-14 15:42:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAB7Y
2024-08-14 15:42:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB88V
2024-08-14 15:42:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBK97
2024-08-14 15:42:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAC7Z
2024-08-14 15:42:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBG93
2024-08-14 15:42:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA87V
2024-08-14 15:42:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000K9L78
2024-08-14 15:42:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA67T
2024-08-14 15:42:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAA7X
2024-08-14 15:42:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBJ96
2024-08-14 15:42:16 - |INFO| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 70 - Non primitive data type: <class 'datetime.datetime'>
2024-08-14 15:42:16 - |ERROR| - [tb_logger.py] - tb_logger - exception - 133 - Error in main loop: 'datetime.datetime' object has no attribute 'Value'
Traceback (most recent call last):
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 229, in start_client
    await self.__poll_nodes()
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 505, in __poll_nodes
    device.converter.convert(device.nodes, device_values)
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_uplink_converter.py", line 71, in convert
    data = val.Value.Value
           ^^^^^^^^^
AttributeError: 'datetime.datetime' object has no attribute 'Value'
2024-08-14 15:42:18 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 745 - Waiting for connection to be established before sending data to ThingsBoard!
2024-08-14 15:42:18 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 745 - Waiting for connection to be established before sending data to ThingsBoard!
2024-08-14 15:42:18 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 745 - Waiting for connection to be established before sending data to ThingsBoard!
2024-08-14 15:42:24 - |INFO| - [tb_device_mqtt.py] - tb_device_mqtt - _on_connect - 352 - MQTT client <paho.mqtt.client.Client object at 0x7d80fe8ce660> - Connected!
2024-08-14 15:42:24 - |INFO| - [tb_gateway_mqtt.py] - tb_gateway_mqtt - gw_subscribe_to_attribute - 236 - Subscribed to *|* with id 1 for device *
2024-08-14 15:42:24 - |ERROR| - [tb_gateway_service.py] - tb_gateway_service - __send_to_storage - 1103 - 'TBGatewayService' object has no attribute '_TBGatewayService__check_devices_idle'
2024-08-14 15:42:24 - |ERROR| - [tb_gateway_service.py] - tb_gateway_service - __send_to_storage - 1103 - 'TBGatewayService' object has no attribute '_TBGatewayService__check_devices_idle'
2024-08-14 15:42:24 - |ERROR| - [tb_gateway_service.py] - tb_gateway_service - __send_to_storage - 1103 - 'TBGatewayService' object has no attribute '_TBGatewayService__check_devices_idle'
2024-08-14 15:42:24 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 235 - Gateway started.
2024-08-14 15:42:24 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - __init__ - 68 - Remote Configurator started
2024-08-14 15:42:24 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 247 - Initials connections with connectors was failed, trying again...
2024-08-14 15:42:25 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-14 15:42:25 - |INFO| - [opcua_connector.py] - opcua_connector - close - 118 - Stopping OPC-UA Connector
2024-08-14 15:42:25 - |INFO| - [opcua_connector.py] - opcua_connector - __disconnect - 141 - MB107_UDC1 has been disconnected from OPC-UA Server.
2024-08-14 15:42:26 - |INFO| - [opcua_connector.py] - opcua_connector - close - 131 - MB107_UDC1 has been stopped.
2024-08-14 15:42:26 - |INFO| - [opcua_connector.py] - opcua_connector - close - 118 - Stopping OPC-UA Connector
2024-08-14 15:42:26 - |INFO| - [opcua_connector.py] - opcua_connector - close - 131 - MB107_UDC2 has been stopped.
2024-08-14 15:42:26 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.

Enabled both connectors and here is the output:

2024-08-14 15:42:26 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-14 15:45:39 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-14 15:45:39 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-14 15:45:39 - |INFO| - [opcua_connector.py] - opcua_connector - open - 110 - Starting OPC-UA Connector (Async IO)
2024-08-14 15:45:40 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-14 15:45:40 - |INFO| - [opcua_connector.py] - opcua_connector - close - 118 - Stopping OPC-UA Connector
2024-08-14 15:45:40 - |INFO| - [opcua_connector.py] - opcua_connector - __disconnect - 141 - MB107_UDC1 has been disconnected from OPC-UA Server.
2024-08-14 15:45:41 - |INFO| - [opcua_connector.py] - opcua_connector - close - 131 - MB107_UDC1 has been stopped.
2024-08-14 15:45:41 - |INFO| - [opcua_connector.py] - opcua_connector - open - 110 - Starting OPC-UA Connector (Async IO)
2024-08-14 15:45:41 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-14 15:45:41 - |ERROR| - [opcua_connector.py] - opcua_connector - start_client - 247 - Error in main loop, trying to reconnect: %s
Traceback (most recent call last):
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 229, in start_client
    await self.__poll_nodes()
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 498, in __poll_nodes
    values = await self.__client.read_values([node_config['var'] for device in self.__device_nodes for node_config in device.nodes])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/asyncua/client/client.py", line 921, in read_values
    res = await self.read_attributes(nodes, attr=ua.AttributeIds.Value)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/asyncua/client/client.py", line 915, in read_attributes
    return await self.uaclient.read_attributes(nodeids, attr)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/asyncua/client/ua_client.py", line 760, in read_attributes
    data = await self.protocol.send_request(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/asyncua/client/ua_client.py", line 172, in send_request
    self.check_answer(data, f" in response to {request.__class__.__name__}")
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/asyncua/client/ua_client.py", line 181, in check_answer
    hdr.ServiceResult.check()
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/asyncua/ua/uatypes.py", line 377, in check
    raise UaStatusCodeError(self.value)
asyncua.ua.uaerrors._auto.BadNothingToDo: No processing could be done because there was nothing to do.(BadNothingToDo)
2024-08-14 15:45:41 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-14 15:45:42 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - __connect_with_connectors - 919 - ['55837108-a714-4b04-955a-41b34c4e9775'] Connector with name MB107_UDC1 already exists and not stopped!
2024-08-14 15:45:42 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 81 - Connector configuration has been updated to the new format.
2024-08-14 15:45:42 - |INFO| - [opcua_connector.py] - opcua_connector - open - 110 - Starting OPC-UA Connector (Async IO)
2024-08-14 15:45:42 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-14 15:45:42 - |INFO| - [opcua_connector.py] - opcua_connector - close - 118 - Stopping OPC-UA Connector
2024-08-14 15:45:42 - |INFO| - [opcua_connector.py] - opcua_connector - __disconnect - 141 - MB107_UDC1 has been disconnected from OPC-UA Server.
2024-08-14 15:45:42 - |INFO| - [opcua_connector.py] - opcua_connector - close - 131 - MB107_UDC1 has been stopped.
2024-08-14 15:45:42 - |INFO| - [opcua_connector.py] - opcua_connector - open - 110 - Starting OPC-UA Connector (Async IO)
2024-08-14 15:45:42 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - __connect_with_connectors - 919 - ['b8a19e99-5664-4988-8e72-11c3c0eb27e5'] Connector with name MB107_UDC2 already exists and not stopped!
2024-08-14 15:45:42 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-14 15:45:42 - |INFO| - [opcua_connector.py] - opcua_connector - close - 118 - Stopping OPC-UA Connector
2024-08-14 15:45:42 - |ERROR| - [opcua_connector.py] - opcua_connector - start_client - 247 - Error in main loop, trying to reconnect: %s
Traceback (most recent call last):
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 229, in start_client
    await self.__poll_nodes()
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 498, in __poll_nodes
    values = await self.__client.read_values([node_config['var'] for device in self.__device_nodes for node_config in device.nodes])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/asyncua/client/client.py", line 921, in read_values
    res = await self.read_attributes(nodes, attr=ua.AttributeIds.Value)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/asyncua/client/client.py", line 915, in read_attributes
    return await self.uaclient.read_attributes(nodeids, attr)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/asyncua/client/ua_client.py", line 760, in read_attributes
    data = await self.protocol.send_request(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/asyncua/client/ua_client.py", line 172, in send_request
    self.check_answer(data, f" in response to {request.__class__.__name__}")
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/asyncua/client/ua_client.py", line 181, in check_answer
    hdr.ServiceResult.check()
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/asyncua/ua/uatypes.py", line 377, in check
    raise UaStatusCodeError(self.value)
asyncua.ua.uaerrors._auto.BadNothingToDo: No processing could be done because there was nothing to do.(BadNothingToDo)
2024-08-14 15:45:43 - |INFO| - [opcua_connector.py] - opcua_connector - close - 131 - MB107_UDC2 has been stopped.
2024-08-14 15:45:43 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - __connect_with_connectors - 919 - ['55837108-a714-4b04-955a-41b34c4e9775'] Connector with name MB107_UDC1 already exists and not stopped!
2024-08-14 15:45:43 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 81 - Connector configuration has been updated to the new format.
2024-08-14 15:45:43 - |INFO| - [opcua_connector.py] - opcua_connector - open - 110 - Starting OPC-UA Connector (Async IO)
2024-08-14 15:45:43 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000K9K77
2024-08-14 15:45:44 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBL98
2024-08-14 15:45:44 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB38Q
2024-08-14 15:45:44 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB58S
2024-08-14 15:45:44 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB48R
2024-08-14 15:45:44 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA97W
2024-08-14 15:45:44 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBH94
2024-08-14 15:45:44 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAD80
2024-08-14 15:45:44 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA77U
2024-08-14 15:45:44 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAB7Y
2024-08-14 15:45:44 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB88V
2024-08-14 15:45:45 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBK97
2024-08-14 15:45:45 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAC7Z
2024-08-14 15:45:45 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBG93
2024-08-14 15:45:45 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA87V
2024-08-14 15:45:45 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000K9L78
2024-08-14 15:45:45 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA67T
2024-08-14 15:45:45 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAA7X
2024-08-14 15:45:45 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBJ96
2024-08-14 15:45:46 - |INFO| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 70 - Non primitive data type: <class 'datetime.datetime'>
2024-08-14 15:45:46 - |ERROR| - [tb_logger.py] - tb_logger - exception - 133 - Error in main loop: 'datetime.datetime' object has no attribute 'Value'
Traceback (most recent call last):
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 229, in start_client
    await self.__poll_nodes()
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 505, in __poll_nodes
    device.converter.convert(device.nodes, device_values)
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_uplink_converter.py", line 71, in convert
    data = val.Value.Value
           ^^^^^^^^^
AttributeError: 'datetime.datetime' object has no attribute 'Value'

We also detected in TB that configuration was lost in the first connector "MB107_UDC1" but not in the second one

image

@ashdam
Copy link
Contributor

ashdam commented Aug 15, 2024

Steps followed and their outputs

  1. I updated configuration from MB107_UDC1 to it's correct status from last time it was "deleted"/missing

  2. After activating MB107_UDC1 y got this error from "/Server/ServerStatus/BuildInfo" key (variable)
    image

  3. Stopped MB107_UDC1
    2024-08-15 07:39:36 - |INFO| - [opcua_connector.py] - opcua_connector - close - 131 - MB107_UDC1 has been stopped.

  4. Started MB107_UDC2, the one with almost 4k keys and 20 devices
    image

Full log


(venv) admin@CAC-POCDATA-udc1:~/tb-iot-gateway-latest/thingsboard-gateway$ python3 ./thingsboard_gateway/tb_gateway.py
Cannot load GRPC connector!
2024-08-15 07:35:23 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 168 - Gateway starting...
2024-08-15 07:35:23 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 172 - ThingsBoard IoT gateway version: 3.5.1
2024-08-15 07:35:23 - |WARNING| - [tb_updater.py] - tb_updater - check_for_new_version - 92 - Cannot connect to the update service. PLease check your internet connection.
2024-08-15 07:35:23 - |INFO| - [tb_loader.py] - tb_loader - import_module - 68 - Import OpcUaConnector from /home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua.
2024-08-15 07:35:23 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 81 - Connector configuration has been updated to the new format.
2024-08-15 07:35:23 - |INFO| - [opcua_connector.py] - opcua_connector - open - 110 - Starting OPC-UA Connector (Async IO)
2024-08-15 07:35:24 - |INFO| - [tb_loader.py] - tb_loader - import_module - 68 - Import OpcUaUplinkConverter from /home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua.
2024-08-15 07:35:24 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000K9K77
2024-08-15 07:35:24 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBL98
2024-08-15 07:35:24 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB38Q
2024-08-15 07:35:24 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB58S
2024-08-15 07:35:24 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB48R
2024-08-15 07:35:24 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA97W
2024-08-15 07:35:24 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBH94
2024-08-15 07:35:24 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAD80
2024-08-15 07:35:24 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA77U
2024-08-15 07:35:24 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAB7Y
2024-08-15 07:35:25 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB88V
2024-08-15 07:35:25 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBK97
2024-08-15 07:35:25 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAC7Z
2024-08-15 07:35:25 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBG93
2024-08-15 07:35:25 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA87V
2024-08-15 07:35:25 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000K9L78
2024-08-15 07:35:25 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA67T
2024-08-15 07:35:25 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAA7X
2024-08-15 07:35:25 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBJ96
2024-08-15 07:35:26 - |INFO| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 70 - Non primitive data type: <class 'datetime.datetime'>
2024-08-15 07:35:26 - |ERROR| - [tb_logger.py] - tb_logger - exception - 133 - Error in main loop: 'datetime.datetime' object has no attribute 'VariantType'
Traceback (most recent call last):
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 229, in start_client
    await self.__poll_nodes()
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 505, in __poll_nodes
    device.converter.convert(device.nodes, device_values)
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_uplink_converter.py", line 73, in convert
    elif val.VariantType == VariantType.ExtensionObject:
         ^^^^^^^^^^^^^^^
AttributeError: 'datetime.datetime' object has no attribute 'VariantType'
2024-08-15 07:35:28 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 745 - Waiting for connection to be established before sending data to ThingsBoard!
2024-08-15 07:35:28 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 745 - Waiting for connection to be established before sending data to ThingsBoard!
2024-08-15 07:35:34 - |INFO| - [tb_device_mqtt.py] - tb_device_mqtt - _on_connect - 352 - MQTT client <paho.mqtt.client.Client object at 0x7132a3c33c80> - Connected!
2024-08-15 07:35:34 - |INFO| - [tb_gateway_mqtt.py] - tb_gateway_mqtt - gw_subscribe_to_attribute - 236 - Subscribed to *|* with id 1 for device *
2024-08-15 07:35:34 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 235 - Gateway started.
2024-08-15 07:35:34 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - __init__ - 68 - Remote Configurator started
2024-08-15 07:35:34 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 247 - Initials connections with connectors was failed, trying again...
2024-08-15 07:35:34 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - __load_persistent_devices - 1612 - Connector with id 55837108-a714-4b04-955a-41b34c4e9775 not found, trying to use connector by name!
2024-08-15 07:35:34 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - __load_persistent_devices - 1620 - Connector with name MB107_UDC1 not found! probably it is disabled, device MB107_UDC1_A0000K9J76 will be removed from the saved devices
2024-08-15 07:35:35 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 07:35:35 - |INFO| - [opcua_connector.py] - opcua_connector - close - 118 - Stopping OPC-UA Connector
2024-08-15 07:35:35 - |INFO| - [opcua_connector.py] - opcua_connector - close - 131 - MB107_UDC2 has been stopped.
2024-08-15 07:35:35 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 07:36:03 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 07:36:03 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 07:36:03 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 81 - Connector configuration has been updated to the new format.
2024-08-15 07:36:03 - |INFO| - [opcua_connector.py] - opcua_connector - open - 110 - Starting OPC-UA Connector (Async IO)
2024-08-15 07:36:03 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 07:36:03 - |INFO| - [opcua_connector.py] - opcua_connector - close - 118 - Stopping OPC-UA Connector
2024-08-15 07:36:03 - |INFO| - [opcua_connector.py] - opcua_connector - __disconnect - 141 - MB107_UDC1 has been disconnected from OPC-UA Server.
2024-08-15 07:36:05 - |INFO| - [opcua_connector.py] - opcua_connector - close - 131 - MB107_UDC1 has been stopped.
2024-08-15 07:36:05 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 81 - Connector configuration has been updated to the new format.
2024-08-15 07:36:05 - |INFO| - [opcua_connector.py] - opcua_connector - open - 110 - Starting OPC-UA Connector (Async IO)
2024-08-15 07:36:05 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC1_A0000K9J76
2024-08-15 07:36:05 - |INFO| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 70 - Non primitive data type: <class 'asyncua.ua.uaprotocol_auto.BuildInfo'>
2024-08-15 07:36:05 - |ERROR| - [tb_logger.py] - tb_logger - exception - 133 - Error in main loop: 'BuildInfo' object has no attribute 'VariantType'
Traceback (most recent call last):
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 229, in start_client
    await self.__poll_nodes()
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 505, in __poll_nodes
    device.converter.convert(device.nodes, device_values)
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_uplink_converter.py", line 73, in convert
    elif val.VariantType == VariantType.ExtensionObject:
         ^^^^^^^^^^^^^^^
AttributeError: 'BuildInfo' object has no attribute 'VariantType'
2024-08-15 07:39:36 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 07:39:36 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 07:39:36 - |INFO| - [opcua_connector.py] - opcua_connector - close - 118 - Stopping OPC-UA Connector
2024-08-15 07:39:36 - |INFO| - [opcua_connector.py] - opcua_connector - close - 131 - MB107_UDC1 has been stopped.
2024-08-15 07:41:10 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 07:41:10 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 07:41:13 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 07:41:13 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 81 - Connector configuration has been updated to the new format.
2024-08-15 07:41:13 - |INFO| - [opcua_connector.py] - opcua_connector - open - 110 - Starting OPC-UA Connector (Async IO)
2024-08-15 07:41:13 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000K9K77
2024-08-15 07:41:13 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBL98
2024-08-15 07:41:13 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB38Q
2024-08-15 07:41:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB58S
2024-08-15 07:41:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB48R
2024-08-15 07:41:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA97W
2024-08-15 07:41:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBH94
2024-08-15 07:41:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAD80
2024-08-15 07:41:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA77U
2024-08-15 07:41:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAB7Y
2024-08-15 07:41:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KB88V
2024-08-15 07:41:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBK97
2024-08-15 07:41:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAC7Z
2024-08-15 07:41:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBG93
2024-08-15 07:41:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA87V
2024-08-15 07:41:14 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000K9L78
2024-08-15 07:41:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KA67T
2024-08-15 07:41:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KAA7X
2024-08-15 07:41:15 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 423 - Added device node: MB107_UDC2_A0000KBJ96
2024-08-15 07:41:15 - |INFO| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 70 - Non primitive data type: <class 'datetime.datetime'>
2024-08-15 07:41:15 - |ERROR| - [tb_logger.py] - tb_logger - exception - 133 - Error in main loop: 'datetime.datetime' object has no attribute 'VariantType'
Traceback (most recent call last):
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 229, in start_client
    await self.__poll_nodes()
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 505, in __poll_nodes
    device.converter.convert(device.nodes, device_values)
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_uplink_converter.py", line 73, in convert
    elif val.VariantType == VariantType.ExtensionObject:
         ^^^^^^^^^^^^^^^
AttributeError: 'datetime.datetime' object has no attribute 'VariantType'

Much less errors at least :)

@ashdam
Copy link
Contributor

ashdam commented Aug 15, 2024

Steps followed and their outputs:

  1. After activating MB107_UDC1 y got this error
    image

  2. Stopped MB107_UDC1
    2024-08-15 08:23:33 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
    2024-08-15 08:23:33 - |INFO| - [opcua_connector.py] - opcua_connector - close - 120 - Stopping OPC-UA Connector
    2024-08-15 08:23:33 - |INFO| - [opcua_connector.py] - opcua_connector - close - 133 - MB107_UDC1 has been stopped.
    2024-08-15 08:23:33 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.

  3. Started MB107_UDC2. Same error
    image

Full log


(venv) admin@CAC-POCDATA-udc1:~/tb-iot-gateway-latest/thingsboard-gateway$ python3 ./thingsboard_gateway/tb_gateway.py
Cannot load GRPC connector!
2024-08-15 08:21:52 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 168 - Gateway starting...
2024-08-15 08:21:52 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 172 - ThingsBoard IoT gateway version: 3.5.1
2024-08-15 08:21:52 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - _load_connectors - 879 - Connectors - not found!
2024-08-15 08:21:52 - |WARNING| - [tb_updater.py] - tb_updater - check_for_new_version - 92 - Cannot connect to the update service. PLease check your internet connection.
2024-08-15 08:21:57 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 745 - Waiting for connection to be established before sending data to ThingsBoard!
2024-08-15 08:22:02 - |INFO| - [tb_device_mqtt.py] - tb_device_mqtt - _on_connect - 352 - MQTT client <paho.mqtt.client.Client object at 0x7d61077b5e50> - Connected!
2024-08-15 08:22:02 - |INFO| - [tb_gateway_mqtt.py] - tb_gateway_mqtt - gw_subscribe_to_attribute - 236 - Subscribed to *|* with id 1 for device *
2024-08-15 08:22:03 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 235 - Gateway started.
2024-08-15 08:22:03 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - __init__ - 68 - Remote Configurator started
2024-08-15 08:22:03 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - _load_connectors - 879 - Connectors - not found!
2024-08-15 08:22:03 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 247 - Initials connections with connectors was failed, trying again...
2024-08-15 08:22:03 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - __load_persistent_devices - 1612 - Connector with id 55837108-a714-4b04-955a-41b34c4e9775 not found, trying to use connector by name!
2024-08-15 08:22:03 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - __load_persistent_devices - 1620 - Connector with name MB107_UDC1 not found! probably it is disabled, device MB107_UDC1_A0000K9J76 will be removed from the saved devices
2024-08-15 08:22:03 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:22:03 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:22:10 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:22:10 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:22:11 - |INFO| - [tb_loader.py] - tb_loader - import_module - 68 - Import OpcUaConnector from /home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua.
2024-08-15 08:22:11 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 83 - Connector configuration has been updated to the new format.
2024-08-15 08:22:11 - |INFO| - [opcua_connector.py] - opcua_connector - open - 112 - Starting OPC-UA Connector (Async IO)
2024-08-15 08:22:11 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:22:11 - |INFO| - [opcua_connector.py] - opcua_connector - close - 120 - Stopping OPC-UA Connector
2024-08-15 08:22:11 - |INFO| - [opcua_connector.py] - opcua_connector - __disconnect - 143 - MB107_UDC1 has been disconnected from OPC-UA Server.
2024-08-15 08:22:12 - |INFO| - [opcua_connector.py] - opcua_connector - close - 133 - MB107_UDC1 has been stopped.
2024-08-15 08:22:12 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 83 - Connector configuration has been updated to the new format.
2024-08-15 08:22:12 - |INFO| - [opcua_connector.py] - opcua_connector - open - 112 - Starting OPC-UA Connector (Async IO)
2024-08-15 08:22:12 - |INFO| - [tb_loader.py] - tb_loader - import_module - 68 - Import OpcUaUplinkConverter from /home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua.
2024-08-15 08:22:12 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC1_A0000K9J76
2024-08-15 08:22:12 - |ERROR| - [tb_logger.py] - tb_logger - exception - 133 - Error in main loop: isinstance() arg 2 must be a type, a tuple of types, or a union
Traceback (most recent call last):
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 231, in start_client
    await self.__poll_nodes()
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 508, in __poll_nodes
    device.converter.convert(device.nodes, device_values)
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_uplink_converter.py", line 65, in convert
    if not isinstance(list, values):
           ^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union
2024-08-15 08:23:33 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:23:33 - |INFO| - [opcua_connector.py] - opcua_connector - close - 120 - Stopping OPC-UA Connector
2024-08-15 08:23:33 - |INFO| - [opcua_connector.py] - opcua_connector - close - 133 - MB107_UDC1 has been stopped.
2024-08-15 08:23:33 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:24:14 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:24:14 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:24:16 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:24:16 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 83 - Connector configuration has been updated to the new format.
2024-08-15 08:24:16 - |INFO| - [opcua_connector.py] - opcua_connector - open - 112 - Starting OPC-UA Connector (Async IO)
2024-08-15 08:24:17 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000K9K77
2024-08-15 08:24:17 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBL98
2024-08-15 08:24:17 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB38Q
2024-08-15 08:24:17 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB58S
2024-08-15 08:24:17 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB48R
2024-08-15 08:24:17 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA97W
2024-08-15 08:24:17 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBH94
2024-08-15 08:24:18 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAD80
2024-08-15 08:24:18 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA77U
2024-08-15 08:24:18 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAB7Y
2024-08-15 08:24:18 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB88V
2024-08-15 08:24:18 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBK97
2024-08-15 08:24:18 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAC7Z
2024-08-15 08:24:18 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBG93
2024-08-15 08:24:18 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA87V
2024-08-15 08:24:18 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000K9L78
2024-08-15 08:24:18 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA67T
2024-08-15 08:24:18 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAA7X
2024-08-15 08:24:18 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBJ96
2024-08-15 08:24:19 - |ERROR| - [tb_logger.py] - tb_logger - exception - 133 - Error in main loop: isinstance() arg 2 must be a type, a tuple of types, or a union
Traceback (most recent call last):
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 231, in start_client
    await self.__poll_nodes()
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 508, in __poll_nodes
    device.converter.convert(device.nodes, device_values)
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_uplink_converter.py", line 65, in convert
    if not isinstance(list, values):
           ^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union

@ashdam
Copy link
Contributor

ashdam commented Aug 15, 2024

Starting the gateway
image

Full log

Cannot load GRPC connector!
2024-08-15 08:30:53 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 168 - Gateway starting...
2024-08-15 08:30:53 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 172 - ThingsBoard IoT gateway version: 3.5.1
2024-08-15 08:30:54 - |WARNING| - [tb_updater.py] - tb_updater - check_for_new_version - 92 - Cannot connect to the update service. PLease check your internet connection.
2024-08-15 08:30:54 - |INFO| - [tb_loader.py] - tb_loader - import_module - 68 - Import OpcUaConnector from /home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua.
2024-08-15 08:30:54 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 83 - Connector configuration has been updated to the new format.
2024-08-15 08:30:54 - |INFO| - [opcua_connector.py] - opcua_connector - open - 112 - Starting OPC-UA Connector (Async IO)
2024-08-15 08:30:54 - |INFO| - [tb_loader.py] - tb_loader - import_module - 68 - Import OpcUaUplinkConverter from /home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua.
2024-08-15 08:30:54 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000K9K77
2024-08-15 08:30:54 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBL98
2024-08-15 08:30:54 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB38Q
2024-08-15 08:30:54 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB58S
2024-08-15 08:30:55 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB48R
2024-08-15 08:30:55 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA97W
2024-08-15 08:30:55 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBH94
2024-08-15 08:30:55 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAD80
2024-08-15 08:30:55 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA77U
2024-08-15 08:30:55 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAB7Y
2024-08-15 08:30:55 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB88V
2024-08-15 08:30:55 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBK97
2024-08-15 08:30:55 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAC7Z
2024-08-15 08:30:55 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBG93
2024-08-15 08:30:55 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA87V
2024-08-15 08:30:55 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000K9L78
2024-08-15 08:30:56 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA67T
2024-08-15 08:30:56 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAA7X
2024-08-15 08:30:56 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBJ96
2024-08-15 08:30:56 - |ERROR| - [tb_logger.py] - tb_logger - exception - 133 - Error in main loop: 'DataValue' object has no attribute 'VariantType'
Traceback (most recent call last):
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 231, in start_client
    await self.__poll_nodes()
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 508, in __poll_nodes
    device.converter.convert(device.nodes, device_values)
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_uplink_converter.py", line 99, in convert
    self._log.warning(f"Unsupported data type: {val.VariantType}, will be processed as a string.")
                                                ^^^^^^^^^^^^^^^
AttributeError: 'DataValue' object has no attribute 'VariantType'
2024-08-15 08:30:58 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 745 - Waiting for connection to be established before sending data to ThingsBoard!
2024-08-15 08:30:59 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 745 - Waiting for connection to be established before sending data to ThingsBoard!
2024-08-15 08:31:04 - |INFO| - [tb_device_mqtt.py] - tb_device_mqtt - _on_connect - 352 - MQTT client <paho.mqtt.client.Client object at 0x7fc254133ce0> - Connected!
2024-08-15 08:31:04 - |INFO| - [tb_gateway_mqtt.py] - tb_gateway_mqtt - gw_subscribe_to_attribute - 236 - Subscribed to *|* with id 1 for device *
2024-08-15 08:31:05 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 235 - Gateway started.
2024-08-15 08:31:05 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - __init__ - 68 - Remote Configurator started
2024-08-15 08:31:05 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - __init__ - 247 - Initials connections with connectors was failed, trying again...
2024-08-15 08:31:05 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - __load_persistent_devices - 1612 - Connector with id 55837108-a714-4b04-955a-41b34c4e9775 not found, trying to use connector by name!
2024-08-15 08:31:05 - |WARNING| - [tb_gateway_service.py] - tb_gateway_service - __load_persistent_devices - 1620 - Connector with name MB107_UDC1 not found! probably it is disabled, device MB107_UDC1_A0000K9J76 will be removed from the saved devices
2024-08-15 08:31:05 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:31:05 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:31:06 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:31:06 - |INFO| - [opcua_connector.py] - opcua_connector - close - 120 - Stopping OPC-UA Connector
2024-08-15 08:31:06 - |INFO| - [opcua_connector.py] - opcua_connector - close - 133 - MB107_UDC2 has been stopped.
2024-08-15 08:31:06 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 83 - Connector configuration has been updated to the new format.
2024-08-15 08:31:06 - |INFO| - [opcua_connector.py] - opcua_connector - open - 112 - Starting OPC-UA Connector (Async IO)
2024-08-15 08:31:07 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:31:07 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000K9K77
2024-08-15 08:31:07 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBL98
2024-08-15 08:31:07 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB38Q
2024-08-15 08:31:07 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB58S
2024-08-15 08:31:07 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB48R
2024-08-15 08:31:07 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA97W
2024-08-15 08:31:07 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBH94
2024-08-15 08:31:08 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAD80
2024-08-15 08:31:08 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA77U
2024-08-15 08:31:08 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAB7Y
2024-08-15 08:31:08 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB88V
2024-08-15 08:31:08 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBK97
2024-08-15 08:31:08 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAC7Z
2024-08-15 08:31:08 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBG93
2024-08-15 08:31:08 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA87V
2024-08-15 08:31:08 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000K9L78
2024-08-15 08:31:08 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA67T
2024-08-15 08:31:08 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAA7X
2024-08-15 08:31:08 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBJ96
2024-08-15 08:31:09 - |ERROR| - [tb_logger.py] - tb_logger - exception - 133 - Error in main loop: 'DataValue' object has no attribute 'VariantType'
Traceback (most recent call last):
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 231, in start_client
    await self.__poll_nodes()
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_connector.py", line 508, in __poll_nodes
    device.converter.convert(device.nodes, device_values)
  File "/home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua/opcua_uplink_converter.py", line 99, in convert
    self._log.warning(f"Unsupported data type: {val.VariantType}, will be processed as a string.")
                                                ^^^^^^^^^^^^^^^
AttributeError: 'DataValue' object has no attribute 'VariantType'

@ashdam
Copy link
Contributor

ashdam commented Aug 15, 2024

Steps followed:

  1. Started MB107_UDC1 => No error it seems just warning writing over and over
2024-08-15 08:43:29 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 83 - Connector configuration has been updated to the new format.
2024-08-15 08:43:29 - |INFO| - [opcua_connector.py] - opcua_connector - open - 112 - Starting OPC-UA Connector (Async IO)
2024-08-15 08:43:29 - |INFO| - [tb_loader.py] - tb_loader - import_module - 68 - Import OpcUaUplinkConverter from /home/admin/tb-iot-gateway-latest/thingsboard-gateway/venv/lib/python3.12/site-packages/thingsboard_gateway-3.5.1-py3.12.egg/thingsboard_gateway/connectors/opcua.
2024-08-15 08:43:29 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC1_A0000K9J76
2024-08-15 08:43:29 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:29 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:29 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:29 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:29 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:34 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:34 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:34 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:34 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:34 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:39 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:39 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:39 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:39 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:39 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:43:40 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:43:40 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:43:40 - |INFO| - [opcua_connector.py] - opcua_connector - close - 120 - Stopping OPC-UA Connector
2024-08-15 08:43:40 - |INFO| - [opcua_connector.py] - opcua_connector - __disconnect - 143 - MB107_UDC1 has been disconnected from OPC-UA Server.
2024-08-15 08:43:41 - |INFO| - [opcua_connector.py] - opcua_connector - close - 133 - MB107_UDC1 has been stopped.
  1. Started MB107_UDC2 and stopped after a few seconds ==> Same no errors but too many warnings in just few seconds hehe
2024-08-15 08:46:58 - |WARNING| - [opcua_connector.py] - opcua_connector - __init__ - 83 - Connector configuration has been updated to the new format.
2024-08-15 08:46:58 - |INFO| - [opcua_connector.py] - opcua_connector - open - 112 - Starting OPC-UA Connector (Async IO)
2024-08-15 08:46:59 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000K9K77
2024-08-15 08:46:59 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBL98
2024-08-15 08:46:59 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB38Q
2024-08-15 08:46:59 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB58S
2024-08-15 08:46:59 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB48R
2024-08-15 08:46:59 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA97W
2024-08-15 08:46:59 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBH94
2024-08-15 08:46:59 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAD80
2024-08-15 08:47:00 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA77U
2024-08-15 08:47:00 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAB7Y
2024-08-15 08:47:00 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KB88V
2024-08-15 08:47:00 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBK97
2024-08-15 08:47:00 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAC7Z
2024-08-15 08:47:00 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBG93
2024-08-15 08:47:00 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA87V
2024-08-15 08:47:00 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000K9L78
2024-08-15 08:47:00 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KA67T
2024-08-15 08:47:00 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KAA7X
2024-08-15 08:47:00 - |INFO| - [opcua_connector.py] - opcua_connector - _create_new_devices - 425 - Added device node: MB107_UDC2_A0000KBJ96
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 7, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 11, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 11, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 5, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 1, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 5, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 4, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 11, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 6, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 11, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 4, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 4, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 11, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:01 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
................... many many warnings ............................
2024-08-15 08:47:15 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:15 - |WARNING| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 99 - Unsupported data type: 12, will be processed as a string.
2024-08-15 08:47:16 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:47:16 - |INFO| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _process_config_request - 220 - Configuration update request received.
2024-08-15 08:47:16 - |INFO| - [opcua_connector.py] - opcua_connector - close - 120 - Stopping OPC-UA Connector
2024-08-15 08:47:16 - |INFO| - [opcua_connector.py] - opcua_connector - __disconnect - 143 - MB107_UDC2 has been disconnected from OPC-UA Server.
2024-08-15 08:47:17 - |INFO| - [opcua_connector.py] - opcua_connector - close - 133 - MB107_UDC2 has been stopped.
^C2024-08-15 08:47:55 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __stop_gateway - 558 - Stopping...
2024-08-15 08:47:55 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __stop_gateway - 570 - The gateway has been stopped.
2024-08-15 08:47:55 - |INFO| - [tb_gateway_mqtt.py] - tb_gateway_mqtt - gw_unsubscribe - 244 - Unsubscribed from *|*, subscription id '*'
2024-08-15 08:47:55 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _on_disconnect - 343 - MQTT client was disconnected with reason code 0 (The operation completed successfully.)
2024-08-15 08:47:55 - |INFO| - [tb_gateway_service.py] - tb_gateway_service - __read_data_from_storage - 1245 - Send data Thread has been stopped successfully.

@ashdam
Copy link
Contributor

ashdam commented Aug 15, 2024

I got many errors but basically these 3:

2024-08-15 09:04:38 - |ERROR| - [tb_gateway_service.py] - tb_gateway_service - __send_to_storage - 1103 - Object of type Argument is not JSON serializable
2024-08-15 09:04:38 - |ERROR| - [tb_gateway_service.py] - tb_gateway_service - __send_to_storage - 1103 - Object of type EUInformation is not JSON serializable
2024-08-15 09:04:38 - |ERROR| - [tb_gateway_service.py] - tb_gateway_service - __send_to_storage - 1103 - Object of type Range is not JSON serializable

@samson0v
Copy link
Contributor Author

@ashdam do you have logs like: "Unsupported data type: ..., will be processed as a string."?
Could you provide them?

@ashdam
Copy link
Contributor

ashdam commented Aug 15, 2024

@samson0v no, just those errors over and over on the log

@samson0v
Copy link
Contributor Author

@ashdam added additional log because we can't understand what object type we got in the converter.

@ashdam
Copy link
Contributor

ashdam commented Aug 15, 2024

@samson0v got this error stack from this commit ed0fe1e

2024-08-15 10:04:56 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-12 06:22:25.098969+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:56 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-12 06:22:27.735187+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:56 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-15 09:05:50.237477+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:56 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: BuildInfo(ProductUri='http://renault.com/UnifiedDataCollector/v3.1.2.0', ManufacturerName='Renault', ProductName='UnifiedDataCollector', SoftwareVersion='3.1.2.0', BuildNumber='3.1.2', BuildDate=datetime.datetime(2024, 8, 12, 6, 22, 25, 98969, tzinfo=datetime.timezone.utc)) | and data type: <class 'asyncua.ua.uaprotocol_auto.BuildInfo'>
2024-08-15 10:04:56 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-12 06:22:56.989608+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:56 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: ServerStatusDataType(StartTime=datetime.datetime(2024, 8, 12, 6, 22, 56, 989608, tzinfo=datetime.timezone.utc), CurrentTime=datetime.datetime(2024, 8, 15, 9, 5, 50, 237477, tzinfo=datetime.timezone.utc), State=<ServerState.Running: 0>, BuildInfo_=BuildInfo(ProductUri='http://renault.com/UnifiedDataCollector/v3.1.2.0', ManufacturerName='Renault', ProductName='UnifiedDataCollector', SoftwareVersion='3.1.2.0', BuildNumber='3.1.2', BuildDate=datetime.datetime(2024, 8, 12, 6, 22, 25, 98969, tzinfo=datetime.timezone.utc)), SecondsTillShutdown=0, ShutdownReason=LocalizedText(Locale=None, Text=None)) | and data type: <class 'asyncua.ua.uaprotocol_auto.ServerStatusDataType'>
2024-08-15 10:04:56 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: StatusCode(value=0) | and data type: <class 'asyncua.ua.uatypes.StatusCode'>
2024-08-15 10:04:56 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-05-26 23:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:56 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2010-01-01 00:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:56 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2010-01-01 00:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:56 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2023-08-02 23:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:56 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-07-10 05:49:20.374000+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:58 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-12 06:22:25.098969+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:58 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-12 06:22:27.735187+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:58 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-15 09:05:51.901776+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:58 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: BuildInfo(ProductUri='http://renault.com/UnifiedDataCollector/v3.1.2.0', ManufacturerName='Renault', ProductName='UnifiedDataCollector', SoftwareVersion='3.1.2.0', BuildNumber='3.1.2', BuildDate=datetime.datetime(2024, 8, 12, 6, 22, 25, 98969, tzinfo=datetime.timezone.utc)) | and data type: <class 'asyncua.ua.uaprotocol_auto.BuildInfo'>
2024-08-15 10:04:58 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-12 06:22:56.989608+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:58 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: ServerStatusDataType(StartTime=datetime.datetime(2024, 8, 12, 6, 22, 56, 989608, tzinfo=datetime.timezone.utc), CurrentTime=datetime.datetime(2024, 8, 15, 9, 5, 51, 901776, tzinfo=datetime.timezone.utc), State=<ServerState.Running: 0>, BuildInfo_=BuildInfo(ProductUri='http://renault.com/UnifiedDataCollector/v3.1.2.0', ManufacturerName='Renault', ProductName='UnifiedDataCollector', SoftwareVersion='3.1.2.0', BuildNumber='3.1.2', BuildDate=datetime.datetime(2024, 8, 12, 6, 22, 25, 98969, tzinfo=datetime.timezone.utc)), SecondsTillShutdown=0, ShutdownReason=LocalizedText(Locale=None, Text=None)) | and data type: <class 'asyncua.ua.uaprotocol_auto.ServerStatusDataType'>
2024-08-15 10:04:58 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: StatusCode(value=0) | and data type: <class 'asyncua.ua.uatypes.StatusCode'>
2024-08-15 10:04:58 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-05-26 23:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:58 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2010-01-01 00:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:58 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2010-01-01 00:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:58 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2023-08-02 23:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:58 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-07-10 05:49:20.374000+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:04:58 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 745 - Waiting for connection to be established before sending data to ThingsBoard!
2024-08-15 10:04:59 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 745 - Waiting for connection to be established before sending data to ThingsBoard!
2024-08-15 10:05:00 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-12 06:22:25.098969+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:00 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-12 06:22:27.735187+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:00 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-15 09:05:53.603146+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:00 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: BuildInfo(ProductUri='http://renault.com/UnifiedDataCollector/v3.1.2.0', ManufacturerName='Renault', ProductName='UnifiedDataCollector', SoftwareVersion='3.1.2.0', BuildNumber='3.1.2', BuildDate=datetime.datetime(2024, 8, 12, 6, 22, 25, 98969, tzinfo=datetime.timezone.utc)) | and data type: <class 'asyncua.ua.uaprotocol_auto.BuildInfo'>
2024-08-15 10:05:00 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-12 06:22:56.989608+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:00 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: ServerStatusDataType(StartTime=datetime.datetime(2024, 8, 12, 6, 22, 56, 989608, tzinfo=datetime.timezone.utc), CurrentTime=datetime.datetime(2024, 8, 15, 9, 5, 53, 603146, tzinfo=datetime.timezone.utc), State=<ServerState.Running: 0>, BuildInfo_=BuildInfo(ProductUri='http://renault.com/UnifiedDataCollector/v3.1.2.0', ManufacturerName='Renault', ProductName='UnifiedDataCollector', SoftwareVersion='3.1.2.0', BuildNumber='3.1.2', BuildDate=datetime.datetime(2024, 8, 12, 6, 22, 25, 98969, tzinfo=datetime.timezone.utc)), SecondsTillShutdown=0, ShutdownReason=LocalizedText(Locale=None, Text=None)) | and data type: <class 'asyncua.ua.uaprotocol_auto.ServerStatusDataType'>
2024-08-15 10:05:00 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: StatusCode(value=0) | and data type: <class 'asyncua.ua.uatypes.StatusCode'>
2024-08-15 10:05:00 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-05-26 23:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:00 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2010-01-01 00:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:00 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2010-01-01 00:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:00 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2023-08-02 23:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:00 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-07-10 05:49:20.374000+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:01 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-12 06:22:25.098969+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:01 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-12 06:22:27.735187+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:01 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-15 09:05:55.295902+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:01 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: BuildInfo(ProductUri='http://renault.com/UnifiedDataCollector/v3.1.2.0', ManufacturerName='Renault', ProductName='UnifiedDataCollector', SoftwareVersion='3.1.2.0', BuildNumber='3.1.2', BuildDate=datetime.datetime(2024, 8, 12, 6, 22, 25, 98969, tzinfo=datetime.timezone.utc)) | and data type: <class 'asyncua.ua.uaprotocol_auto.BuildInfo'>
2024-08-15 10:05:01 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-08-12 06:22:56.989608+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:01 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: ServerStatusDataType(StartTime=datetime.datetime(2024, 8, 12, 6, 22, 56, 989608, tzinfo=datetime.timezone.utc), CurrentTime=datetime.datetime(2024, 8, 15, 9, 5, 55, 295902, tzinfo=datetime.timezone.utc), State=<ServerState.Running: 0>, BuildInfo_=BuildInfo(ProductUri='http://renault.com/UnifiedDataCollector/v3.1.2.0', ManufacturerName='Renault', ProductName='UnifiedDataCollector', SoftwareVersion='3.1.2.0', BuildNumber='3.1.2', BuildDate=datetime.datetime(2024, 8, 12, 6, 22, 25, 98969, tzinfo=datetime.timezone.utc)), SecondsTillShutdown=0, ShutdownReason=LocalizedText(Locale=None, Text=None)) | and data type: <class 'asyncua.ua.uaprotocol_auto.ServerStatusDataType'>
2024-08-15 10:05:01 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: StatusCode(value=0) | and data type: <class 'asyncua.ua.uatypes.StatusCode'>
2024-08-15 10:05:01 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-05-26 23:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:01 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2010-01-01 00:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:01 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2010-01-01 00:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:01 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2023-08-02 23:00:00+00:00 | and data type: <class 'datetime.datetime'>
2024-08-15 10:05:01 - |ERROR| - [opcua_uplink_converter.py] - opcua_uplink_converter - convert - 74 - Unsupported data: 2024-07-10 05:49:20.374000+00:00 | and data type: <class 'datetime.datetime'>

@ashdam
Copy link
Contributor

ashdam commented Aug 15, 2024

They seem all asyncua OPCUA DataTypes isn't it?

@samson0v
Copy link
Contributor Author

@ashdam I reproduced situtation with config cutting.
In my situation config is cutting, because I have too small NETTY_MAX_PAYLOAD_SIZE, after increasing it to 1_000_000, the problem is gone.

@ashdam
Copy link
Contributor

ashdam commented Aug 15, 2024

Regarding the suddenly missing config topic. I have this on TB server
image

On the other hand telemetry rate on the GW seems good. Thank you!

But now the bottleneck is outside GW. We are figuring out what can be ;)

@samson0v samson0v linked an issue Aug 16, 2024 that may be closed by this pull request
@imbeacon imbeacon merged commit f3cfbff into master Aug 21, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants