APC Pending Shutdown Broadcast - command hub shutdown, autostart on powerfail?

http://xxx.yyy.zzz.qqq:8080/hub/shutdown where xyzq is your hub's address.

2 Likes

if you put you hub on a ups and then put a kasa/tplink switch on the ups. it wil lturn back on automatically once the ups starts back up once power is restored.. I have tested it with my smart ups device that monitors the apc usp and shutdown the hub when runtime gets too low.. once the ups starts back up the hub will also.

1 Like

I have an itty-bitty UPS based on a 18650 cell. It works fine except for the restart.

My issue is, if the UPS never gets depleted so it never shuts down, the Hub will stay in idle until the power is interrupted.

The Hubs do not shutdown when given the shutdown command. They go into an "idle" state where the hub is powered but the radio and apparently the ethernet functions are off. The only way I know to restart once in this state is to remove power, then resume power.

I'm not sure how the tplink switch will leave the hub powered when power goes out, then restore power. I'm thinking maybe I could use one with a relay for my setup.

My hardware setup APC UPS plug-->Kasa Wifi Plug-->Hub power plug, special APC cable from UPS to Windows USB connector; software on Windows and Hub to gracefully shutdown the Hub with a command when the APC UPS battery signals it's about to lose power.

The hub runs until power is removed, or it is shutdown by a command. When the hub loses power it will always reboot, even when shutdown by a command.

When the hub is shutdown with a command, but does not lose power, it must be disconnected from power, then reconnected to power for it to reboot. Should you be at home when this occurs, you can do it manually. Should you be away from home, then something like the Kasa wifi plug and it's associated app may be used to cycle power.

I don't know how 18650 cell is setup to provide backup power, but if the hub never loses power after being shutdown by a command, it will not reboot.

tplinks automatically restore to last state.. so if on an ups which also turns back on when the power comes back like my apc smart ups. the tplink will also turn back on and the hub will reboot

Assuming the UPS and Hub both get shutdown, that will work.

In my setup when the UPS signals the battery is about to lose power, the Hub is gracefully shutdown with a command, then the UPS shuts itself down a few minutes later. However, should power return before the UPS shuts down, a hub power cycle is needed.

correct in that case you can shutdown and restart the hub by using the kasa switch app in your phone.

probably not as automatic as you like but if you set the ups app to shutdown the hub when runing is a few minutes left the odds of the ups not shutting down is slim.

True, it's a slim chance, but if it did not exist then why bother with the Kasa plug?

I have a similar RM rule triggered by the Apcupsd's shutdown warning that is sent to the hub.

Wifi plugs could eat more power than the hub itself...if you use a UPS as a battery backup, adding a Wifi plug could easily cut the battery running time in half. Probably not a concern for you since you must have the PC plugged into a UPS as well for this, meaning your entire setup is not meant to last long during an outage. Creating a setup with graceful shutdown AND long running time (hours) will be more difficult. I wouldn't even know where to begin.

Don't know what ups you use but my kasa plug and hub and another zwave switch on my smt1500 lasts over 5 hours on an outage.