Good evening everyone. After long weeks of waiting , the work on Zigbee2Mqtt is finally stable (and 100% tested ).
You can therefore download the image and test it on your Raspberry Pi (it will be port 1080).
All feedback is welcome (especially on devices that do not work AND on the user experience).
A big thank you to @Reno for the base code and @lmilcent for the 150 test images
Good evening, quick update, on the MQTT side I can see the connections being made.
On the Z2M side, I can see the actions of my peripherals (two switches WXKG01LM Aqara as well as a cube MFKZQ01LM Aqara).
However, on the Gladys side, the information does not appear on the dashboard. In the logs, it seems that the association of the physical device to the Gladys device is not working properly for the three devices:
2021-03-10T21:17:21+0100 <info> installZ2mContainer.js:25 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt is being installed as Docker container...
2021-03-10T21:17:21+0100 <info> installZ2mContainer.js:26 (Zigbee2mqttManager.installZ2mContainer) Pulling koenkk/zigbee2mqtt:latest image...
2021-03-10T21:17:50+0100 <info> installZ2mContainer.js:29 (Zigbee2mqttManager.installZ2mContainer) Preparing Zigbee2mqtt environment...
2021-03-10T21:17:50+0100 <info> installZ2mContainer.js:38 (Zigbee2mqttManager.installZ2mContainer) Configuration of Device /dev/ttyACM0
2021-03-10T21:17:50+0100 <info> installZ2mContainer.js:41 (Zigbee2mqttManager.installZ2mContainer) Creation of container...
2021-03-10T21:17:52+0100 <info> installZ2mContainer.js:44 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt successfully installed as Docker container
2021-03-10T21:17:52+0100 <info> installZ2mContainer.js:57 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt is starting...
2021-03-10T21:17:58+0100 <info> installZ2mContainer.js:69 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt successfully started
2021-03-10T21:17:58+0100 <info> connect.js:23 (MqttClient.<anonymous>) Connected to MQTT container mqtt://localhost:1884
2021-03-10T21:17:58+0100 <info> subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#
2021-03-10T21:20:15+0100 <warn> handleMqttMessage.js:83 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/config/devices/get empty message.
2021-03-10T21:20:21+0100 <warn> handleMqttMessage.js:104 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt device 0x00158d00027bb168 not configured in Gladys.
2021-03-10T21:20:23+0100 <warn> handleMqttMessage.js:104 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt device 0x00158d00027bb168 not configured in Gladys.
2021-03-10T21:20:25+0100 <warn> handleMqttMessage.js:83 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/config/devices/get empty message.
2021-03-10T21:22:50+0100 <warn> handleMqttMessage.js:83 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/config/devices/get empty message.
2021-03-10T21:22:51+0100 <warn> handleMqttMessage.js:83 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/config/devices/get empty message.
2021-03-10T21:22:54+0100 <warn> handleMqttMessage.js:83 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/config/devices/get empty message.
2021-03-10T21:22:57+0100 <warn> handleMqttMessage.js:104 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt device 0x00158d0003748a21 not configured in Gladys.
2021-03-10T21:23:00+0100 <warn> handleMqttMessage.js:83 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/config/devices/get empty message.
2021-03-10T21:23:47+0100 <warn> handleMqttMessage.js:104 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt device 0x00158d0003748a46 not configured in Gladys.
2021-03-10T21:23:48+0100 <warn> handleMqttMessage.js:83 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/config/devices/get empty message.
2021-03-10T21:27:39+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d00027bb168, feature action not configured in Gladys.
2021-03-10T21:27:39+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d00027bb168, feature battery not configured in Gladys.
2021-03-10T21:27:39+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d00027bb168, feature linkquality not configured in Gladys.
2021-03-10T21:27:39+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d00027bb168, feature voltage not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a21, feature action not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a21, feature battery not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a21, feature linkquality not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a21, feature voltage not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a21, feature battery not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a21, feature click not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a21, feature linkquality not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a21, feature voltage not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a46, feature action not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a46, feature battery not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a46, feature linkquality not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a46, feature voltage not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a46, feature battery not configured in Gladys.
2021-03-10T21:28:43+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0003748a46, feature click not configured in Gladys.
I specify that the three devices have only one functionality « Switch » feature.
Indeed, the issue is resolved, everything works correctly for these two types of devices, the data is correctly displayed on the Dashboard.
Ultra-fast correction, well done
Good evening,
I have been trying for some time to launch Gladys Zigbee edition via docker-compose
rather than via simple docker.
There are however two problems with the MQTT container that is created and launched by the Z2M service.
The first problem seems to be a Linux permission issue, the mosquitto.conf file fails to create in the MQTT folder. The MQTT configuration file folder does not seem to be accessible by the container.
The second problem is related to the persistence file paths of Z2M and MQTT. When creating the image, it is possible to change the persistence path to avoid having it in « /var/lib/gladys⊠» the problem is that the mqtt and z2m folders do not follow the change and still register in the folder « /var/lib/gladysassistant/ ».
On the official Gladys image, the Mqtt container does not have these two problems, I have not yet looked at the difference between the two container management methods but it would be interesting to keep the same way of creating and launching the mosquitto container for Mqtt.
Here is the docker-compose in question if you have time to try to
reproduce the problem:
Indeed, I agree itâs a problem that these files are hardcoded, I had the same problem trying to test these integrations on an instance where Gladys already exists: itâs impossible
Hello, great work, on my side just a remark, it seems that some mappings have been skipped for the two only types of devices I have (two switches WXKG01LM Aquara and a cube MFKZQ01LM Aquara).
The issue had been fixed but it seems that it is no longer the case.
Otherwise, I think the points mentioned above are well fixed, in any case, I havenât seen any other issues
I just fixed the type of your two devices. Can you update the image and test again?
Currently, the values single, double, hold are converted to numeric values.
The others are treated as strings: triple, quadruple, release, many and all those of your cube shake, wakeup, fall, tap, slide, flip180, flip90, rotate_left, rotate_right.
So as a test, I started by deleting the Gladys container (but not Z2M and MQTT) to recreate it after pulling the new image. I then observed the same behavior and thought it was probably a problem with the database.
I therefore recreated everything with persistence in a new folder. Unfortunately, the automatic creation of the MQTT container does not work. It seems there is still an access rights issue with the folder, or MQTT does not know where to find its configuration file. In the MQTT log, I have this: 1616604311: Error: Unable to open config file /mosquitto/config/mosquitto.conf.
I think there are still places where the path is hardcoded. Indeed, when I change the persistence folder to /var/lib/z2m-test, when the zeegbee2mqtt service is activated, a new folder is created here /var/lib/gladysassistant.
I therefore have a duplicate folder created by the service:
$ ls -al gladysassistant/zigbee2mqtt/
mqtt/ z2m/
$ ls -al z2m-test/zigbee2mqtt/
mqtt/ z2m/
EDIT: However, it is indeed in the new persistence folder /var/lib/z2m-test/zigbee2mqtt/mqtt/ that the Mosquitto configuration files are located and not in the duplicate folder in the path /var/lib/gladysassistant. Therefore, the old path is probably hardcoded in MQTT.
Yes, sorry. You need to delete the devices so they have the correct feature types in the database.
For the paths and permissions, have you deleted all the containers since the evening of March 22? Otherwise, the Z2M and MQTT containers are still on the old paths.
The fix I made modifies the paths at creation, but does not handle post-creation changes.