[OBSOLETE] Device Monitor - Get Notified if Devices Stop Reporting

Nicely done! This is another REALLY good example of utilizing the Message Queue to the fullest. Now, when Amazon releases push, Device Monitor AUTOMATICALLY gets Alexa support!

1 Like

@erocm1231

Thanks for another great app!

Few questions if you do not mind.

  1. If I set the Use Online / Offline status to on do I still need to add the devices to be monitored or does this option monitor all devices by default against the hub itself.

  2. Using the Online / Offline status and if the devices are added to the device list, and I set the Check Interval to 30mins does this then simply checks against the Online/Offline status in ST itself or will it poll the device?

  3. On a similar note to the above question, I have numerous Sensative Strips (no idea about longevity of the battery really so do not want to poll them constantly). If I set the Check at Interval to every 30mins for example, will this actually poll the devices or does it simply check ST for the device status please?

In essence and irrespective of the other functions of the app I am simply looking for a solution which will Push Notify me if one of my door sensors has a ST Status of “Inactive” (Offline) as seen in the app itself and trying to do this against the status in ST itself rather than polling the device every x-minutes to preserve battery life. Hope that makes sense.

Thanks!

Mark.

Most devices that run on batteries sleep and attempting to poll a device that’s sleeping won’t drain the battery because the device won’t get the commands that are sent to it.

The Sensitive Strips sleep and their expected battery life is 10 years.

1 Like
  1. You still need to add the devices you want monitored. Unfortunately, SmartThings does not allow us a way to subscribe to devices unless they are manually selected.

  2. It will only check the status of the device in SmartThings and does not “poll” the device. Just a side note, most Z-Wave battery powered devices such as door sensors are “sleepy” devices. They do not respond to “poll” requests as they are sleeping until they either a) Wake up to check in with the Z-Wave Controller or b) are activated by the door being opened or their other functions being triggered. (as I am writing this I saw a notification @krlaframboise has responded. :slight_smile: )

  3. See above and comment by @krlaframboise.

It seems this app will do as you are requesting without any concerns about device battery life.

2 Likes

Thanks Kevin!

I was hoping this was the case and I appreciate that the expected battery life is ~10 Years (only time will tell of course lol) I just did not want to set this up to check every 30mins only to find out that they are dead in 6 months.

Thanks again!

Cheers Eric!!!

Clarifies everything and as mentioned thanks for yet another top addition to the arsenal!

Keep up the good work!

Regards,

Mark. :slight_smile:

Would someone please be kind & explain how I can install this.
Thanks
Dom

Hmmm, still cannot get it to work.

I have enabled the Online / Offline option, I do not have anything in the Inactivity Timeout section as am relying on the Online / Offline status. Perhaps I am getting this wrong but as ST is reporting the device as 'Unavailable was under the impression that Device Monitor should pick that up?

I have added some Hue lights to the Switch Section and then powered one off at the mains. After a while ST shows the light as “Unavailable” with the red exclamation mark next to it under Things. I have Device Monitor set to check every 15 minutes but do not get a notification at all. I do have Circadian running on the bulbs which seems to be updating them as there are entries under the Recently Tab stating that the Color Temp has been changed even though the bulb is offline. Could this be confusing Device Monitor even though it should be looking at the Offline / Online Status?

Also removed the batteries from my Smart Chime, again ST has flagged the Chime as ‘Unavailable’ but no notification received from Device Monitor.

Perhaps I have to wrong end if the stick, if so apologies.

I just pushed an update that will make the online / offline behavior work more how you are expecting it. Can you try that one?

1 Like

Thanks Eric!

Just updated, added one Hue Bulb and Smart Chime. Set the poll to 5 mins and turned off the Hue Bulb at the mains.

Will wait to see what happens!

Greatly appreciate your time and effort on this though. I have tried different apps and simply cannot get it to Push Notify when anything goes ‘Unavailable’. Would be great if ST baked this into the app itself, after all not much point in showing that a device in unavailable if you have to go into the app and scroll down the list to see that it is lol.

I am no coder but how hard would it be to create a stand alone app that will simply Push Notify should any device be flagged as ‘Unavailable’ in ST then again once it becomes available again? Think there is probably a lot of people who may find it useful or perhaps I am alone here lol

Thanks again and will report back in the morning.

:grinning:

BTW, battery operated sirens, like the Zooz Smart Chime, need to be able to receive commands at any time so they don’t sleep and frequently polling them will drain their batteries. In the chime settings, I have the check in interval set to 3 hours and its never dropped offline.

2 Likes

Thanks Kevin, noted!

I was only using the Chime to test really although it did become Unavailable yesterday… as it is easy to remove the batteries etc. but will make sure that I do no poll it often. Mine was currently set at 12 Hrs so changed to 3 Hrs.

Thanks!

Thanks Eric, the changed seems to have sorted it, I received a notification “Device not Reporting Events:HUE BULB (SPARE)” then upon restoring power I received “Devices Delayed: 0.04 - HUE BULB (SPARE)”

I know I am probably taking the pi*s now but will ask anyway…

Is is possible to amend these messages to reflect the actual issue/status; so "Device Unavailable:… " or preferably “Device Offline:…” and “Device Back Online:…” as opposed to the “not Reporting Events” and especially the "Devices Delayed message once it is available again as this message can be confusing with regards to the fact that it may not have actually gone “Unavailable” / Offline in the first place. Thank You!

Also I forgot to mention earlier but I am also getting duplicate Push Notifications for each event. I have tried to delete the App and start again several times but it did not help, I have not admittedly removed it from the IDE though so may try that. I think I have had duplicate messages since I started to use the app just prior to posting here.

Thanks again for all your efforts!!!

Have a good one!

Mark.

So that shouldn’t happen unless you have not specified anything in the “How long before a device is considered inactive” field. Although I will probably end up changing the behavior, you should probably fill in that option for the app. There are some devices that do not support “ONLINE” vs “OFFLINE” and this setting will be used for those devices. If you had that option set for . . . lets say 12 hours, then you would have gotten an alert that the device is online instead of the delayed alert.

As for the duplicate notifications, that is something I have not seen and don’t really see how it is possible unless there are 2 instances of the app installed. Or something selected incorrectly in the “Contacts” portion of the app? I’ve gotten a lot of use out of this app over the last year and then some and have not seen this.

Thanks Eric,

Early hours here now but I changed the How long… option to 12 Hrs. Also did a quick test and turned off the Push Notification option in the App after which I still got notified but only once but need to try this again as I was actually in the app and went to the Device Status screen which kicked off the notification I think so this may not have solved it for me. Need to sleep but will try further settings over the next few days.

Thanks again!

EDIT: Just received further notifications as actually one of my door sensors dropped offline in the last few minutes which it informed me of so great! Can also confirm that disabling the Push Notification Option in the app solved the issue of receiving duplicate notifications, not sure if is is just my install or perhaps I am misunderstanding what that option actually does.

Have a great weekend!

Is there anyone that can explain how I can do this. I really would appreciate it. Thanks.

Here is a great resource that should help you get started:

1 Like

So I just installed the app and was getting two notifications as well, and looking in the log I see it sending both a push notification and a text message. Looking at the code, it does the following check:

    if (phoneNumber != "0") {
        log.debug("Sending text message...")
        sendSms(phoneNumber, message)
    }

Checking the Device Monitor app settings, I see that phoneNumber (in my case) is set to “”, not “0”. I suspect calling sendSms with a empty value for the phone number parameter must default to just sending a push notification, although this is just a guess. However, if I set the phoneNumber to “0”, then I only see one push notification and the log only reports a single push notification was sent.

Just my 2 cents.

1 Like

Thanks! At lease it is not just me going mad! lol

@erocm1231 would it be possible to put a toggle on SMS which then prompts for Phone Number? and take into account what @ejluttmann has discovered please, when you have some spare time of course. I am sure others must be experiencing the same issue. I understand there is an easy work around by dropping ‘0’ in there so happy to live with that or just leave Push unchecked of course.

Thanks chaps!

I just made a change that should stop notifications if the phone number field is blank. I use the contact book in SmartThings so I can’t test it. Let me know if it doesn’t work.

1 Like