domoticz-zigbee2mqtt-plugin
domoticz-zigbee2mqtt-plugin copied to clipboard
Plugin fails to connect due to TypeError: a bytes-like object is required, not 'str'
Issue description Zigbee2mqtt is working properly and I can add devices to it without any issues. However, the plugin does not connect to mqtt or adds devices to DZ due to a type error. The domoticz log is as follows
2024-02-15 15:52:20.165 Error: zigbee: Call to function 'onMessage' failed, exception details:
2024-02-15 15:52:20.165 Error: zigbee: Traceback (most recent call last):
2024-02-15 15:52:20.165 Error: zigbee: File "/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py", line 299, in onMessage
2024-02-15 15:52:20.165 Error: zigbee: _plugin.onMessage(Connection, Data)
2024-02-15 15:52:20.165 Error: zigbee: File "/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py", line 137, in onMessage
2024-02-15 15:52:20.165 Error: zigbee: self.mqttClient.onMessage(Connection, Data)
2024-02-15 15:52:20.165 Error: zigbee: File "/home/pi/domoticz/plugins/zigbee2mqtt/mqtt.py", line 146, in onMessage
2024-02-15 15:52:20.165 Error: zigbee: topic = Data['Topic'] if 'Topic' in Data else ''
2024-02-15 15:52:20.165 Error: zigbee: ^^^^^^^^^^^^^^^
2024-02-15 15:52:20.165 Error: zigbee: TypeError: a bytes-like object is required, not 'str'
2024-02-15 15:53:10.180 Error: zigbee: Disconnected from MQTT Server: 192.168.88.162:8085
Additional information Zigbee2MQTT version: 3.8 (not 100% sure of this one) Python version: 3.11 Domoticz version: 2024.4 Plugin version: master branch, commit 660db3f68ae48fedce9b17727db4617ec5f721c8
Logs See above.