ZigBee2mqtt down for a long time

Hello,
ZigBee hasn’t been working for a long time.
I had given up on it and decided to get back to it.
Problem encountered:
The containers start, but the MQTT - ZIGBEE2MQTT connection does not appear in the interface.
I repeated the following several times without success:

  • disable the service in Gladys > Configuration
  • unplug the key
  • remove the containers:
    docker stop gladys-z2m-zigbee2mqtt
    docker stop gladys-z2m-mqtt
    docker rm gladys-z2m-zigbee2mqtt
    docker rm gladys-z2m-mqtt
  • stop the gladys container:
    docker stop gladys
  • check the status of the containers
    docker ps -a
  • delete the config:
    sudo rm -rf /var/lib/gladysassistant/zigbee2mqtt
  • restart gladys
    docker start gladys
  • plug the dongle back in
  • connect the dongle in Gladys > Settings /dev/ttyUSB0
  • save
  • enable the service in Gladys > Configuration > Enable Zigbee2mqtt
  • wait a long time (20 minutes)
    But the link still has a red cross

I did a sudo reboot, but that didn’t change anything.

Any ideas?

Edit:

docker logs gladys-z2m-zigbee2mqtt

Outputs many times, with the FailureMessage Object changing:

Using ‹ /app/data › as data directory

Fatal error in , line 0
unreachable code

FailureMessage Object: 0x7efce64c
Using ‹ /app/data › as data directory

I searched Google for this error message and found this:

Which leads me to this:

There was an issue with Zigbee2mqtt earlier this year for Raspberry Pi users, and you need to perform a workaround to fix it. There’s nothing we can do on Gladys’s side :slight_smile:

Hi @pierre-gilles,
Thanks for the info.

I just did what the site said :sweat_smile:, then
docker restart gladys-z2m-zigbee2mqtt
Then refreshed the Zigbee2mqtt service config page
and all the checkboxes are green :hugs: :blush:

2 Likes

Hello everyone,

Has anyone by chance encountered the following error with gladys 4.9.2 and a Sonoff dongle?

Fatal error in , line 0

unreachable code

#FailureMessage Object: 0x7e8d16a4
Using ‹ /app/data › as data directory

I should point out this was the first attempt to connect the dongle.
I followed the method above but with no effect, zibee2mqtt refuses to start.

Have a good day, everyone.

EDIT: I managed to fix the issue by doing a reboot and « docker rm gladys-z2m-zigbee2mqtt » to force a complete configuration. It works now.

EDIT2: Working with the Lidl motion sensor (which reports battery level and motion). Since it uses AAA batteries, it’s a good choice for those who use rechargeable batteries.

Hello @gaetanb76,

I have the same issue, what exactly did you do? my setup: Raspberry Pi 3B+ a Transcend 128 GB TS128GMSA230S mounted on a Suptronics X850 powered by an Aukuru 5V 3A power supply plus the Sonoff dongle (which works on a Beelink BT3 Pro without any problem). From the logs the zigbbe2mqtt container seems to reboot in a loop and ends up freezing the Pi, forcing me to shut down and restart the Pi each time!

@pierre-gilles there’s no button in Gladys to properly stop/restart the Pi and also no way to control the containers (stop, restart, status)… makes production deployment difficult!

Hello @cce66,
I did what @pierre-gilles told me to do:

Then what I put in my message:

It worked in my case.

Did you only do the part => « # Notes for Raspberry Pi users »?

I didn’t have any problems with the Beelink BT3Pro; I think the Raspberry Pi 3B+ isn’t great or well suited. You have to use an SSD to avoid microSD corruption, but then you end up with a power issue apparently or you have to perform a somewhat unclear procedure — I don’t want to move to a Pi 4 for that!

Have you thought about switching to a mini PC?

It’s not too complicated even for a novice.

1 Like

If I remember correctly, yes.

As stated above, I had installed Gladys on a NUC Beelink BT3 Pro II and did not have this problem, so I conclude that it comes from the power supply (ordered today a 4A for Pi 4 — I’ll see if the problem disappears) or from the Gladys Raspberry architecture!
But I think I’m going to reinstall Gladys on a NUC Beelink BT3 Pro II and sell the Raspberry gear; that way I’ll have 3 Beelink BT3 Pro II units — one for Jeedom, one for HA, one for Gladys — which will allow me to test the three solutions because, for the moment, they all offer complementary possibilities!

I did the same, but it’s still the same! :slightly_frowning_face:

Hello,

I am a beginner and not very comfortable with English; I started by testing Home Assistant with a SONOFF Dongle - Zigbee 3.0 USB key (V2) ZBDongle-E, which succeeded.

I now want to test Gladys with that same dongle, but I have a Zigbee2MQTT connection problem, a red cross between MQTT and Zigbee2MQTT.

I tried to follow some of the advice above here but without success, my Raspberry is reporting: Bullseye, I did not follow the instructions: Docker | Zigbee2MQTT

So I wonder if my dongle is being used by Home Assistant — shouldn’t it be reset? If so, is the solution to reflash it or to use the reset button?

Thanks for your help

Above all, you need to make sure your dongle isn’t being used at the same time by HA, otherwise it can’t be used by Gladys! :slight_smile: Is that the case in your setup?

Otherwise you can check the logs of the Zigbee2mqtt container if you want to understand what’s going wrong!

Still the same issue, however
1- Sonoff dongle plugged into a self-powered USB

Gladys only creates the container; if it restarts in a loop, there is either a configuration problem or a dongle problem.

Hello @pierre-gilles,

First of all, Happy New Year :tada:

Thanks for the reply — indeed my dongle is not used by Home Assistant (HA) at the same time; my two instances are on different SD cards that I swap on my Pi.

For the container logs, can I see them on the Gladys interface? Otherwise, could you tell me where to view them and the commands?

Thanks in advance

Hi @gaelbillon! Happy New Year to you too :slight_smile:

For the container logs, I’m quoting @cicoub13:

This will be in the CLI on your Raspberry Pi

docker logs gladys-z2m-zigbee2mqtt

For later, I wonder if there is a way to retrieve the MQTT connection error to display it in Gladys? cc @AlexTrovato @cicoub13

For clarity, I installed my Gladys instance by flashing it directly onto the SD, not via Docker from Linux — is it possible to return to a Linux graphical interface?

Otherwise, here is what the log command returns to me:

The classic « SYS - ping after 6000ms » ^^

Several possible issues:

  • Wrong USB port selected?
  • Power issue. Your Pi may not necessarily have enough power to run the dongle plus something else in parallel (e.g., external drive). Check that your Pi is properly powered, and if you have an external drive, try using a powered USB hub
  • Firmware bug on your Zigbee dongle. It happens, and in that case installing the latest firmware version is a good solution

In any case, you have all the troubleshooting leads on the Zigbee2mqtt website. As a reminder, Zigbee2mqtt is an independent project from Gladys — we only launch the container in Gladys, then everything is managed by that project!

The documentation for this error:

https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html#error-srsp-sys-ping-after-6000ms

1 Like

Thank you very much for the help; I will continue to look into that.

1 Like