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

This looks like another sweet app :slight_smile:

I decided to create a second instance of the app so I could have one that ran fairly frequently (I want to know pretty soon if power has gone out in my garage) and another that runs no more than daily to tell me when my battery devices are in dire straits.

The second app doesn't recognize the OAUTH that was (automatically) set when I installed the first instance via HPM. Thoughts?

Thanks!

Not sure, but with the UI changes, there may be changes that HPM hasn't caught up with yet. I'm not even sure enabling it works if you do it manually now (I'm fairly positive it didn't at one time during beta), which could ultimately be the cause of all of this -- but is a workaround you should be able to complete yourself if so.

The app logic should be pretty well tested for this, assuming you hit "Done" and verified after you went back in. So, if that's not happening, something else is going on...

Ah, that was it--doing the "Done" and going back in fixed it. I just jumped the gun a smidge. Sorry!

One thought: Had you considered putting the "thing to monitor" above the "Device selection"?

When selecting, for example, "Battery level", that changed the devices available--which kinda tripped me up at first. Thx!

Safe to say I hadn't (anything other than "Last Activity At" was really an afterthought), but might not be. bad idea. :slight_smile:

1 Like

@bertabcd1234

I've been using your app for a long time.. I just updated my hubs to
2.4.0.146 a few days ago and 147 today... 145 was working fine, but on 146 and 147, refresh inside your app is no longer working on z-wave and zigbee devices... refresh from the device page does work... any ideas?

Do you see the command being sent? Depending on the driver, debug logs may show, if enabled; otherwise "Events" should (look for commands there, not events). Maybe additional wait time is needed before checking?

I always patch the app with additional wait time (and a few other fixes), I found it is more reliable with less false reports this way: Comparing RMoRobert:master...jtp10181:dac-patches · RMoRobert/Hubitat · GitHub

1 Like

Ok, yes, the command was being sent in the logs... But it didn't seem to actually refresh... Been not working for days now starting with when I updated the hub firmware... I run daily checks and that was when it stopped working...

After doing a few devices on my list manually, all of a sudden the app is working again. So it had something to do with the firmware... For whatever reason, now its not a problem... Like somehow I kicked it loose by doing the individual refreshes... :man_shrugging:

I have been running the “Device Activity Check” for a while now, and it has been working great. That is until this past 7-10 days.

Recently I have been getting notified of large numbers of devices being reported as failed. The problem appears to be that the “Refresh” command being sent by Activity Checker is being ignored by the device.

If I send a “Refresh” command from the device page, the Last Active time will update.

I reverted to an older HE version, to verify if a recent update caused the problem, but it is still happening. My screenshots were taken while running 2.3.9.201. I am now back on 2.4.1.103

I had previously modified the code to extend the wait-time , so I recently reloaded the App code to eliminate the possibility that I had caused the problem.

1st screenshot, from the device page, you can see the Last Activity at 13:59 hours.

2nd screenshot also shows 13:59 hours on the device log.

3rd screenshot (from the "events" tab) shows that Activity Checker sent the refresh command several times after 13:59, but apparently those command had no effect.

4th screenshot shows that If I click on the “Refresh” button on the device page, the device log immediately updates the Last Activity time.

This seems to match the problem @SuperDupe began to experience, at around the same timeframe.

1stScreenshot From Device Page

======================================================================

2nd Screenshot From Device Log
HECurrentLog

==============================================================

3rd Screenshot Showing Activity Checker Had Sent the Refresh Command Several Times After 13:59 with no Effect

====================================================================

4th Screenshot After Clicking Refresh on Device Page

I'm not clear if you still increased the interval manually. Did that work? Or does it still work if you can go longer?

I'm really not sure what else I can try, as the solution to this problem in the past was scheduling a check in the future (via runIn()) so the app was running a "new" instance by the time it checked again, which I assume eliminated issues if it was working with a cached device. But since it's already doing that now, I can't think of anything besides the above...

I also don't really like that I ever put in this feature, FWIW. :slight_smile: I'd generally just recommended a longer interval or considering if the device itself is a good candidate (e.g., it's qjite unlikely an in-wall dimmer is just going to "fall off" your network, whereas a sensor battery dying at some point is quite likely).

1 Like

When I first installed the app 6 months ago I had to increase the wait-time to get good results. I don't think the wait-time is the issue now, since the event log shows several refreshes being sent over a period of hours, and still the last activity time does not update.

This would appear to be a Hubitat issue, and that is why I reverted to an older firmware which I knew had worked in the past. I can't recall if there have been any recent updates to Activity Checker, because sometimes I perform updates in HPM without thinking about it.

Because of this, I was not expecting an easy resolution to the problem. I just felt I should post my findings after seeing someone else experiencing the same issues at the same time. I thought the screenshots would make the problem description easier to understand.

BTW, I consider Activity Checker an excellent app, and I think the multiple features you included make it more customizable for each individual. Hopefully it will also return to normal operation by itself as it did for @SuperDupe

Thanks for your reply.

Do you mean on the device itself? (Check the device detail page/flyout rather than the app, just in case.) If so, that certainly does seeem like a platform issue, certainly nothing the app could be doing -- but "platform" could be as simple as "driver" if it's only affecting specific devices. If you're able to figure anything out there, e.g., that it's only certain ones, I can take a look!

Yes, the Last Activity as reported on the device page, and also on the tabular list of all devices. (see my first screenshot)

It is occurring on every device that previously accepted the Refresh command from Activity Checker. Although about 25% of the devices do respond on some attempts , and yet fail on other occasions.

No drivers were changed on the affected devices.

I realize that this is difficult to diagnose, because we seem to have eliminated both the HE version, and your app, as being responsible.

Thank you for your offer to assist. If I discover any other clues I will post them here.

Have you tried doing a full shutdown.

Then disconnecting the power for a few minutes.

Then plugging it back in?

That can fix some weird z-wave issues that a simple reboot won't.

I have rebooted several times, including the time I reverted back to an older HE version, and then again when I returned to the most recent version. But I have never powered down the hub. I will try that in the morning.

I don't think it could be a Z-Wave issue, since the device usually responds immediately when I issue the refresh command from the device page.

I have added a couple of new apps around the time this started (E.g. Remote Builder), and I was wondering if this may have slowed down the hub. Could it be that Device Activity Check sends out the multiple refresh commands faster than the hub can keep up. I don't think the wait-time value affects the transmission rate, only the time period before the last activity times are reevaluated.

Whenever anything z-wave isn't working right, do the full power off, wait, power on.

Just do it. It only takes 5-10 minutes.

It might not fix things, but it often does and is a key preliminary step in troubleshooting.

Thank you for the suggestion. I did a proper shutdown, and then removed the USB-C connector from the hub for 25 minutes. Unfortunately the problem remained after restarting.

Although it doesn't seem likely that Device Activity Check can be causing the problem (because the logs show it sent the refresh command), I think the next logical step would be to uninstall and reinstall the App.

It might take 1-2 days before I can do that, but I will post an update when/if I find a solution.

Be sure debug logging is on for the devices and the app. The z-wave logs on the hub, however, don't show all the traffic. If you're seeing the refresh commands being sent in the main logs, no clue why they'd stop working.

I've got a secondary USB z-wave controller I can use to monitor all the z-wave traffic and see what's really happening.

From what you're saying, it's more like the response from the devices isn't getting back to the hub (or the devices ignore the refresh). Battery devices often don't respond to them.

You could try doing a z-wave repair on one or two devices to make sure they are taking properly (you might need to wake up battery devices to do that.

Debugging, once you get past the easy stuff can get annoying. Lol

Good luck

If "Last Activity At" on the device detail page (the page/flyover, not data as reported in the DAC app itself) isn't updating, I don't see any way this could possibly help -- just to save you the hassle of trying! The app simply reads this data on the device. It is not settable by any means other than whatever the platform does, e.g., when events are generated.

That being said, it also can't hurt...

2 Likes