Automatic return after power failure

You could use Network UPS Tools (NUT) to monitor the state of the UPS system if your system has a port that allows status monitoring.
It would allow you to orderly shutdown the PI prior to a loss of UPS power. That will preserve all persistent data.
I wrote a tutorial a while ago for OH2.5, [Guide to Network UPS Tools] (Guide to Network UPS Tools (NUT) on multiple Raspberry PI’s (Openhab 2.5 and other systems)). It’s a bit dated though the framework would be similar for more recent versions of OH. There’s another good tutorial at (Beginner's Guide to Network UPS Tools (NUT) on a Raspberry Pi) that has had more recent updates.

1 Like