Hub alert for loss of power

hubv2

(Andrew Newton) #1

Hi

Does anyone know if the hub supports a way to alert if it loses mains power ?? Would be nice to have if it doesn’t as most systems seem to have this as default

Thanks

Andy


(Tolik) #2

There used to be a way to get notifications if the hub is offline.

I’m not sure if that’s still possible.


(John) #3

It’s possible by pasting this SmartApp snippet. Then Hello Home appears again and you can configure the offline messages (and battery messages). Not sure why this little snippet works, but it does.

definition(
    name: "Hello Home",
    namespace: "Hello Home",
    author: "SmartThings",
    description: "Hi",
    category: "",
    iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png",
    iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png",
    iconX3Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png")

Low battery warning and Hub offline warning
(Andrew Newton) #4

Thanks John

How do I apply this code, quote new to ST !!!


(John) #5

Go into the IDE. Select My Smart Apps. Add new app, save, and publish. It will them show up in the mobile app under My Apps.


(Andrew Newton) #6

ok cool, thank you will give it a go


(Andrew Newton) #7

Ok tried it and …nope it didnt work

I added the app , saved and published and it appeared under marketplace My App;s so I set it to send push notifications and text.

pulled out network cable to hub and waited …nothing !!! but looking atthe code I cant see how it would work anyway … as it worked for you?

Am i doing something wrong?

Thanks

Andy


(John) #8

As you said, it shouldn’t work, but you were able to configure it (and there’s nothing to configure???). Odd, right?

As I said. I don’t know why it works, but it works for me. Sorry. I didn’t believe it either when I tried it. When it worked, I was amazed. As with everything Smart Things, somethings work for one and not others. Good luck.

EDIT: I get the disconnect text within a minute or so.


(Bruce) #9

This is cool. But, I just setup a new location with a new hub, and these settings were already there. So who would need this? I suppose if you want to disable the notifications, that would be a reason. Very cool discovery.


(John) #10

Someone with an existing hub, I guess.


(Andrew Newton) #11

Hi Again

Had some time finally to test this again… So copied code into IDE as suggested , published as configured.

Tested today… and it worked lie a dream…

Turned of internet and after about 5 mins it alerted me to say hub had lost internet connection… then when i turned internet back on it took approx 2 mins to alert that it was connected again.

Now the power bit does seem to be lacking… it as low battery warning, which is ok but not really that useful as I wan to know when the mains power goes out not when its been out for enough time to allow the unit to run down the battery.

Going to research this one … so hopefully will be able to report back soon…


(John) #12

Good. Glad to hear it.


(Tolik) #13

I disconnected my hub for five min and got no notification.

Do you see this in live logging?

LogsClear
6d8f8d6c-91ed-4e1d-9778-147a7ed79f76 9:37:04 PM: trace getPhrases(), state.welcomeIssue = null
6d8f8d6c-91ed-4e1d-9778-147a7ed79f76 9:37:04 PM: trace getPhrases(), state.welcomeIssue = null

over and over?


(John) #14

Publish and install. Mine works fine.