No good way. The problem is after the connection error your printer probably restarted.
That means it has no idea where your printhead and your bed is located at the moment.
So you would have to calibrate it without homing (I don't even now if that's possible) and start a new print mid air which starts at the point where the old one stopped.
TL;DR - no
Try to encase the mainbord box with something like aluminum foil (but keep the fan holes open)
It is not possible that the printer restarts because as written I can work from SD-Card while my wife is working on the sewing machine. She was working for more than an hour on the machine while the printer was doing its print job.
That means - whatever it is - it has influence on the USB-connection but not on the rest of the printer.
It remains cabel, Pi, Pi-Power or only the USB-interface of the printer.
Big motors like you might find in compressors (air conditioner, refrigerator) or in things with a flywheel mechanism (sewing machine) pull large amounts of current on their startup phase. You could probably also recreate this problem with an old-school kid's racetrack with the hand-held yellow trigger devices.
So when "big current" is needed, it pulls that from the mains. The net result is that everything else sees a reduction of the voltage. In my case here, a voltmeter in any outlet would go from the expected 120VAC down to perhaps 106VAC over a short period of time.
Next up, the power adapter for the Pi has a transformer which is a simple device. There is a ratio of coils of wire which is preset and that ratio is calculated for 120VAC being on the primary side of that. So when that's less, the output side is less by the same percentage and the Raspberry Pi is suddently in an undervoltage condition. The logical threshold which determines the difference between a one and a zero is now lower than where it's supposed to be and serial communications are trashed.
Solution: Plug your 3D printer into a UPS and call it a day.
Hi, again same error a few moments ago, I will try the UPS , because I have one and I get back to you guys after that....
But... with the previous Octoprint version I never had this issue, so maybe is something else
If the interference is coming through the AC lines, then "load" on the sewing machine may be as much of a factor as just "use" of the sewing machine. I agree that a UPS should help if this is the case.
Hello all, hi have the same issue, I'm using ports to connect 3 printers (octopi.local:5001 or 5002 or 5003), but is random to stop any printer can stop with a long time of printing, I'm changing cords and new adapter for my Raspberry Pi 3, but still continues the error, is necessary make a down grade Octoprint and install all again? thanks!