I have a UPS connected to a Synology (NUT server).
This shuts down a few Raspis in the event of a power failure and when the battery life ends. However, my router simply switches off ‘hard’ without shutting down when the battery is empty. Is there a NUT client (MODE=netclient, upsmon) or similar for ROS so that the router would also shut down properly ?
br, Richard
Don't worry too much, RouterBOARDs are designed to be turned off suddenly...
![]()
![]()
… ok gggggg
If all you want to do is shut down, you probably don’t need it. I wonder if this is still true while running containers which write to storage or db.
I had no luck finding native NUT options for ROS a few years ago on a similar search. I was trying to use a NUT client to reduce power while on UPS battery power (turn some PoE ports off until line power returns). But didn’t see an easy way to interface with NUT directly as a client.
Instead I used the ups package and some scripting to put ROS between the UPS and the NUT server.
This is what I did - Connect the UPS to the RB5009 via USB so it is aware of the On-line or On-battery state. On any status change, write out a ups.seq file (input for the NUT dummy-ups driver), shared via TFTP. Schedule job on the NUT server pulls that ups.seq to a local path used by the dummy-ups driver status. Any change to the file is reflected as a UPS status update to NUT. The shutdown and power-up actions on the NUT server work as they did before. Everything but the RB gets a graceful shutdown. RB and one AP run until UPS is exhausted.
You could do something similar and then have a timed shutdown of ROS after it shares status with NUT, even triggered on the TFTP access, for example.
But I have had around 6 power outages resulting in full UPS battery exhaustion since setting this up 2.5 years ago, and the RB has always powered on reliably after every hard shutdown.