Some Zigbee2MQTT Devices Lost Their Connection to Home Assistant

I’m running into an odd problem with Zigbee2MQTT. Some of my devices (three Hue bulbs, one Ikea bulb, and three smart plugs) aren’t responding or reporting to Home Assistant anymore. When I go to the Entity page, they show as Unavailable with the message “This entity is no longer being provided by the mqtt integration. If the entity is no longer in use, delete it in settings.”

If I go to the Zigbee2MQTT add-on, I can still control these devices just fine. When I rename them in Zigbee2MQTT and check the “Update Home Assistant entity ID” box, the home assistant entity ID doesn’t update. So it seems like the integration between Z2M and Home Assistant is broken.

All of my zigbee sensors are still working fine, it only seems to affect smart plugs and lightbulbs (all categorized as lights to HA).

Any suggestions?

3 Likes

I should add that I checked with MQTT Explorer, and all of the malfunctioning devices are being published over MQTT. So the issue is somewhere on the Home Assistant uptake side.

2 Likes

I have the same issue. It usually happens after updates (either OS/docker related or HA core and/or addons).
It’s always the same 4 IKEA bulbs and IKEA blinds for me that become unavailable in MQTT like you described it. All other Zigbee entities stay active.

All those “unavaiable” entties are available and also controllable in Z2M at the same time!

Workaround for me: restarting the MQTT add-on. I have to do this at least once a week. It’s annoying.

1 Like

Hi, same issue here. Started happening yesterday after updating Z2M to latest. Never happened before. Is this a bug with the latest Z2M or has anyone made inroads with getting to the bottom of this?

I have excatly the same issue as the OP, but with 70+ IKEA bulbs and it means all the smart lighting via HA is broken in our home :frowning: Of course the manual wall switches still work, but controlling the lights via Z2M directly without HA control is a major pita.

What changed a couple of days ago?

I only recently switched to Z2M over MQTT and discovered that in communication with my Aqara E1 thermostats somehow state changes are not transfered between Z2M and HA.
E.g. HA changes the temperature and thinks it is changed while it isn’t, or HA does not reflect changes done directly on the device. All works fine directly from the Z2M UI. Could this be a similar problem?

Hi there, I also ran into the same problem yesterday.
Devices are available and controllable from the Z2M interface, but the MQTT integration says that those entities are unavailable.
In my case 2 Hue lights and one Ikea light are affected, as well as a Moes valve controller (thermo).

Did not happen for a few weeks and I was hoping it was solved. But then happened again two days ago as well.
I set all updates (core & addons) to manual to be able to identify if and what update would cause this. No updates were done when it happened, so as far as I can tell it was not related to any update.

Restarting the MQTT addon also did not help this time, I had to reboot the VM.

I updated zigbee2mqtt yesterday from 1.30.4 to 1.34.0 and also got this behavior. Got nuts since I did not noticed it immediately and started to repair one bulb. This morning I saw that all devices which can be controlled with on off were not available for switching state. Tried everything and thought it was an mqtt (mosquito) problem so also updated mosquito. But other mqtt devices worked fine.

I just updated my z2mqtt container (I am running docker) to the previous version. Everything works fine again.

Except for my new motion sensor which requires an update from z2mqtt.

I’m seeing this as well, from other posts I’ve read (I’ll have to hunt them down) it supposedly has something to do with zigbee2MQTT trying to start before MQTT Broker is fully running.

I’ve killed Z2M and MQTT Broker manually, then starting broker, waiting a while, then starting Z2M. This seems to let Z2M pick up some of the “disconnected” devices, but not all of them.

What does work reliably to fix them is incredibly stupid and tedious:

  • Open Z2M → Devices, find the device in question
  • Select “Rename device”
  • Make any change to the description (add a space, remove a space), then select “Save Description”

This seems to kick Z2M in the butt and get things going again, but you have to do it for every device.

I haven’t had the time to learn how to snoop on MQTT to see exactly what is being published when those changes are made, but to me the behavior appears to be purely on the Z2M side.

3 Likes

I’m having the same type of issue described here. I’ve done the whole restart z2m and mqtt thing, sometimes it works, sometimes it doesn’t. I just tried @diphen’s suggestion to edit the description in Z2M. I only had to edit the description of 1 of the devices that wasn’t working and the rest kicked on all of a sudden.

I still have no idea why the entities go unavailable sometimes, and I haven’t seen anything useful in the logs, but at least this might help in the future if they don’t come back on with a quick reload of the MQTT integration.