[RELEASE] Device Activity Check - Get notifications for "inactive" devices

All,

I've released version 2.3 with the following changes:

  • Added search to device list for groups (thanks to @jtp10181 for suggesting this)
  • Added LAN and cloud report page options mentioned above, technically added in v2.2 that was never put in HPM, so it may be new to lots of people. Using these options requires OAuth. See the ReadMe in GitHub if you are not sure how to enable this, or you may keep using the app as-is without doing so.
8 Likes

In the notification is there any way to separate out/group the battery percentages from the inactivity in the list? Thanks.

In the same instance,no; you can, however, create as many as you want.

1 Like

I have two separate groups already. One for battery percentage and another for inactivity. Can I send two separate notifications at different times to separate them from each other?

Sorry for any confusion; I meant separate app instances, not groups. This is not possible within the same app instance. However, you can install multiple instances of the app, each with entirely different configuration, which may suit your needs

2 Likes

Separate app instances will work for my use case. Thank you for the clarification.

Hi,

I've found this thread from searching on "lastActivityTime". I recently ran into an issue with a zigbee contact switch using a driver someone contributed "Xiaomi Aqara Mijia Sensors and Switches".

TLDR: it has a "presence" check that runs every N hours, and this was fooling my app into thinking the device (with dead batter) was still having daily activity

Is there a better field to use for checking the last time communication came from the battery powered device?

Also, apologies if this app here already does this, I looked at the source for this app here and saw it using

dev.getLastActivity()?.getTime()

I'm using

it.device.lastActivityTime.getTime()

which looks like the same thing?

Here was the log that fooled me:

And here is the device option for "presence" check

If this driver is by an author who is no longer maintaining their drivers (and was well known for using this attribute for that purpose), I'd suggest moving to a different driver if you can.

But either way, this app can work. You, of course, can't use the "Last Activity At"-based detection method, but you can use the "presence attribute" option for that group instead. (Each group has options for how you want to monitor the devices.)

I use the device activity checker for a lot of devices but for devices like the aqara that have a presence in the driver, I simply use the notifier app to let me know if a sensor goes “not present”.

Thanks, makes sense. I decided to just turn off this "presence" option in the device (as seen in the graphic actually) and then I can use lastActivityAt again.

Actually in the end I gave up on this zigbee door contact as it's just a very small battery and went with a zwave contact sensor instead.

Would it be easy to add an option to turn on or off a device within a group when a notification is sent out? I would like to use a device to indicate when batteries are low or devices haven't respond to display on my dashboard. Thanks.

Not too hard -- I've thought about this before -- but there are some issues/questions surrounding it that make it more complex than it might initially seem be:

  • like its name, the app just "checks" things on your schedule but doesn't "monitor" anything on its own, so a switch being on or off doesn't necessarily tell you anything about right now (though I certainly understand how it might be useful to some extent)
  • what turns the switch back off? (the next time there could be a notification but wasn't? should previewing/manually viewing the current report page also do either of these things?)

But I'm happy to try something if anyone finds it useful -- just not sure what people are expecting for any of the above.

All good questions. Here is how I would envision it works:

For each group you have the option of specifying a virtual switch, or the app creates a virtual switch. The app checks the group as it does now at the specified time. If the group triggers the alert then it turns the switch on. The next time the app checks, if there is no trigger event then it turns the switch off.

Since it is a virtual switch - if I resolve the condition I can easily turn the switch off manually before it checks again if needed. For example - replacing batteries.

One switch per group vs. one for the app would make sense. This would provide the ability to have a switch alerting to battery conditions, no response to activity check, etc.

1 Like

An added bonus would be to add a text field to the virtual device to store the report. Then when the device is triggered the text field could be used to display the report to indicate which device is the problem on touchscreens.

1 Like

This seems like a reasonable approach and is more or less what I was thinking, just wasn't sure if it made sense to others. Though the per-group thing is going to take more effort than one for the whole app. :smiley: (You can create multiple instances of the parent app if you want, if you weren't aware -- though this was, of course, one of the things that prompted me to write the app in the fist place...)

This was a feature I contemplated originally but has never actually been requested until now, at least in some form or another:

In the time since I wrote that, this would also be do-able with a string hub variable, though a custom device (or maybe virtual omni device or something else that has what's needed) would also work. The format also doesn't need to be HTML as I suggested above, though at the time that is what some users used on Attribute tiles since Dashboard 1.x can render them.

Running multiple instances of the app is not a problem. I do that with some other apps right now. But obviously cleaner if it runs within the groups of the app.

I was assuming text for the information string, although html is nice as it could format as a list, etc.

I use Sharptools for all of my touchscreens. They created a custom virtual device that I use variants of for passing certain information back and forth beyond normal device activity:

One option might be to let the user create the device and point to it in the app. If you were to create the virtual device in the app presumably it would require creating a new virtual device driver to accommodate the switch and the text?

Assuming this is the question: go into Apps Code, find Device Activity Check, and enable OAuth -- or ignore and just don't use the LAN or cloud report page feature, which is all this is needed for (the in-app report page will still work).

Love the new links because I’m able to snooze battery devices that have died on me. (Since I have a bunch of devices such as SmartThings motion sensors that report 0% for weeks, I just let them die and use DAC to know when to replace the batteries.) These are at my 2nd home and it may be days or weeks until I can replace the batteries, so the easy snooze is great without having to log into remote admin and access the app.

I have the cloud link added to my dashboard, so i can access it there, but it would be great if I could access the link directly from a notification. Is it possible to add an option to include the cloud link in the notification, or do links not natively work in notifications? If not, would it be possible to add a text box to append custom text to the notification? I use Pushover Notifications Driver [Slightly Enhanced] which allows me to add links to my notifications using plain text, so that would work for users like me to add a link in the notification.

Thanks for your work and for considering this option!

I don't think anything like this is possible with the native notifications, or at least it looks like adding a URL to the push notification text does not automatically make it become a hyperlink. Does Pushover work differently, or does it require special formatting in the notification to make this happen? This should be do-able with some option if so.