I have searched the internet in it appears that there is no way to recover a print after a power loss when printing with octoprint. My Ender5 pro with Marlin has no problem recovering after power loss when printing off sd card. i love the fact that octoprint allow you to see and control you prints when your away, but what the point of having all those features if you can't recover a print isn't that kinda the whole purpose of octoprint. I have lost 3 print in the last mouth 40 to 50 hour prints do to monterey loss of power 5 to 10 min. wsa able to repair one of them but that was a major pain. Guess its good by to Octoprint and back to just printing off of sd card.
As you declare no problem, I moved this to
If you have such a bad mains power, you‘d better secure your printer with a UPS.
Sometimes, compromises must be made in life. OctoPrint's purpose (and the point of using it) is to enable all the additional features it brings to using your 3D Printer. Power loss recovery is not possible for the printer to perform when printing via USB since it has no knowledge of the whole gcode file to save it's progress. Most people will sacrifice this single firmware feature to be able to use OctoPrint - being able to recover the print has never been a purpose of OctoPrint. If you would like to use PLR, then don't use OctoPrint - you can make that decision yourself
Even a big ups cant maintain a printer for long. i have a UPS shield on my pi and ue a Shelly 1 pm to turn on and off print and power monitor uasgae.How hard word it to make a plug in that senses when there is a loss of power and at least retain the memory to allow me to manually restart the print. I have a program that can with my UPS hat that when voltage starts to get to low the pi scences it and shut down to prevent file corruption. Why cant we implement this into Octoprint make it were you have to be physically there with the printer if you are afraid of being sued if something goes wrong,
Even smaller UPS can maintain 5-10 minutes power for your printer.
A $120-$150 UPS 30-60 minutes..
I tested it just for you:
my cheapo $65 800VA UPS was able to maintain the power (printer + pi + usb webcam with led lights) for almost 28 minutes (pulled the plug when I started the print)
It could be via plugin, but there all kinds of caveats that have to be taken into account including but not limited to z height position loss due to no power, bed cooling and part popping off prior to power being restored, printer buffer (ocotprint sends gcode commands and has no knowledge of what lines the printer has actually completed physically). There have been several people that have said they would embark on making this plugin, especially after Marlin introduced Position Auto-Report | Marlin Firmware, but that still has to be enabled in firmware and I never saw any results out of those individuals.