Battery Devices offline check

As much as I try to not use battery powered zigbee devices, sometimes there's nothing else available. The battery level status is useless. I've had 40% battery showing, and it goes dead... Offline... no response. My dashboard icon doesn't give any indication something is wrong.
I caught this because the temp attribute goes to a graph, and the graph didn't show that data.
So I started looking for a way to notify me if a device has not responded.
I wrote a webcore piston to look at the last activity it reported in, and that works great, however. That isn't as reliable as I'd hoped. Last activity doesn't update either. I have a trigger time set to 24hrs if a device does update it's status. I poll 12 devices status every 6 hours, so if the device updates, I'd catch it. You'd think a device would check in at least once a day. Not so.
Does anyone have any ideas I could add in? If I refresh each device, how much time should I allow? Maybe refresh a device that hasn't updated it's last activity?
TIA

If you go to Settings->Zigbee Details, what is the 'Last Message' timestamp for this device?
What make/model is it ?

This depends on the device and driver. I'm also wondering the above, what make and model is this device?

At least a few seconds for one device, but longer doesn't hurt (you could go minutes or even longer--it doesn't really matter if your threshold isn't lower than that). Doing this on only devices that might "need" it is indeed likely better, as it reduces traffic on your network and using more power from devices that don't need to do it.

But keep in mind that not all battery-powered devices will respond to a refresh. In my experience, most major-name Zigbee products do (CentraLite, SmartThings-branded products, Iris-branded products, etc.), whereas some cheaper brands don't (Ikea, Sonoff, etc.), but this will likely depend on the device and possibly driver. You only mentioned Zigbee, but for Z-Wave, almost none will unless they are "FLiRS" devices like locks, blinds, or similar devices that need to respond to commands from the hub while being battery powered.

I did write an app to make this easier, including refreshing: [RELEASE] Device Activity Check - Get notifications for "inactive" devices. However, it still won't help you if your devices don't "report in" on a regular interval; the problem with any approach is that you need to know what's normal for your devices in terms of Last Activity At data, and many devices don't have reliable/predictable behavior in this regard.

But it's still probably better than battery level. :smiley:

If you are looking for a dashboard visual check then you could use Tile Builder Activity Monitor for your battery devices.
image

As you can see I need to replace the battery in my mailbox despite the fact that particular device always dies claiming to be at 100%.

You can set your own threshold to only show devices without activity in the last X hours.

The problem device was a Samsung SmartThings Pushbutton. As it turns out, the battery was indicating 40%, but in reality, it was marginal, when I posted this. It was right on the verge of dying, so the responses were erratic. I know now, that refreshing is required when a device doesn't update last activity within 24hrs. I'll post the piston below.

Thanks. I basically do the same thing thru webcore. I'll post the piston below.

Here's an image of the piston, with the actual device names removed.

First I try to audit devices before i buy a few of them. This is largely why I ended up with Ring gen2 gear. They check in regularly for alarm purposes.

Then i use a app callded Device Activity Check. That app checkes when the device was last sent a update. You can create different groups depending on the criticallity of the device and how often it is reasonable for it to send in a update. It works well as long as i don't ignore the pushover message