Zigbee2mqtt - Debug

Inspired by the tests, I tried to follow the instructions in the section Launch a Gladys test image? using the following command:

docker run -d \
--log-opt max-size=10m \
--restart=always \
--privileged \
--network=host \
--name gladys-test-atrovato  \
-e NODE_ENV=production \
-e SERVER_PORT=8001 \
-e TZ=Europe/Paris \
-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/gladysassistant_test_atrovato:/var/lib/gladysassistant \
-v /dev:/dev \
-v /run/udev:/run/udev:ro \
atrovato/gladys:zigbee2mqtt

I’m stuck at the test stage (access via IP_RASPBERRY_PI:8001). Did I miss any prerequisites?
Should I copy the contents of /var/lib/gladysassistant/ to /var/lib/gladysassistant_test_atrovato?

I don’t think so, if you followed my little tutorial normally there’s nothing more to do.

When you run docker ps, do you see the container running? Without errors (it’s not constantly restarting?)

Here are the containers that are running:

I can successfully connect to the test container. I have re-entered the MQTT credentials as those from the Gladys container.

Once Zigbee2MQTT is enabled, the connections do not seem to work

And as a result, it is impossible to enable « Allow Association » in Zigbee discovery.

Ah, are you trying to launch a Zigbee2mqtt + MQTT container in addition to your existing classic installation?

I don’t know if that’s possible. @AlexTrovato correct me if I’m wrong, but I think the name of these containers is fixed and therefore it’s one Zigbee2mqtt installation per machine?

I didn’t have the context, I thought you couldn’t launch a test container, but it seems to work!

Yes the names are fixed, eclipse-mosquito is the MQTT integration, not the same port.

Therefore, launching the integration from a test image on the same machine is not possible.

Hello everyone!

I’m looking for a USB Zigbee dongle, what do you recommend?

I’m looking for the most « consumer friendly » possible: USB, in a case, no firmware to flash, it must be plug and play. And if possible with an affordable price :slight_smile:

So far I’ve found:

Both seem compatible with Zigbee2mqtt, but I’m open to feedback :slight_smile:

I use this one mainly for two reasons:

  1. It is factory flashed
  2. It can be updated directly from the Rpi, no need for specific hardware

I already have 42 Zigbee devices and I have not had any stability issues so far.

For information, here is how I flash the Zigbee2mqtt firmware updates, it’s super simple and fast, and could be automated by Gladys itself.

Script
#!/bin/sh

#echo "Installing pip3 and dependencies"
#pip3 install pyserial intelhex --upgrade

echo "Updating USB Firmware"
cd /home/pi/flash-usb/Z-Stack-firmware
git pull
cd ..

echo "Unzip Z stack firmware"
rm /home/pi/flash-usb/CC2652RB_coordinator_*.hex
unzip Z-Stack-firmware/coordinator/Z-Stack_3.x.0/bin/CC2652RB_coordinator_*.zip

echo "Updating cc2538-bsl git repo"
cd /home/pi/flash-usb/cc2538-bsl
git pull
cd ..

echo "Shutting down Gladys"
docker stop gladys-z2m-zigbee2mqtt

version=$(ls | grep *.hex)

echo "Flashing new version: ${version}"
/home/pi/flash-usb/cc2538-bsl/cc2538-bsl.py -p "/dev/serial/by-id/usb-Silicon_Labs_slae.sh_cc2652rb_stick_-_slaesh_s_iot_stuff_00_12_4B_00_21_CC_41_DF-if00-port0" -evw "${version}"

echo "Starting again Gladys"

Thanks @lmilcent! After that, I’m looking for something more « mainstream ». I want to make a video showing how to use Zigbee in Gladys, and I want to use the most mainstream brand equipment possible so that it’s easy to reproduce and the tutorial is timeless :slight_smile:

Ok, I see the idea. Do you have stats on the number of Zigbee users on Gladys?

Not at all :slight_smile: After that, it’s the integration that rises the most for me, and we clearly lack resources to explain how to get started with Zigbee in Gladys!

Given the positive feedback I’ve seen on the Home Assistant forum, I went with the Sonoff, sold for €8.99 on Domadoo!

At this price, you shouldn’t miss out :smiley:

https://www.domadoo.fr/fr/interface-domotique/5976-sonoff-cle-usb-zigbee-30-antenne-externe-20dbm-compatible-zha-zigbee2mqtt.html?domid=17

Check only the number of devices it can support in a Zigbee network. Or at least indicate this in the tutorials.

Because on the Zigbee2MQTT project they indicate that some adapters are limited to a maximum of 50 and become unstable. Others, on the other hand, can support 100+.

@cicoub13 or @AlexTrovato have you seen this?

Hello everyone! I received my Sonoff Zigbee 3.0 USB stick and was able to test the end-to-end integration!

First of all, kudos to everyone who worked on it, generally it works great, and I’m amazed by the Zigbee experience in general: it works, nothing to say :clap:

Some feedback on the configuration experience:

  • It wasn’t very clear to me whether I should first configure the USB port of my Zigbee key or if I should configure the Zigbee2mqtt service first. I did the USB port first, but I could have started with the other and I don’t know if that would have caused a problem, but I think Zigbee2mqtt would have started incorrectly!

  • When launching the Zigbee2mqtt service, it’s not very clear that something is happening in the background. No spinner, no message telling me that the installation is in progress. I’m on fiber optics and on a Raspberry Pi 4, and all in all it took about 5-8 minutes. As I know what I’m doing, I monitored the installation progress in htop by watching the processes that were running, but for someone in the UI it’s very long, and as there are red crosses in the UI at the beginning, one might think that there was an error, whereas in fact you just have to wait :slight_smile: :blush:

I think a message should be added explaining that it can take up to 10 minutes, and that something is happening with a spinner :slight_smile: The red crosses can be left, but maybe by clearly explaining that it’s « in progress » and that it will connect gradually.

  • Once Zigbee2mqtt is configured, I was a bit lost: how to add a device? Place it next to the USB hub? Click on it?

The Zigbee2mqtt documentation helped me, maybe a small message and a link would suffice!

  • When you click on « enable pairing », it only enables pairing for 250 seconds, but after that time, Gladys still displays that pairing is enabled, whereas on the Zigbee2mqtt side it’s no longer in pairing mode.

  • The Zigbee2mqtt UI is still freely accessible, not great in terms of security :grinning_face_with_smiling_eyes:

Apart from that, I have my devices in Gladys, and everything works.

It’s really a great integration.

Great job @cicoub13 @Reno @AlexTrovato @VonOx and @lmilcent (I hope I didn’t forget anyone)!

Thanks for the feedback. This is a great collaborative integration that adds a large number of devices :rocket: :grinning_face_with_smiling_eyes:

I’ve created the GitHub issues to track (and allow anyone to make changes)

For the documentation, there is already a link to Connect Zigbee devices with an USB Zigbee dongle and Zigbee2mqtt | Gladys Assistant from the service page (and specifically the Add devices section). Isn’t that enough and should we add links to the zigbee2mqtt pages?

Thanks @cicoub13 for creating the issues!

I think two things are missing:

  • In Gladys, it would be helpful to explain (even in one sentence) that to pair a device, you should refer to its documentation, and possibly add a direct link to the Zigbee2Mqtt documentation within Gladys.
  • On the Gladys documentation side, in the section where we explain how to pair a device, adding a link to the Zigbee2Mqtt documentation would be a good idea!

On my side, I will try to create content related to the Zigbee2Mqtt integration (YouTube video, and maybe an article on the blog with :slight_smile: ).

@AlexTrovato I saw that there are several Zigbee2mqtt PRs, what would be the ideal order to merge all of this?

https://github.com/GladysAssistant/Gladys/pull/1420

Thanks again for these PRs! :folded_hands:

Alarm first, set value second.
But I would like a regression check on any Zigbee actuator on the set value PR.
Thanks :heart:

Ok I’ve merged the PR from alarme :slight_smile:

For this one, I’m waiting for someone to test with real devices and provide feedback:

For information, we are still open to feedback from @AlexTrovato on this PR: