Power Outage and Zigbee Bulbs

Power Failure - One Solution with CoRE

It looks like the healthPoll() function runs every 5 minutes. It is that which will see the bulb is now on/100 and update things. From the silence on this site, I take it there is nothing in core to run a healthPoll() like function.

Armed with the 5 minute cycle, I wrote a simple script that runs every 5 minutes. It tests if the light level is greater than 99. Why 99? I changed my other scripts to set the light levels to a maximum of 99 so that when there is a power failure, I can detect the bulb is set to 100 and thus a power failure occurred.

Before you begin, turn on Advanced Mode by going into Settings->ExpertFeatures->Expert Mode

FAR from perfect, but a start. It will break if the bulb is connected to a remote. My case is a stationary fixture in the bathroom used as a nightlight triggered by motion sensors. Just wanted to share.

Note since this also depends on the healthPoll() running, it could take 2 cycles or 5-10 minutes for this script to run and your bulb turn off.

Comments and ideas welcome.

1 Like