I have the smallest UPS I could find that will work with Network UPS Tools. My goal is simply to keep my RPi and modem running when there are short outages (a few minutes or so) and shut down cleanly when there are long outages. In my case, there’s no point to openHAB being available when nothing else in my house has power.
Using NUT to monitor the UPS, openHAB notifies me when the power goes out, when it comes back, and if the RPi gets shut down.
I’ve never thought about this, but the added benefit of having my modem on the UPS is that it drains the battery until it’s dead (after the RPi has shut down). So when the power returns, the RPi boots up again on its own. But yeah, if the the battery doesn’t fully deplete, you have to manually reboot the RPi.