Checking (Zigbee) devices are accessible with polling

Hi All,

This is a question about how best to to create a positive checks that devices on a Zigbee network are reachable, to protect against power failures, possibly by polling.

I’ve just set up a HassOS system using a Raspberry Pi, Zigbee2MQTT, and a Zigbee network based on a cc2531 coordinator and router. The Zigbee router is extending the Zigbee network into my workshop at the end of the garden, and necessarily runs off power in the workshop. I’ve created a simple intruder alarm system for the workshop using door sensors that will trigger an HA automation that will wake me up if triggered.

However, I was concerned that an intruder would be likely to cut the power line going to the workshop, which is easy to do, and would stop the door sensors reaching the zigbee coordinator. To protect against this I’ve created a pair of automations: one to poll the state of a bulb in the workshop every 10 seconds, and another to check that the “last_seen” timestamp of that bulb is within 25 seconds of now.

This seems to work ok, but the polling request generates lots of annoying noise in the HA log every 10 seconds. To solve this I’m considering ditching HassOS in favour of running HA as a container on Ubuntu allowing me to replace the polling automation with a OS level script to repeatedly write to MQTT to poll the state of the bulb instead.

I’m now wondering:
a) whether anyone has any suggestions of improvements that can be made to this setup
b) how have others handled the need to proactively check that a network is reachable
c) whether its possible to poll inside HassOS without writing to the log.

Thanks in advance for your thoughts, and a happy new year.
Mike

Would it not be easier to connect the coordinator to an UPS (could be a simple portable charger), and then create a DIY Zigbee power outage sensor, like this?

1 Like

That would be making the system more resilient, sure. But I don’t want to rely just on resilience.
It could be disabled by other means, eg, the workshop needs an external antenna for the ZB router, since the workshop itself is made of steel and acts as a faraday cage. Ripping off the antenna would be as easy as cutting the power, and would disable the system as effectively.

So I’d still prefer to have a proactive health check.

Thanks for the suggestion though. Although I don’t think it works in this case, it’s a cute approach to power failure detection.