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

I'm guessing you have a WiFi power outlet that you plan to switch off/on that will reset the HE hub so it reboots. What if you check your mobile app that controls that WiFi outlet to see if it's active or not? If it's active after a power loss, then the main power must have been restored. Of course, you won't know to check for it unless you get a notification that your HE was going to shutdown first.

I was thinking along the lines of pinging a smart plug or the likes.

But I believe you can trigger on power change. For your profile try state>power i believe.

Yes I just looked. It will then give you the option to pick usb ac blah blah. Tasker will let you make all the if then statements and variables youd like.

1 Like

That is the current plan, eyeball the status. The Kasa app shows status for each plug, one on mains, one on UPS, to make a logical decision. What I want is a SMS notification when the Kasa plug on mains is re-powered.

I think what @cwwilson08 suggested might work. Tasker running on an AC-plugged in tablet (or old android phone) could trigger a Tasker script when the tablet was on battery power to ping the IP address of the Kasa smart plug which should respond if the mains power was back on. Then, the tasker app could send you a message.

1 Like

I was thinking if they are always powered.

Setting the profile to trigger when ac is activated then send the sms via join or some other tasker plug in that power was restored.

When power goes out again the profile exits until power restore at which time it would activate the profile and the send the notification again.

With tasker you will have many many options and paths to take to get to the same place. Infound learning the interface a pain but man the things it can do for you.

You could also use the app called Macrodroid. It's very similar to Tasker, but the user interface is easier to use in my opinion.

1 Like

No devices that send messages? My Ring alarm tells me when I am running on battery. My old alarm system did that too. My Synology NAS also can send notifications about the state of my UPS that is connected to it via a USB cable for status.

I have 2 Kindle tablets, and 1 old Android phone without a Sim chip so no SMS. Installed Tasker on old Android phone, setup a task to send an email to 1233467890@vtext.com pushing a SMS to my live phone when the the old Android display device becomes powered. It works but gets stuck at email send, waiting for click on Send button. Hopefully can automate that with Tasker, but saving that for morning.

Also have powered ring door bell with battery backup, no idea how to get power status from it

All other devices are either battery, or on mains without battery backup, and not wanting to invest any additional $$$ into this project.

Update: gave up on Tasker using Macrodroid.

ok heres a thought the rule i have that sends an email about power restored through the hub should be good enough to get your notification when the hub is on an ups during the power outage and stays up..

if on the otherhand you shut the hub down during a power outage and the ups stays up you would never get a message about the power coming back up.. this is the outlyer case..

if on the other hand the ups shuts down. the kasa switch will shut down when the ups goes down and when pwer comes back and the ups goes back online the switch will too and the hub will boot when the swtich comes back online. For this case you can have the hub send you a message on bootup..

So now we are down to only that one case to solve.

That's the one I've been working on, the other scenarios are solved.

Tried using Tasker and Macrodroid for power monitoring with an email sent to SMS. Macrodroid took about 3 minutes to get going and send an email when power is restored to my old Android phone used as a Dashboard. Tasker got stuck needing a send button clicked.

When the message is received, I can remotely check the status of HE and power cycle the hub when necessary.

Big thanks to @cohoman for suggesting Macrodroid

1 Like

Quick question for you - are you still using a Kasa plug? I have my hub plugged into a Kasa HS105 and I have been having unexpected restarts with it. I have replaced the power strip and the USB cable for the hub but that has not helped. Now I am wondering if there could be an issue with the Kasa plug. I looked in the Kasa app and I don't think it records anything that is not related to it's own automation :frowning_face:

I have each of my hubs plugged into a Kasa HS107, and have for probably a year. No issues.

1 Like

mine are also working fine.. however as mentined power could be fuctuating.. do you have it on an ups behind the kasa
?

1 Like

Yes. Ups --> Kasa --> Hub

well i guess next step is to isolate issue. try without kasa, try will different ups or different usb power supply or cable

Yes - plugged into a UPS.

Have changed out the power strip and the USB cable but that did not fix it. I also disabled polling from the hub information driver as I am getting the same information via Node-RED, so let's see if that in some strange way was causing an issue. USB plug and Kasa are next. If it's the KASA plug, I'm not sure what I will do as that is key to my remote/automated restart solution.

EDIT: My set is UPS => Power Strip => Kasa => Hub. Power strip is connected to Apple TV, Amplifi Router and the Kasa/HE Hub.

have you checked the system logs.. i was getting unexpected restarts due to the hub sensing that my zigbee had crashed after 7-10 days of uptime.

only indication was a weird message in the logs and notification
"sent message - problem at hub (false)"

I dont have any such notificaiton rule..that i could find

see

I did look at the logs but there was nothing there. I did see entries (after startup) that Zigbee was offline and also this:

Screen Shot 2021-05-12 at 8.36.41 AM

Then in the logs I saw a bunch of Zigbee routing messages (I did not capture those unfortunately), but I thought that could be normal (?).

Were you able to figure out how to capture the actual event notification? I use Node-RED and I'm wondering if I could somehow get alerted when this happens...

@kahn-hubitat - I went back and checked my location event logs in HE and the "zigbeeOn" event and my "Hub Restart" notifications coincide.

March 28 - 5:06 PM
HE Location Event:


Restart Notification (via Node-RED):

May 6 4:54 PM:
HE Location Event:


Restart Notification (via Node-RED):

@gopher.ny @bobbyD I'm wondering if this is normal when HE restarts (intentional or otherwise) or is this an indication that something else is going on? I don't "intentionally" restart the hub often, so kind of hard to nail down. I do "reboot" the hub once a week but I don't see any zigbeeOn events associated with that.

Zigbee radio takes a few seconds to initialize from the "powered off" state, but it's not fully powered down during a reboot. This is normal.

1 Like