Thought I would post this here as may help other Octoprint users who experience intermittent serial communications errors to their printer (Ender 3v2 in my case) over USB. Symptoms include errors such as the following from the Serial log:
Communication timeout while printing, trying to trigger response from printer. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves....
As part of trying to resolve this I had tried new USB cable, adding a Ferrite core to the mains cable and inside the printer on the display ribbon cable as well as extra DC filtering on the Ender logic pcb 3.3v rail and fixed lack of earthing on the printer, put additional filtering on the +5v and +3.3v on the Raspberry Pi all to no avail. Errors would happen after 17hrs print or a few minutes - very random.
After noting the Ender power supply has a lack of mains filtering I thought I would try adding a standard EMI filter and so purchased one but it would not fit in the cabinet so instead of getting another smaller type I housed the filter into an enclosure and connected to the printer and since then (some 2 weeks of pretty heavy printing) I have not had another failure (fingers crossed).
Note I have not tried a commercially available filter as shown in the pictures but will do at some point in time.
Anyway - hopefully if someone else has similar problems I would be interested if mains line filtering also resolves the problem