H.A - Smart Plug Zigbee - powered down but still up in H.A

Hello !
I’ve just installed HomeAssistant at home on a small RPi4 with docker, I have a Zigbee key connected to it.
I wanted to create an automation by notifying me with the HomeAssistant application when the socket runs out of power.
But when I disconnect the Smart Plug, HomeAssistant stays on the last data received and for it the Smart Plug is still powered.
Isn’t there a TimeOut that defines that the plug is powered down?

Thanks in advance

Tom

If you are lucky your ZigBee devices supports a “availability topic” to show the connect state. In this case you will not see the last value but a “unavailable” instead.

But from my experience with ZigBee it’s not possible to have that “real time” - it will only be detected with a delay when a ZigBee device drops (probably because it only polls in intervals).

If you need something real time I suggest devices with esphome (WiFi) because they support push with the native api.

1 Like

Thanks for your reply.
I’m looking around for information on the product but there isn’t really a manufacturer, it’s noname. The only ref. I have is TS0121_plug (Amazon.fr)
Do you have a brand of plug to recommend or a reference?
I’d like to buy 10 plugs for my house, this one was for testing.
thanks in advance

Are you using ZHA (Zigbee Home Automation - HA’s built in Zigbee support), Zigbee2MQTT, or deCONZ?

All of those handle device availability differently.

However, turning off power to a Zigbee plug will cause you problems with your Zigbee mesh. You should use a WiFi based socket instead.

2 Likes

I’ve tested ZHA, I don’t think it’s great, I’m currently testing Zigbee2mqtt with the MQTT broker, all in docker.

But it says “availability” disabled.
I’m still looking, I think it’s a shame that there isn’t some sort of default timeout and if the zigbee protocol doesn’t give any more info, then it considers the socket to be switched off.

Edit : I just found out how to set the “availability” on zigbee2mqtt, I set a timeout on the “configuration.yaml” file (I didn’t know about this modification), and on the zigbee2mqtt it correctly displays “online” or “offline”.
Now I need to figure out how to display this in HomeAssistant :slight_smile: I’ll look for that.

I use a template sensor and automation.

Thank you!
I don’t know how to install Template because I just started this project.
I’ll do my research on this.
Thanks