Suggestions for a rule to shutdown the Hub on a UPS during power outage?

Assuming you have a way to trigger it, you can use @ogiewon 's code to Post to /hub/shutdown to port 8080