Ideas needed to cut & restore power to Hub after shutdown from afar

there is no wiring it is a plug in smart switch ie..
i choose this brand as it remembers last state on a power outage.. most dont. and you can seat a schedule in case for some reason it does turn off and the house is empty

https://www.amazon.com/TP-Link-HS110-Monitoring-Required-Assistant/dp/B0178IC5ZY/ref=sr_1_5?dchild=1&keywords=kasa+monitoring&qid=1599067156&s=hi&sr=1-5

or

https://www.amazon.com/Kasa-Smart-Wi-Fi-2-Outlets-TP-Link/dp/B07DJ6W63H/ref=sr_1_4?dchild=1&keywords=kasa+dual+monitoring&qid=1599067187&s=hi&sr=1-4

1 Like

Decided to go with the Tp-Link Kasa HS103 one or two pack.

(1 Pack)
https://smile.amazon.com/Kasa-Smart-Wi-Fi-Plug-TP-Link/dp/B079B7SHD8

(renewed 2pack)
https://smile.amazon.com/TP-Link-Reliable-Connection-Required-Assistant/dp/B07TSZVV68

I use this Sonoff usb wifi switch ( which I do believe the manufacturer has resolved my previous issue of pairing it) and talent cell as a ups. I plug the Sonoff switch into the USB of the talent cell then plug the Hubitat hub power into the other end of the Sonoff switch ($10US). Now remotely I can turn Hubitat off ( after a safe shut down From a power outage) and turn back on the hub which allows Hubitat to reboot.
SONOFF Micro USB Smart WiFi Adaptor 5V, Smart Switch for Type A USB Devices, Compatible with Alexa & Google Home Assistant,APP Remote Control Switch, Voice Control, Timer Function, No Hub Required https://smile.amazon.com/dp/B083BKBKW5/ref=cm_sw_r_em_apa_i_BF-tFbC99ZNB6

As a side note I use Cobra's Power off Shutdown APP along with the Ring 1st gen repeater to shut down my hub safely in a power failure. Works GREAT!

Thanks. Now your setup makes sense to me, although I did have to lookup the Talentcell. I already have an APC UPS backing up my modem, router, HE C4, and home phone base unit.

Appreciate the suggestion for using Cobra's shutdown app, and for confirming my plan to use the Ring repeater for the power monitor.

Amazon is out of stock on the Ring Extender 1st Gen at $14.99, but does have 2nd Gen models a 24.99.

The 2nd gen model also has a backup battery, but does it work with the HE driver for power monitoring?

Here’s the one I used:

See details here:

1 Like

Not sure about the second gen ring extender. I thought I did read somewhere someone did write a driver for it but not 100% sure.

As for using an APC UPS backup, I still use one for my modem and router but always had issues in that it would only last 15-20min. That's why I switched to the Talent battery back up. There are many. I purchased : TalentCell Rechargeable 12V 6000mAh/5V 12000mAh DC Output Lithium Ion Battery Pack for LED Strip and CCTV Camera, Portable Li-ion Battery Bank with Charger, Black (Multi-led Indicator) https://smile.amazon.com/dp/B00ME3ZH7C/ref=cm_sw_r_em_apa_i_NF.tFbTQFTHQG

It's almost 1/2 the price of the Talent Ups model. Many on the forum have used it and it gives you HOURS of backup if you just use it for the hub. I plug my Talent into the APC Ups as a means to keep the Talent charged AND protect it from surges and found this combination a winner. The Talent has lights on the top to show you it's fully charged and since switching to it, I've had hours of battery backup to prevent my hub from powering down.

About a year ago and with this exact issue, I changed the battery on my geriatric APC XS1000. Works fine now, currently shows 287 minutes of backup and performed well in the last outage.

1 Like

Have everything working, except after a graceful hub shutdown, I am attempting to figure out how to get a notification on my phone, when power is restored. Any suggestions appreciated.

My setup

  • Ring Extender Gen2 device, using a modified version of bcopeland's driver that resets the status of powerSource after a graceful shutdown when hub reboots. (Currently the Extender plugs into a Kasa plug, allowing its powerStatus to be reset after graceful shutdown reboot. With the modified driver The Kasa plug is no longer needed for resetting the powerSource settting.)

  • C4 Hub, plugged into a Kasa WiFi plug, plugged into an APC UPS

  • An RM rule controlling the graceful shudown

My current thoughts are:

  • Find the Kasa API (If it exists) then dive into it, and use a separate Kasa plug for power notifications, if possible

  • check if the always plugged into mains with battery backup tablets using Fully have any capability for doing a power notification. Did not find anything.

  • My APC UPS is ancient, no wifi or notifications, just power backup

  • An (existing) Android app that has power notification capability

yA I WOULD like to figure out how to do gracefull shutdown as well so for an extended power outage we dont corrupt the database.. For now i will have a current backup handy to restore it..
the hub on an ups with a kasa wifi switch available to reboot if necessary is good.
but we would need some kind of (for my case) apc signalling code dsriver to intercept a shutdown request and shutdown gracefully..

I am using a Ring Extender (Gen2) $25 with a modified version of bcopelands driver. After a bit of a setup dance it gives a power status mains or battery. It also functions as a zwave repeater. Don't know how to get an APC alert into Hubitat.

I use an RM to control the shutdown.

The Kasa Wifi plug (or almost any Wifi plug with a phone app) plugged into a UPS, that provides a phone app allowing for a cycle power to the HE Hub to force a restart.


image

unfortunately i dont want it to shutdown immediatley on power loss. ya i know how to do that eithe rwith ring or this setup which i have..

i want to utilize the ups as it will keep stuff up for hours then signal that it is shutting down and shut down the hub.. i already have the kasa switch to restore state so it will boot up the hub automaticallyt on power restored. and i have a message i will get when power is restored.

The kasa remembers last state. In addition, I have a schedule on it to turn on every 4 hours if it ifnds iteself off and the above restore to state fails.

But as i said to do this the smart ups signals and you would need a driver to intercept and interpret that signal

How is this being done? That is the part I need.

the message aor the restore to state... the kasa automatically has a setting .. to restore last state.. use their wifi app ..

the message

here is my rule using the mimo device and ecolink

ie

Unable to find anything in Android Kasa app allowing for a restore to last state or reporting with an SMS. Where is this found?

the sms is from the rule.. it may just be automatic that the kasa returns to last state and i am remembering wrong.. test it'

i tested a lot of ohter smart wifi plugs that didnt and they are in the trash bin

All I could think off doing was removing the Kasa plug from the wall outlet. That changed the app's smart plugs status page for the device to "local only" then it shows a very grayed out display of the plug. Reverse for power restored to plug. However, no SMS notification, nor do I find a notification option.

However, with manually monitoring the plug's status, this is sufficient for making a power restored determination, although I want a notification.

you can write a rule like i did when your ring has power restored or the plug has power restored let me test it with my smarthub kasa plug

no not going to work with the kasa switch only events are switch on and switch off.

you need a setup like me or maybe the ring has other evnets.. check what attributes it has and what events if any change when power is restored to it?

I need a method of determining power status when the Hub is shudown gracefully or loses power.

I already delay graceful shutdown for 3 hours, although ups says it's good for ~300 minutes. As long as hub stays powered the RM rule notifies me of power cycles > 5 minutes. Not interested in interruptions from short term power bounces.

Ring device has an event that says "Power Restored". However, it's useless while the hub is shutdown.

Could you set a variable with rm when graceful shutdown is ordered? Then check the variable and reset on boot up?