Bug "Communication timeout while printing"

Yes, I have the "Automatically turn PSU on" turned on.

This is a bug, because if the HA reboots or the network goes down while printing, the print gets trashed just because this plugin does not resolve softly the connectivity issue, bugging the printer to the point of being useless.

PS: Hangs Octoprint while communication with HA is not viable · Issue #11 · edekeijzer/OctoPrint-PSUControl-HomeAssistant · GitHub

Alright, is your printer controller also switched on via PSUControl? (Off would mean OctoPrint is disconnected from the controller.)

No, my Octoprint instance (RPi) is not switched on/off by the smart plug that controls the power status of the printer.

Not OctoPrint. The actual printer controller that drives the motors, hotend, bed, etc...

The smart plug is controlling the printer power supply on/off, as well the printer controller (mainboard with the STM32).

My setup is an Ender 3 V2, Zigbee smart plug, RPi 3b+ with octoprint. And the Home Assistant controlling the said smart plug.

The printer and the controller are not run by the same PSU? :face_with_raised_eyebrow:

Yes, they are.

So one PSU is for the bed and the hotend and another PSU for the rest in the printer?

In that case, you don't need the 'automatically turn PSU on' option checked, as it is useless. At least as far as I understand the option.

It is used for printer controllers that stay powered & connected when the power supply they are switching is off. When a gcode command is sent, the power is turned on. If your printer is disconnected from OctoPrint when the power is turned off, no gcode commands can be sent anyway which is what makes it useless.

No.

As I stated, the printer PSU is integrated within the printer itself. It's an Ender 3 V2 (switched on/off by a zigbee smart plug) and one Rpi 3B+ running Octoprint (plugged in straight from the wall continuously).

I see. This sentence was not quite clear:

I have a similar setup and found this plugin while searching for a way to have my printer automatically turn on when a print job starts, namely from Cura. It sounds like this plugin isn't actually capable of accomplishing that? Initial testing seems to confirm that but I'm no expert so maybe I'm missing something. However, if that's the case, are there any other plugins that do essentially the same thing but triggered by a print job from Cura rather than gcode commands?

Edit: Turns out this was just an issue with Home Assistant that was fixed with a restart. I was able to accomplish what I want by leaving "Automatically turn PSU ON" disabled and only enabling "Turn on prior to printing after API upload" (I also have "Connect when powered on." enabled but not sure if it matters). In the Cura Octopi settings, I enabled "Turn on printer with PSU Control". Now, starting a print from Cura automatically turns on the printer but power cycling HA doesn't seem to cause any delays or issues with the prints.

Try USB 2 sockets instead of USB 3 ( RPi 4 )
I just recently set this up after a couple of years in storage, kept seeing artifacts from the camera and getting timeouts, short shielded cable etc. Switched to a USB 2 socket, all problems gone. I suspect somehow theres a grounding issue or some noise from the extra pins on the 3 sockets, not sure but that fixed it for me.