gregod / addon-usbhid-to-mqtt

This addon processes tokens from card or barcode readers that use a virtual USB keyboard to type the codes followed by an "Enter" key.
1 stars 1 forks source link

Update to version 0.9 broke mqtt #2

Closed goose2600 closed 3 years ago

goose2600 commented 3 years ago

After updating to version 0.9 (form 0.8) the addon stops working. Home Assistant: core-2021.3.4, supervisor-2021.03.6 Mosquitto broker: version: 5.1.1

INFO:root:Connecting to MQTT mqtt://homeassistant WARNING:hbmqtt.mqtt.protocol.handler:Unhandled exception: 'Lock' object is not iterable WARNING:hbmqtt.client:Connection failed: TypeError("'Lock' object is not iterable") WARNING:hbmqtt.mqtt.protocol.handler:Unhandled exception: 'Lock' object is not iterable WARNING:hbmqtt.client:Reconnection attempt failed: TypeError("'Lock' object is not iterable") WARNING:hbmqtt.mqtt.protocol.handler:Unhandled exception: 'Lock' object is not iterable WARNING:hbmqtt.client:Reconnection attempt failed: TypeError("'Lock' object is not iterable") WARNING:hbmqtt.mqtt.protocol.handler:Unhandled exception: 'Lock' object is not iterable WARNING:hbmqtt.client:Reconnection attempt failed: TypeError("'Lock' object is not iterable") ERROR:hbmqtt.client:Maximum number of connection attempts reached. Reconnection aborted INFO:root:Error: Too many connection attempts failed [cmd] /run.py exited 0 [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal.

gregod commented 3 years ago

Thanks for the report. The mqtt client unfortunately has issues with the newer python 3.9 version introduced in the 0.9 version of this add-on. I have revered this in https://github.com/gregod/addon-usbhid-to-mqtt/commit/735ff1ee7bbe7ff21167bde8f1a0315188fe76a0 and will publish version 0.9.1 soon.