Rescue after power failure


Good day all
I have a question about rescuing printing after a power failure:

So I live in South Africa where we often suffer from "load shedding". This load shedding is an emergency implementation of turning off a few power grids to avoid overloading the system. Those outages are usually 2.5 hours long and a schedule will let you know when you can expect an outage. They also run at different stages, stage 1 being the least invasive and 4 the most (and the more invasive, the more regularly you will have power outages, but always only 2.5 hours long).

Since using a UPS to power the printer to prevent power interruptions from corrupting a printing job is therefore not feasible (the current draw from an active printer is quite high and an appropriate UPS might cost more than the printer!), I thought of an alternative: since powering the Raspberry Pi with a UPS would be very easy, I was hoping someone will know about a plugin that could help me to achieve the following: when a power failure occurs, the printer will immediately stop, while the raspberry pi is maintained with a small UPS. As soon as the power returns, the printer continues with the print. Does such a plugin exist, or does this capability already exist with current versions of octoprint?

Thanks for the help!


Foosel explained why this will never happen:

Skip to 27min 20sec if your browser doesn't deeplink youtube properly.


It's easy enough to have an APC brand UPS trigger a pause in OctoPrint with scripting. If the UPS has enough power to run throughout the entire 2.5 hours then in theory it will come back up happily.

In fact, if you had a big enough UPS you could run both Raspi and printer for the 2.5 hours as long as it wasn't still heating the bed and the hotend. You might be able to create a pair of GCODE System Commands which completely handle this. Think "sleep" and "re-awaken". The sleep version would move the hotend to the X/Y home position, cool bed/hotend(s), turn off fan(s) and just pause indefinitely. The other would heat things back up, return to the last position and resume.

Honestly, though, you won't be happy with the results since it's difficult to control filament oozing in these scenarios.

If it were me, I would put my effort into avoiding these rolling blackouts using some kind of notifier and access to that scheduler.