Alert when hub v2 on battery power

However it is reporting incorrectly again…

2 Likes

Thanks, hopefully the updates tomorrow will help fix it

So it’s back to working again…

I’m going to be doing the “Konnected Security” project in a week or two and detecting a power outage is something I want to be able to do. Personally for me I plan on adding a RIB relay to the outlet box feeding both my alarm panel and my hub to give me a dry contact and then I’ll pull that dry contact into the system. The alarm panel is on battery backup and hub is plugged into a UPS which lasts a long time (router/modem/hub/HDHomeRun/vonage…last big outage it lasted 1h 45min) but I still want to know if the power has been out for more then 15 minutes. And this is the only reliable way I know how to do that.

One day my hub went offline. I wondered what happened. Apparently, the power cable became loose and the hub has been running on batteries for a while. This kind of notification would be really good to have.

How can import this app?

You need to install webCoRE and import the Piston using the code(4z3m) shown in screenshot.

Thanks,
It worked at the beginning, it shows Main power push notification, but I unplugged the hub and leave it running on batteries for about 15min and then plugged back to AC and never receive another push.

It reported main power when added the piston, but then didn’t reported when I tested Hub on batteries for 15min. or when connected back.

I’ll have to check mine again. It’s been spotty working but worked the last time I checked.

I tried Hub Power Source in webcore and it is not pulling the right state.

1 Like

the Hub Power Source fonction is not working properly currently 6 march 2018.
I can see in this web site
https://graph-na04-useast2.api.smartthings.com sections My Hubs, in the section Battery
if the hub is running on battery or 120V. This work OK

In webCoRE https://dashboard.webcore.co, i can see bellow my hub version when the hub is On Battery because there is a small red battery that appear. This work OK

But the Hub Power Source fonction is not able to report correctly the good state.

Firmware version 000.020.00017
webCoRE V0.3.000

Who can correct this fonction. A problem simple to reproduce because the problem is constant.

Me also want!. Any solution to see that the hub is not on the mains is ok to me.
Do not laugh, but now I use the thermometer/sensor in my fridge. If temp raises above x then beep.
Huib

i found a way to trigger my piston that check the hub power source battery or Mains. But in an every day situation it’s useless. The reason i write this is just to help someone find a real solution.

Yo need a piston with an IF : Hub Power Source is battery then…
The IS must be there. Not “change to” or anything else.
Then : create the alert you want, i’ve use SMS.
an another IF : Hub Power Source is Mains then… create the alert you want, i’ve use SMS.

Remove 120v on the hub, the battery will power the hub
go on my Android phone in the app : SmartThings Classic
Automation
SmartApps
go in the WebCoRE SmartApp
hit Save, you don’t need to modify anything, just SAVE
i will received the alarm : on Battery power

Put back the AC Mains 120v
go on my phone in the app : SmartThings Classic
Automation
SmartApps
go in the WebCoRE SmartApp
hit Save, you don’t need to modify anything, just SAVE
i will received the alarm : 120v utility power restored

why if i save the WebCoRE SmartApps that send the hub power source status to a piston?
An other way to send the alert is to use the TEST button in my piston, it send the actual state.
Picture of the test piston


Picture of the piston i’m supposed to use every day

In case anyone is still following this, I found a bug in the code that I fixed and submitted a pull request that was accepted and it should be in the newest version of WebCore - please see this pull request for more information - https://github.com/ady624/webCoRE/pull/99#event-3078242766

2 Likes

I figured that I would finally take WebCore out for a test drive. So my first attempt was to try to use this ‘Hub Power Source’ feature with my V2 Rev E Hub since Samsung SmartThings doesn’t have any support for the battery status whatsoever. But alas, it never worked automatically no matter which examples I tried using above and from the WebCore forums. I even tried the WebCore dev repo, but it still didn’t work at all. It only worked when I would open the WebCore SmartApp Dashboard and just select ‘Done’ and ‘Done’ again to close the WebCore SmartApp that it actually fired the alert. Funny thing is, I could see the little battery ICON appear and disappear inside the WebCore app under the Hub ICON everytime I pulled and reconnected power to the Hub, but this Hub Power Source feature failed to do anything at all.

Use the code of Gainondorf, works correctly …

(removed)

Update

Nevermind, I figured it out. When I switched to the Dev repository, I didn’t save and republish the code to myself. So I’m now using the WebCore Dev repository using the bx8y8 code that has ‘changes to’ with a tweak from SMS to Notification and it instantly sends me the notification. Nice!

Hi,
I am happy you solved … :+1:

Jrfarrar’s code (4z3m) does not work for me. Like others have reported, I can see the battery status on the Dashboard, so webCoRe is seeing the battery status on some level, but this piston simply does not work. Interestingly, when I test the piston (with the Test button, not by actually pulling the plug to put the hub on batteries), I always get a “now on MAINS power” notification after the delay (I changed it to one minute to make testing easier), whether the hub was on battery or mains when I initiated the test.