Device not reporting in for a set amount of time

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.

1 Like

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.

1 Like

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.

2 Likes

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.

1 Like

@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 :slightly_smiling:

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ā€¦

1 Like

This is great I love that I can see how long it has been since the devices have last updated.

1 Like

@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 :wink:

@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

1 Like

@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) 
    }
}
1 Like

Iā€™ve had something on my ā€œbadlistā€ for awhile so I may have just not noticed the bug. Iā€™ll update and fix. Thanks!