My Enders 3 V2 Neo sometimes breaks communication to the PI. Or the PI breaks communication. As shown:
Send: N343684 G1 X195.82 Y88.57 E767.38736*102
Send: N343685 G1 X194.195 Y89.547 E767.4252*92
Unexpected error while reading serial port, please consult octoprint.log for details: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:3997
Please see https://faq.octoprint.org/serialerror for possible reasons of this.
Changing monitoring state from "Printing" to "Offline after error"
Connection closed, closing down monitor
(This sometimes happens when I switch on the lights. Go figure...)
After which the Enders sits waiting for the next command, politely and indefinitely.
However the OctoPrint seems to think the print is over, and resets everything. So when I reconnect it wants to start again. A days printing lost in a second....
Obviously I have wasted hours (days) of print time, and a lot of filament.
Simple question: How do I get Octoprint to re-connect and continue printing exactly where it left off please?
Additional information about your setup
OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible
I am impressed you guessed correctly what was causing my Enders to disconnect. I do have a bank of LED lights driven by a big old transformer. I can replace that in time.
I tried the plugin you suggested: Power loss/disconnect recovery.
After loss of connection I had to manually unplug the PI. The head waited in exactly the same position it was left in. On restart Octoprint gave me the option to recover the print. Great!!
However, something after the reconnection raised the head by about 10mm, so it continued printing into thin air. Therefore breaking the print. So only half success. (I'll report this on the plugin page.)
What we need here is for OctoPrint to just remake the connection, and continue the print. It only needs to try again once, and should complete this instantly, before the head even has a chance to cool down.
Is there a way I can sponsor a developer to do this? Perhaps with beer??
As suggested in the other thread, the plugin does exactly what it was told to do. You simply did not configure the plugin to match your printer. Set Z_HOMING_HEIGHT to 10 (assuming this is the value your printer moved) and it would have recovered at the proper position.
To do what you want and instantly reconnect you can use the Powerloss plugin with the automatic recovery box checked, and use the Portfinder plugin, which will auto-connect the printer.
I'll accept beer for the many hours I've already put into this.
Sorry cant help with reconnection but can confirm comms situation can be caused by EMI (on ender 3v2 anyways) and I resolved by putting an in line mains EMI filter which is a pretty easy solution or you can get multiboxes that have filters built in as well.