a suggestion for the polling is to use rule machine and you could have a check in trigger.
Well, I guess Iām not sure. When I go into the app it lists all the devices and the āhrs oldā value. Some are definitely greater than 1 hour. I donāt see any indicator that they are āno longer reportingā or anything if thatās what you mean.
100% I screwed up. This program works GREAT if you run the app but it wonāt monitor on itās own.
Since it was originally written to run only when opened Iām going to have to make some major modifications to work properly and not break what already exists.
Iāll try to get to it this week.
Thank you @awc for QAing for me!! I knew not QAāing would get me in the end.
Sorry I was not online this weekend. This is why I have not left the SmartThings platform. The community is great. Thank you for this.
Not a problem. Iāll gladly QA it further for you. Iāve had too many devices unknowingly go inactive with SmartThings that it has me really frustrated. But if I can get notified when Iāve not heard from one for a while, that would be awesome. Clearly should be something the platform does for us, especially considering the general instability of the platform.
@awc - I think I have it fixed. Itās not pretty but I think it works.
I moved some stuff around and made it subscribe to all the devices you configure so it runs a ācheckā when it gets an event from anything. I also added a simple scheduled task to run every 5 minutes just in case. This in theory should work but I know STs has had issues with scheduled tasks lately.
I donāt have all these devices so I could test all the subscriptions but I do know that thermostats and motion detectors work.
I will test this today and let you know if I see any issues.
So it works great except now Iām getting too many alerts (i.e. the test to see if an alert has already gone out is messed up). I think it has to do with the fact that multiple devices can request a check be made and itās using system level varaibles (I know bad design) so they are overwriting one another if run at the same time.
Iām pretty busy today but Iāll try to harden the code and fix that issue later.
Good news - it works - bad news - is it tells you too often that you have problems
Yep, meant to chime in to let you know this is the same behavior Iām having now.
Girlfriend: "What are all these alerts Iām getting?"
Me: āWell, I guess the health check app started working.ā
I was going to report that my Aeon Labs siren wasnāt updating even when I forced the siren to go off, but that seems to be working now. It was previously showing up on the āDevices Not Reporting Eventsā section, but no longer.
Also, what does the āDevices Delayedā notification mean vs. āNot Reporting?ā I had mine set to consider them inactive after one hour, but I changed it to eight hours and devices show up on that list even though they have had activity within the past eight hours.
I changed Thermostat devices the temperature devices and it has been reporting great. Dont have any that have frozen yet so I cant comment on notifications.
I have a hunch that the issue was if the app was called multiple times at once. Iāve added a bit of code to ensure that only one check can run at once. Iāve committed the changes but Iām going to let it run for 24 hours before I say itās fixed for sure.
Also to your question about Devices Delayed vs. Not reporting.
STs only keeps 7 days of logs on a device. So Devices Delayed are devices that have gone over your threshold in reporting. Devices not reporting are ones that havenāt had an update in the last 7 days.
i have to say my luck is odd. I was dropping sensor several times a day. installed your app and not a one has quit on me since go figureā¦
This is great I love that I can see how long it has been since the devices have last updated.
@craig this is just what I was looking for! Thanks for taking the time to build this out I just realized there was a new version that had the push notifications.
It looks like itās going much better. Thereās still a weird situation where it notifies twice, haventā had time to track it down but at least now itās not notifying you every 5 minutes
@craig Iāve installed the latest code from here:
However when I set the inactivity time to notify to 1 hour, devices that are > 1 hour still show on the āDevices Reporting (hrs old)ā section and arent added to the ābadlist.ā
Here is a log from a fresh install I just did with 1 hour being set to notify:
2e67e954-1ed8-48ee-a160-47872348283d 10:52:55 AM: info Contact State: '0.06: Bathroom Multi Sensor
0.04: Bedroom Multi Sensor
0.11: Entry Top of Stairs
0.1: Guest Bedroom Motion
0.19: Living Room Sensor
3.17: Basement Outside Door
2.77: Front Door Sensor
ā
2e67e954-1ed8-48ee-a160-47872348283d 10:52:53 AM: trace subscribing to Devices
2e67e954-1ed8-48ee-a160-47872348283d 10:52:52 AM: trace subscribing to Devices
2e67e954-1ed8-48ee-a160-47872348283d 10:52:52 AM: trace Launching Quick Device Check
@craig
I am not sure if Iām inadvertently breaking something, but I changed the notification IF statement from:
if ((badlist || errorlist) && sendNotification == āYesā)
to:
if ((badlist || errorlist || delaylist) && sendNotification == āYesā)
Because the delaylist is the one that Iām looking to be notified. Thank you again for putting this together.
@craig Good work on the app. A couple suggestions:
Could you change namespace to:
namespace: "lyons189",
In the SmartApp definition so that it works with the SmartThings Github integration?
Also, change the send method so that if you put a phone number in you donāt get a push notification.
def send(text) {
if (phoneNumber == null) {
sendPush(text)
}
else {
sendSms(phoneNumber, text)
}
}
Iāve had something on my ābadlistā for awhile so I may have just not noticed the bug. Iāll update and fix. Thanks!