Zigbee2MQTT devices suddenly became unavaliable

MQTT integration (via z2m) discovered 51 devices, and everything worked fine. I even made a nice ‘dashboard’.

Then suddenly all buttons and sensors became ‘unavailable’.

I checked in z2m - everything is working fine. I checked in MQTTexplorer - all there.

Then I checked in HA: Integrations => MQTT => configure => “listen to topic” and tested a couple of topics (buttons, sensors). Everything is working, messages are received.

But in the device/entity list, all MQTT devices are unavailable.

Tasmota integration (which also uses MQTT, I believe) is working fine, all devices are operational.

Any ideas?

UPD: HA 2022.10, z2m 1.27.2, mosquitto - both latest & and old one (1.6.11), everything running in docker.

UPD: HA connects:

1667079516: New client connected from 10.1.1.1 as 48peH48I7tDPmsnBXpbQhF (p2, c1, k60, u'home-assistant').

Have you tried restarting the z2m addon?

Can you show the logs for the z2m add-on?

As other mqtt devices (Tasmota) are working it points to an issue with z2m.

Other things to try:

Reloading the mqtt integration (3 dot icon).

Restarting Home Assistant.

I’m running HA in docker, so z2m isn’t an add-on, but a container.

I did restart the HA container, many times, and re-configured MQTT integration, also many times. But didn’t think to restart the z2m container because everything was working properly in the z2m web interface.

Restarting the z2m container did bring most of the devices back: plugs with power monitoring now show voltage/wattage, and some (but not all!) motion sensors work. However, no buttons show as online, although some clicks - even from “offline” buttons - get through to HA.

Needless to say, everything is fine in z2m (I check via its web interface) and in MQTTexplorer. So the buttons work, and the messages are being delivered to the MQTT broker.

It looks like a discovery issue with HA. Maybe z2m isn’t publishing everything? I’ll try an older version of it.

Here’s how the z2m log looks; everything is fine, published to MQTT successfully.

Here’s that same button in HA:

The z2m => HA integration page is also nothing special:

All buttons show as “unavailable” in HA, but all - except two in the office - send clicks despite being unavailable!

Hi Eugene,

any progress on your issue? I"m facing the same problem.
2 RPi 4 2GB
Pi 1 with raspbian and managed HA and MQTT in container
Pi 2 with raspbian and Z2M in a container

I was first thinking that Z2M does not send alives or something similar but I am not yet uptospeed with the sw and it possibilities. But it is not that, I see my motion sensors sending their update state in Z2M.
Maybe I will post it also in the discord of DIYblur

current version HA: 2022.9.7 (that i will now update to 10.5)
current version Z2M: 16.17.0 (i think … from portainer)

Mario

I have 60 zigbee devices. Some light switches from time to time became unavailable and became available on their own. Don’t know why.
Battery powered devices had issue with a low battery although it reported battery status 100%. After replacing batteries problem went away.

But to these switches show up in z2m or not? In my case, z2m works fine, and the statuses are delivered to the MQTT broker (Mosquitto in my case) just fine. Also, HA has no problem reading MQTT messages (you can try it manually on the MQTT setup page).

It’s HA that has trouble seeing/interpreting those statuses.

I have 54 Zigbee devices total, according to HA, 50 according to z2m :slight_smile:

All the critical stuff (motion detectors, power monitors) are working, although some show as ‘unavailable’. Just two buttons aren’t working. Don’t know what to do. I just moved everything from pure MQTT to HA, which is a bummer :slight_smile:

Yes they are in z2m. In dashboard sometimes they are show as unavailable but in z2m I can control them. If I switch it on/off in z2m they became available in dashboard.

Are the buttons supported by z2m?

See: https://zigbee.blakadder.com/


Of course, they are supported! They show up in z2m and change status. I used to use them directly from Node-Red by subscribing to an MQTT topic but then decided to integrate HA more fully. Silly me :slight_smile:

Use the Z2M web interface to rename the button and make sure the “Update Home Assistant” switch is on. You can change the name back after this test.

This will force a discovery message to be published.

The discovery messages should be under /homeassistant/button.

Untitled

1 Like

Renamed. It didn’t help:

However, I noticed something: the information for HA is formed, just in a weird place:

homeassistant/device_automation/0x00158d00018755ff/action_triple/config

And here’s all data from MQTTexplorer, filtered by id:

That’s probably the right place. I don’t have any buttons to check.

On the other hand, this IKEA round remote also shows as ‘unavailable’ but works in HA just fine:

please reinstal you z2m with official …please check this video

Why would I want to do that? I don’t use HASSIO, I use docker installation. And my z2m is working properly, as I’ve demonstrated using multiple screenshots. It talks to my devices, communicates with the MQTT broker, and it mostly talks to my HA.

1 Like

Hi Eugene,

I have the same issue and I’m following this thread very closely. Any progress?
I was thinking the the space in de devicenames was the issue but I’m not able to check this theory since is it is a other house.

Mario