Hub and key electronics protected by large APC UPS.
USE CASE #1 -
There is the ability for devices to subscribe to broadcast messages to command a shutdown.
USE CASE #2 -
And it would be great if the hub would reboot on restoration of power.
Are either of these use cases supported? via existing apps? feasible to implement? (is there a graceful shutdown api? is there a way to have the hub restart on power restoration (assuming a graceful shutdown)?
Remote site -- need the hub to play nice with Mother Nature.
This would be a good feature to have so the hub shuts down correctly. My UPS is hooked up to my NAS which can broadcast shutdown via Network UPS Tools. I have a WinNUT client on a PC that listens for this and it shuts down. It would be awesome if HE could include the network UPS client as well.
The hub does automatically boot when it's powered on. Does it not boot for you if it's not shut down properly? I've only had to just pull the plug once, and when I plugged it back in, it booted just fine, all by its lonesome.
I'll try next, but issuing the reboot command works just fine "as is" via a web browser...; no 8080 required. Just tested via a browser & you're right, 8080 is also accepted & the bub reboots...
Yes.. via the web browser would work either way because it originates externally from the hub. If you use a smartapp, it originates from the hub itself and doesn't seem to work with port 80.
Awesome. There are so many ways to approach this..it's one of the great benefits of Hubitat using a web interface for device management. We could probably open a separate "Post your Hubitat URL Hacks Here" thread.
We also have to keep in mind that if/when the Hubitat team ever implements the much requested https/password protected interface, some of these approaches may not work or will at least need to be modified.
I hope there's an option for non-secure on a local network. Just today, I learned about the non-secure port on Sonos to check ifconfig and turn off the WiFi. So even though connection is secure, there's still non-secure access for admin.
If the hub is been powered off because imminent power failure but then the power is not actually cut off, is there any way to turn it on? i.e. via UDP Wake On Lan?
As far as I know, there is no WOL option for this hub. The only way to turn it on after it has been shutdown is to remove power and reapply power. If you have a wifi smartplug you could turn it off and on again. The hub should boot up.
Just a heads up, if anyone is using the paths /hub/reboot or /hub/shutdown these routes will be going away in the next release as GET requests.
You will need to change your request to a POST. This will mean that you will not be able to directly call /hub/reboot or /hub/shutdown directly from a browser url.