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!