Device not reporting in for a set amount of time

Has anyone figured out out how to get the system to notify them if a device has not reported in for a set amount of time. I have a few devices that have not had an events for a while.

1 Like

this actually would be a pretty easy app, and honestly one I’ve been meaning to write for a long time (I have several devices that fall into this as well). The wife is out of town for the next week or so, maybe I’ll find sometime to write it.

2 Likes

Thanks craig. I don’t understand why this is not built into the app like the battery notifications. It would make sense that it would notify if a device has not respond for a while.

1 Like

@negative2 and @craig,

Here’s perhaps the basis for your app @craig. It wouldn’t take much to add code to set a hour limit and then send any message you want. Right now the app just shows how many hours it’s been since any event was logged for a device.

https://raw.githubusercontent.com/constjs/jcdevhandlers/master/smartapps/jscgs350/dashboard-device-check.src/dashboard-device-check.groovy

1 Like

###I’d like to see this as a new Capability similar to Capability Battery.

i.e., devices with Capability Battery are able to self-analyze and report good or low battery levels (just not dead battery)

… But the DTH is not limited by the physical device, so Capability staleStatusReport or Capability staleStatusDection or similar, would put the first level of responsibility into the DTH.

Then a SmartApp of any sort could subscribe to the staleStatus Attribute and use it to trigger an Action like a push notification or set a SmartTile color, etc…

3 Likes

man I would love this. I have a few devices (temp sensor mainly) I have noticed guit reporting and need to be reset periodically.

1 Like

@johnconstantelo - you rock! This is an amazing app and helped a ton.

@negative2 - I think this works. I’ve written it quickly without a ton of QA so hopefully there’s no stupid bugs but I plan on using it moving forward so let me know if you find any bugs and I’ll try my hardest to get them resolved.

3 Likes

IMPORTANT: I can’t figure out how to update the github (I’m trying to play with the commits).

line: 352 needs to be changed to: check += “${delayListCheck.trim()}”

FYI - I made this so it only sends notification if something has changed (i.e. a device is added or removed from the list).

I’m noting that there’s no temp sensor on this program. should be an easy addition but I don’t have time tonight.

1 Like

great work. Get temp sensors in there and Ill be a very happy man sir…

@keltymd If you had called me just “man” or just “sir” I won’t have done it for you but since you went the extra mile and called me “man sir” I went ahead and added it!

zero QA so I’m committing the ultimate no - no. Don’t tell any of my engineers they might have an uprising if they knew the strictest PM was committing without testing :slightly_smiling:

PS - no hating on my coding! I’m just a want-to-be coder.

ROTF love it Man Sir

@krv - hey in case you’re interested. This is how I’m going to at least know when my netatmo’s go dead.

Note - I have this program monitoring a ton of things, some of which I’m 99% will never go down. This is important because this basically only polls (as far as I can tell) when an event is sent that it’s monitoring. So if you were to put this on just one device which goes dead it would never get an event to tell it to go check all the deviecs (in this case just the one) and therefore never send the alert.

I’d love someone to add a scheduled task to this code as a fail safe, I just don’t need it personally so it won’t be super high priority for me to add :slightly_smiling:

1 Like

I just installed this and basically added all of my devices and told it to consider them inactive after just one hour to test. I’ve got a couple that were well over an hour already (a SmartOutlet that remains off most of the time and a siren) so I thought maybe they need to be reset to an active state before it would trigger them. However, I’ve got a couple that were under and hour and have now crossed that threshold and I’ve yet to get any push notification.

Any ideas? Or is this user error?

Ok so I have a poll job polling sensors because that is an event in the logs it shows the device as active even after it quit reporting

@awc Let’s take notifications out of the picture for a second.

When you go into the app do the numbers look correct and / or does it correctly report that the devices are no longer reporting?

That’s interesting. I didn’t write that portion of the code (and don’t have any polling applications). I guess I could attempt to set it up for one of my “dead” devices and see if I can recreate the problem to think through how to eliminate it from being checked as “legit”.

Off the top of my head it’s as simple as filtering that event type from the “last updated” check but I’m not 100%.

I am polling my temp sensors because I need to make sure they update due to the fact I am running keen vents and a couple other things.

I wrote this program mainly to monitor my Netatmo devices which my thermostat needs to run but go dead all the time and i Don’t notice until my house is 100 degrees!

My next thought was to build in a polling action to attempt to revive a dead device so I’d have to solve this problem to do that anyways.