Alert when hub v2 on battery power

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.