(.venv) PA@ubuntu:~/Desktop/opcua/OPCUA_Gateway/tests/opc-UA$ python3 device.py INFO:azure.iot.device.common.mqtt_transport:Creating client for connecting using MQTT over TCP INFO:azure.iot.device.iothub.aio.async_clients:Connecting to Hub... INFO:azure.iot.device.common.mqtt_transport:Connect using port 8883 (TCP) INFO:azure.iot.device.common.mqtt_transport:connected with result code: 0 INFO:azure.iot.device.common.pipeline.pipeline_stages_mqtt:_on_mqtt_connected called INFO:azure.iot.device.iothub.abstract_clients:Connection State - Connected INFO:azure.iot.device.iothub.aio.async_clients:Successfully connected to Hub INFO:azure.iot.device.iothub.aio.async_clients:Enabling feature:twin_patches... INFO:azure.iot.device.common.mqtt_transport:subscribing to $iothub/twin/PATCH/properties/desired/# with qos 1 INFO:azure.iot.device.common.mqtt_transport:suback received for 1 INFO:azure.iot.device.iothub.aio.async_clients:Successfully enabled feature:twin_patches INFO:azure.iot.device.iothub.aio.async_clients:Enabling feature:c2d... INFO:azure.iot.device.common.mqtt_transport:subscribing to devices/UST0292/messages/devicebound/# with qos 1 INFO:azure.iot.device.common.mqtt_transport:suback received for 2 INFO:azure.iot.device.iothub.aio.async_clients:Successfully enabled feature:c2d INFO:__main__:IoT Hub Connected and handlers registered INFO:azure.iot.device.iothub.aio.async_clients:Getting twin INFO:azure.iot.device.iothub.aio.async_clients:Enabling feature:twin... INFO:azure.iot.device.common.mqtt_transport:subscribing to $iothub/twin/res/# with qos 1 INFO:azure.iot.device.common.mqtt_transport:suback received for 3 INFO:azure.iot.device.iothub.aio.async_clients:Successfully enabled feature:twin INFO:azure.iot.device.common.mqtt_transport:publishing on $iothub/twin/GET/?$rid=31a6a10c-8bd6-4517-81e1-fc37ddfd576f INFO:azure.iot.device.common.mqtt_transport:message received on $iothub/twin/res/200/?$rid=31a6a10c-8bd6-4517-81e1-fc37ddfd576f INFO:azure.iot.device.iothub.aio.async_clients:Successfully retrieved twin INFO:azure.iot.device.common.mqtt_transport:payload published for 4 INFO:__main__:Received twin update