Device not reporting in for a set amount of time


(Negative2) #1

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.


Alert me when a sensor goes offline or stops responding?
Open/Close Sensors Fall Off
Capability Stale Status Detected / Reported /?
(Craig) #2

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.


(Negative2) #3

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.


#4

@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


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #5

###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…


(Matt) #6

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


(Craig) #7

@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.


Occasionally ST MOTION Sensors stop working
Netatmo and other sensor together
(Craig) #8

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).


(Craig) #9

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


(Matt) #10

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


(Craig) #11

@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.


(Matt) #12

ROTF love it Man Sir


(Craig) #13

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


(Craig) #14

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:


(Allen Crawford) #15

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?


(Matt) #16

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


(Craig) #17

@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?


(Craig) #18

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%.


(Matt) #19

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.


(Craig) #20

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.


Rule Machine Feature Requests