Well your option is exactly what you said - an UPS. In my case I use an APC UPS which is connected to a Pi 3B (usb/serial) for monitoring with apcupsd and can initiate a shutdown on battery low or immediately on mains failure if that's what you want. I have a lot more than just that one Pi running off it though (apcupsd signals other systems over the network). If you didn't want to go for a mains UPS some searching finds some 5V devices specifically designed for the Pi 5 or so they say.
I would like some sort of UPS-like behaviour. Maybe UPS is too strong a term... in the event of a mains outage over a few seconds, I would like the Pi to cleanly shut down. What options are there for doing this?
If you just used a mains UPS then anything supported by Network UPS Tools (NUT) or also apcupsd if an APC UPS should work.
Statistics: Posted by Undertow — Tue May 06, 2025 1:56 pm