A way check offline/online status of devices

Hi folks. Although I’ve had a Hubitat device for a while now I’m just coming round to setting it up after I’ve hit a device limit on my Smartthings hub.

I’m looking for a way to monitor if a device goes offline and alerts me. I had this working well within ST.

I’ve installed the wonderful device activity check app on Hubitat but I’ve noticed that some devices like my ST open/close sensors and my ST motion sensors do not report a health status attribute.

Is there any other way , or app to allow me to get notified if these devices go offline?

Thanks.

The healthStatus attribute is used by some of the community drivers. HE stock drivers do not support it. But, it is actually useful if you have some more complex RM5 or WebCoRE rules, where the logic flow can be split depending on whether the device is offline or online to the hub.

The Device Activity Check app also works with the 'Last Activity' property of each device, and this is a much more universal approach. So the 'device is offline' notifications should be fired after the pre-configured hours without receiving anything from the device.

2 Likes

To add to @kkossev 's point about the Device Activity Check, if your Smartthings / Aeotec contact sensors are like mine and report temperature, then this should mean they will report regularly enough for this to be a reliable* indicator for these types of devices.

I say reliable, as with many things like this, there are some caveats. A device may not produce any activity for a variety of reasons, such as a dead battery, a faulty device, poor comm's due to say a bad repeater, issues more generally with the mesh, etc. Similarly, some devices do not always report regular activity, like temperature, humidity or lux, so if they are located in a part of the home that is only used infrequently, checking for X hours of inactivity may produce unnecessary noise.

So while a notification / alert is still likely something worth investigating, it's good to understand what kind of device you are dealing with, how it is being used and the best way to monitor it (if at all).

1 Like

Thanks guys.
I assumed the last activity report would send a notification if there was actually no activity, like motion, or open/close sensor didn’t open within a certain time period?
I obviously don’t want that as there may not be motion for days on a device for example, so o don’t want notified on that. Only if it’s offline.

Good shout on the temperature setting. I suppose I could use that as a gauge of something is offline.

Problem is, some things don’t have a temperature sensor so I can’t use this way for all my devices. Hmm

The battery-powered sensors periodically report the battery percentage remaining (even if it has been 100% for a long time)—this updates the device's 'LastActivity' property, and the Device Activity Check app will consider it to have an online status.

The mains-powered devices usually send some check-in or keep-alive messages to the coordinator, so their LastActivity property is also kept updated.

1 Like

In the end, for some devices, it can simply be a case of trying one thing, seeing how its goes, and trying another if need be. And of course posting here to get learn from other peoples experiences... :slight_smile:

Thanks.
Really struggling here on the best way to achieve what I want.

So I’ve only currently added 3 devices into Hubitat so far to test.

1 x ST open/close sensor. ( this has temp sensor )

1 x 1st gen ST motion sensor ( one with 2450 battery) ( this doesn’t have temp sensor or health status )

1 x Xiaomi motion sensor. ( this has health status )

If I wanted to have Hubitat notify me if any of these devices went offline and I’d like notified every 12 hours, what’s the best way to achieve this.

Thanks.

The first custom app to install in habitat should be the Hubitat Package Manager (HPM). Use HPM to install the Device Activity Check app, and then configure the three devices there.

1 Like

I’ve added that app. This is the app I’m talking about.
Just unsure on what settings to input in order to achieve what I’m wanting.

Start with 'Last Activity At' timestamp as a monitoring criteria :

For the Xiaomi sensor, you can make a second group, based on the healthStatus :

1 Like

Thank you. I’ll try it out.

Do you use webCoRE?
I use WC to check the health status/presence (depending on the driver used) every 2 hours.
Here is the piston to check the device which is actioned by a different piston. I've done it this way so if I want to change the check interval, I only need to change one piston, not 20.

Piston

1 Like

Thanks, yes I’ve used WC in the past with ST, until
They killed it. I suppose I could look into that too.
Thanks

1 Like

@user2228

Device activity check. (Use HPM to install, works great)