[RELEASE] Device Watchdog

*** BPTWorld apps are no longer being developed or maintained. Thanks ***

Introducing 'Device Watchdog'
Keep an eye on your devices and see how long it's been since they checked in.

Features:

Activity Reports:

  • Create Activity reports based on number of hours since the device checked in.
  • If device hasn't check in, an automatic 'refresh' is sent to see if the device will respond
  • Choose whether to show devices that have been Active or Inactive within the set number of hours.
  • Based on 'Last Activity At'

Battery Reports:

  • Create Battery reports based on level.
  • Choose whether to show devices that are Above or Below the set level.

Device Reports:

  • Create Device Status reports to see up to the minute status of devices.
  • Attributes can now be color coded. (Remember, this adds about 30 characters per line)
  • Create a time to run daily.

Activity with Attributes Reports:

  • Create Activity reports including your choice of available attributes.
  • Choose up to 4 attributes to display.

Special Tracker Report:

  • Track devices that do not have a 'last activity' value
  • Based on any attribute!
  • Notify on match

If using the Xiaomi drivers by Markus, all devices need to use the Special Tracking option as they don't utilize 'Last Activity'.

Other Options:

  • Can also flip a switch to get an up to the minute report.
  • Display reports on any Dashboard
  • All report tiles can automatically scroll to save on dashboard real estate!
  • All reports can filter the device name to save on characters
  • Turn on a device is there is something to report
  • Send a push is there is something to report
  • All reports will ignore devices that are 'Disabled'
  • Parent/Child App structure
  • Create as many child apps as needed

Apps can be found on my GitHub or by using Bundle Manager.

When reporting problems...

  • Be sure you are on the latest version. I won't troubleshoot an older version.
  • Turn on debug and screenshot the issue happening in the log. One line or just the error doesn't cut it. I need a log.
  • Post the screenshot of the log with an explanation of the problem.

Thanks


Note: If using Smartly, add this to your CSS within the Dashboard settings.

.tile-primary, .tile-contents{
   height: 100% ;
}
42 Likes

I'm trying this out. First off, awesome work!

A few thoughts -

  1. The battery monitor found a battery that was low, that I didn't know was low. So +1 there. :slight_smile:
  2. The activity monitor found 2 battery devices that were not reporting (don't know why, but I re-added them and they are reporting again). So another +1 there. :slight_smile:

I would say, though, that the setup is a little odd. Just as a suggestion it would be nice if:

  1. There was an "add all" option on both the battery monitor and activity monitor. Would probably be easy on battery, maybe harder on activity?
  2. It supported more/other ways to generate an push notification. On my system the option is blank/no supported items. What are the supported push methods (I assume just pushover, which I don't have setup right now)?

And questions:

  1. I added pretty much every device I have to Activity monitor as a starting point. I noticed there are a number of hardwired switches that haven't reported in a while, but I just tried them and they work fine. Is that normal/expected?
  2. While not needed, does it HURT anything if you accidentally select the same device in multiple categories?

Great feedback and glad to know it's finding problem devices!

For the suggestions...

  1. I'll have to look into an add all option. I haven't seen any apps that offer that, don't know if it's possible.
  2. The only Push notification is Pushover. Will change the wording to make this more clear. I was going to add SMS but there is a limit to that so it just didn't seem worth it. Also, I still need to fix the formatting on the Push message. :sunglasses:

and questions...

  1. For z-wave switches, most don't send a heartbeat. They only send if you turn it on or off and even then they have to be z-wave plus to be considered accurate. A lot of the older z-wave switches don't send anything back even when pushed. So if you have a switch that doesn't get used often, it will eventually make the list even though there is nothing wrong with it.
  2. Nope, doesn't hurt anything just uses extra cycles/time to go through each device.

Thanks

2 Likes

The only apps that have an 'add all' are the built-in apps, so I don't have any code examples to point to.

For instance, if you go to Maker API and go in select devices the first option is "Toggle All ON/OFF".

I would be curious how they do that myself... I have a few apps I'm writing, or have written, that I could use that on...

1 Like

@bptworld

I got this error when I ran an "activity" report, seems pushover doesn't like the blank message?

dev:5002018-12-29 05:30:41.139 pm errordeviceNotification error:[message:cannot be blank, errors:[message cannot be blank], status:0, request:86866e97-d1ae-4d66-b4ab-223eefc6129b]

Perhaps you should add an "all good" message if there are now problems detected to prevent this?

Edit: Seems it's not that the report was blank, perhaps it's a formatting issue?

Hmmm, that's not good. Let me look into it.

1 Like

New version... :grin:

V1.0.2 - 12/29/18 - Changed wording on Push notification option to specify Pushover. Added option to select 'all devices' for Battery Level trigger. Fixed Pushover to send a 'No devices to report' message instead of a blank message.

4 Likes

Solved the error I was seeing with nothing to report! Thanks. Any chance we could get the name of the "child" in the pushover message?

Sure, that's a great idea.

New Version on Github...
V1.0.3 - 12/30/18 - Added 'app child name' to Pushover reports

1 Like

New version on Github...

V1.0.4 - 12/30/18 - Updated to my new color theme.

Just as an aside/follow-up - the WATO child app has a "Toggle all ON/OFF" in its device selection. So now I have a code example of how that is done.

lol, I added that in yesterday... see post #7 :grin:

I had found a post Bruce made a couple of years ago on the ST board.

I saw that. And thank you!

It seems there is a few different ways to do/expose this. On some implementations there is a toggle switch (like you did it), on others the first option in the device drop down list is the toggle all on/off.

I haven't compared the code yet to see if it is done the same way and just exposed differently, or if the code is different.

1 Like

I'll definitely take a look too. The way I did it was from a post a couple of years ago... maybe there is something better now.

Thanks.

Yeah, it is more of an academic exercise for me. :slight_smile: The way you did it works great.

I noticed the built in apps seem to all do it the inline/in drop down way, so figured I should learn how to do that to make my stuff look similar to the built in apps.

FYI your debug logging toggle in the child app doesn't appear to work (?).

The LOGDEBUG function checks settings.DebugMode, but I believe the settings variable is actually settings.logEnable.

All fixed.. Thanks

V1.0.5 - 12/31/18 - Fixed debug logging.

Latest activity report in app vs pushover notification:

Not much info in the pushover report? The battery reports do list the devices though.

Fixed...New version on Github...

V1.0.6 - 01/01/19 - Fixed typo in Pushover module.

2 Likes

I tested Device Watchdog with the community Hubitat to ST Notification Pusher driver, and it works as expected. I assume any device that implements the "Notification" capability should work, though I think Pushover is the only natively supported option at the moment. (You could also easily modify a couple lines in the code to use a "speech synthesis" device instead, even if that device actually does regular notifications--this is an old workaround some people used before notification devices were well supported in order to get such devices exposed.)

1 Like