Zigbee2mqtt plugin don't work with z2m new api
Posted: Thursday 26 May 2022 21:22
Hi,
Either I just got a problem (like it's always only me ), or there is a really problem with latest zigbee2mqtt (1.25.1) and latest domoticz plugin (3.1.0-beta).
So... yesterday (or day before ) I switched to new z2m (I have it now running in docker (already ) and in my main server; also there is new coordinator on CC2652P ). With this I also decided to update domoticz too (I've been running still on early 2021 version ), so I bumped up domoticz to latest version too (from github, compiled by myself).
Next, came z2m plugin to update too, so, I grabbed z2m from git too...
Domoticz working fine.
Z2M and it's new web-interface works fine (and looks nice at least for me), I repaired all devices to new coordinator without much problems too.
So, now I have:
Domoticz version: 2022.1 (build 14341) ; Build Hash: d479d6cb8 ; Compile Date: 2022-05-23 01:01:38
Zigbee2MQTT version: 1.25.1 , commit: 3f6a137
Z2M-dmoticz-plugin version: 3.1.0-beta (commit: 3ca1419 from 2022-04-30 17:33 CEST)
And I got problems - plugin for domoticz won't load devices tab (and other tabs too, just keep displaying "loading..." )...
So, I did a bit digging, and I came to conclusion that folks in z2m changed API (so much) - they removed some methods, changed other things - so the z2m plugin don't work anymore .
So far I noticed changes:
Or maybe I'm just "stupid" , and I don't have something enabled in cofing in z2m
Either I just got a problem (like it's always only me ), or there is a really problem with latest zigbee2mqtt (1.25.1) and latest domoticz plugin (3.1.0-beta).
So... yesterday (or day before ) I switched to new z2m (I have it now running in docker (already ) and in my main server; also there is new coordinator on CC2652P ). With this I also decided to update domoticz too (I've been running still on early 2021 version ), so I bumped up domoticz to latest version too (from github, compiled by myself).
Next, came z2m plugin to update too, so, I grabbed z2m from git too...
Domoticz working fine.
Z2M and it's new web-interface works fine (and looks nice at least for me), I repaired all devices to new coordinator without much problems too.
So, now I have:
Domoticz version: 2022.1 (build 14341) ; Build Hash: d479d6cb8 ; Compile Date: 2022-05-23 01:01:38
Zigbee2MQTT version: 1.25.1 , commit: 3f6a137
Z2M-dmoticz-plugin version: 3.1.0-beta (commit: 3ca1419 from 2022-04-30 17:33 CEST)
And I got problems - plugin for domoticz won't load devices tab (and other tabs too, just keep displaying "loading..." )...
So, I did a bit digging, and I came to conclusion that folks in z2m changed API (so much) - they removed some methods, changed other things - so the z2m plugin don't work anymore .
So far I noticed changes:
- z2m plugin use topic to get devices list , but now z2m don't support at all populating device list on request.
Code: Select all
bridge/devices/get
Now z2m creates topicwith retained flag, and it have now device list in zigbee network.Code: Select all
bridge/devices
Publishing to bridge/devices/get causes mqtt-broker to drop "retained" flag on bridge/devices - which is problematic because this topic won't be pushed to any new mqtt-client who connect to the broker and want to listen to zigbee2mqtt topics - z2m status is now changed to json format - no plain text, so the topic now have json data
Code: Select all
bridge/status
this throw an error in plugin.py:Code: Select all
{"status":"online"}
. There is suggested fix for this on github already (in issues).Code: Select all
Error: Zigbee2MQTT: TypeError: can only concatenate str (not "dict") to str**
Or maybe I'm just "stupid" , and I don't have something enabled in cofing in z2m