Yesterday, my Zigbee devices (Zigbee2MQTT) stopped saving data. Can somebody please help me?
System:
Home Assistant OS
Home Assistant 2023.3.3
Supervisor 2023.03.1
Operating System 9.5
Raspberry Pi 4
Zigbee2MQTT 1.30.2-1
Notes:
I can still control my Z2M lights from the exposes menu, but not the Home Assistant dashboard.
Using MQTT Explorer, I can see that the data sent from my Zigbee devices is still reaching my MQTT broker, which is on my Home Assistant hardware (RPi4).
Using the Zigbee2MQTT Exposes menu for my devices, I can see the data still updating.
Zigbee2MQTT logs, while set to debug, donāt show anything that I can see is useful. Although, I donāt know what to look for.
Iāve already tried restarting Home Assistant.
All of my Z2M devices on the dashboard show this warning when I click on them. This entity is no longer being provided by the MQTT integration. If the entity is no longer in use, delete it in settings.
The only thing I can think of that broke this was that I updated from Home Assistant 2023.3.1 to 2023.3.3 last night. But I canāt find in the logs what time I did that so that I can compare it to the time I lost my devices.
How can I diagnose and fix this issue? Where do I start?
Iām a new user of zigbee2mqtt, so am on a learning curve, but the log warning would seem to me that HA is not getting the zigbee2mqtt MQTT auto-discovery messages after HA starts up. These auto-discovery messages are generally published by zigbee2mqtt with the retain flag. This means that when HA starts up, the MQTT broker is the one that provides these auto-discovery messages when HA goes back on-line after a reboot. It sounds like the MQTT broker is working fine as the zigbee2mqtt frontend (UI) is able to control the lights as it uses MQTT to talk the the zigbee2mqtt backend (core software).
So, Iām wondering if HA is actually able to communicate with your MQTT broker?
Probably a quick check is to go to Settings->Integrations/Devices, click on Devices tab and choose one of your zigbee2mqtt devices. At the Device page, you should see āDevice Infoā and on that you should see āMQTT Infoā, so click on it. You should see something saying āxxx most recently received messagesā, click on it to see what the timestamps are on those messages to see if they have occurred since you last rebooted HA.
I am also facing the same issue after updating to Home Assistant 2023.3.3.
No HA is not able to communication with MQTT broker. After going to Settings->Integrations/Devices, click on Devices tab and choose one of your zigbee2mqtt devices. At the Device page, āDevice Infoā and āMQTT Infoā do not show recent states of the device since update.
I can still control my Z2M lights from the exposes menu, but not the Home Assistant dashboard.
I fixed my setup. No amount of reboots worked, but what did work was stopping the MQTT broker and Zigbee2MQTT addons.
Confirm that they have stopped, then start the broker first, make sure you leave enough time for the broker to come back online, and then start Z2M.
Iām guessing the delay between the MQTT broker coming back up and Z2M starting is what fixed the problem because Iād expect most other things to be fixed by the full hardware restart.
You might want to check and see if the ZHA integration would work for your zigbee devices. Itās always seemed like a clearer solution for integrating zigbee devices to me. Zigbee2MQTT requires two additional container, itself and MQTT. ZHA is simply an integration in the HA core. Just something to thing about.
I had a similar problem since the update. The MQTT broker had its āStart On Bootā button disabled.
The MQTT āINFOā page was accessed through the Add-Ons page, I was not finding the page because I was trying to open it in integrations. I found the inf page by accident.
Everything worked when I slid the button to Start on boot. After excellent advice on the forumā¦
Note for BKPRATH: I was pleased with ZHA but I am using custom Zigbee PH and CO2 sensors that I purchased from ALAB on Tindie. They need z2mqtt. It must be a licensing thing?
Thanks Brian.
Zigbee2MQTT supports more devices, makes it easy to add support for new devices, and more importantly, makes it easy for me to connect my own custom hardware/firmware.
I do appreciate the suggestion though, and Iāll keep checking ZHA for compatibility because one day I hope to switch.
Home Assistant 2023.2.5
Supervisor 2023.08.3
Operating System 9.5
Frontend 20230202.0 - latest
Also two add-ons: Mosquitto broker, version: 6.3.1;
Zigbee2MQTT, version: 1.33.0-1
I can control devices from Z2M side panel/page, however I canāt control them from Devices/Dashboard panels - switch controls are grayed out and instead of device properties, like temp/humidity/watts/kwh it shows āMQTT sensorā in every line:
Starting Mosquitto, waiting until itās successfully booted, and then starting Z2M?
Or starting Mosquitto together after theyāve been stopped for 2-3 minutes?
Does not matter right now because I uninstalled and deleted every add-on except Terminal, deleted db, upgraded OS and supervisor, and started adding everything from scratch.
Took 2 days and it is working now but the weird issue with the Sonoff zigbee buttons is that in the Automation long press option has disappeared, only single and double presses are there. Anyone knows how to fix?
I have the same issue.
I had it a few months ago also that time it worked to stop both, mqtt broker and zigbee2mqtt, indeed but this time it isnāt the solution.
I reconfigured the mqtt integration from scratch in Home Assistant but that doesnāt solve it.
I also removed old device_trackers but no luck yet.
As an update to this issue, on my end I solved the problem by simply updating Home Assistant (Docker) to the latest version as of today, 2023.10.5. I already had the latest zigbee2mqtt version, namely 1.33.1, so the fix was just an easy update to HA. For those wondering:
As a followup to this, nothing Iāve been able to do has allowed me to run the latest version of Z2M, which of course I want to be able to continue to update for features, firmware updates, and security.
Untilā¦
I was looking into whether mosquitto was possibly causing issues, and found it to be so.