Sonoff switch seen by Z2MQTT but not by UI

Hey, new Home Assistant user here so I hope this isn’t a stilly q. About a week ago I set up a Sonoff ZBMINI to control a bathroom ventilation fan, and set up an automation that turned the ZBMINI on/off based on the on/off status of a Hue light in the bathroom. This has been working great until today.

As of right now, the ZBMINI is still seen by Z2MQTT, but is not available in the UI or triggered by my automation. As in, if I load the switch in Z2MQTT and go to the Exposes tab, I can manually toggle the switch and it displays the link quality (which maybe is a bit low… around 20-30). However, when I go to the home assistant Overview, where it also shows my switch, the toggle is greyed out and I am unable to control it (this was not the case a few days ago when I set everything up).

What would cause this kind of issue? Home Assistant can obviously find the device since I can control it directly from the Zigbee2MQTT tab, so I can’t understand why it’s now unseen by the Overview tab and unavailable to my automations. I’ve already tried removing the ZBMINI device and re-pairing it, but the behavior remained the same.

Have a look in your entity list and check there isn’t one similar but with _2 on the end…

I only see the one item in my Entities list, with a red “Unavailable” exclamation point for the status.

This is what I see in the Z2MQTT interface:

FYI, zigbee2mqtt runs in docker as an add-on. This means just because you can control it through Z2M, does in fact NOT automatically mean Home Assistant can find the device. For instance, it’s possible to use Node-RED (which also runs in docker as an add-on) and directly communicate to zigbee2mqtt. This way automations from Node-RED still work when Home Assistant Core (Server) is restarting. The way Z2M is setup, it normally does push the device to HA, but it’s not a guarantee just because Z2M sees it, that HA can’t have issues is my point.

In any case, in your screenshot you only show how it looks though zigbee2mqtt page, which you have no issues with. So perhaps also show a screenshot of your entities page in HA, since you seem to have an issue there, so we can compare :wink:

Did you change the entity name through HA? If so, then the names will not be the same which can cause issues when re-adding devices or when they get bugged. Because Z2M uses its default name (its IEE address as name) judging by your screenshot. My advice is to ALWAYS change the name through Z2M ONLY and select the option: Update Home Assistant entity ID. This way you prevent names from diverging through both systems.

image

Thanks for that detail @ASNNetworks … makes sense as far as visibility goes.

I just manually restarted only the zigbee2mqtt add-on, and that seems to have resolved the issue - the status now correctly displays on my Overview page, and both this UI toggle and my automation are functioning:

I’ll keep that in mind regarding the renaming - the first time around I had left the update option unchecked.

I had already tried rebooting home assistant entirely (and also installed an available update) - so not sure why manually restarting just the Z2M add-on was the solution, but I’ll take it ¯_(ツ)_/¯

If you rebooted/updated Home Assistant Core (Server), then it’s exactly like I explained. Z2M runs is docker and is unaffected by HA Core. So restarting Core, does not reboot Z2M, it keeps working/running and can even control your devices while HA Core is down. Which is why restarting the add-on fixed it, since before Z2M just kept running.

If you rebooted your actual host machine, so not just HA software, then it is strange (kinda impossible, so I suspect you did the above thing).

Anyhow, glad you got it working again :slight_smile: