kantlivelong / OctoPrint-PSUControl

Smart control of your power supply via GPIO, GCODE Command, System Command, or variety of sub-plugins.
GNU Affero General Public License v3.0
202 stars 112 forks source link

Print stutters while Homeassistant is unavailable #262

Open MrJoki007 opened 1 year ago

MrJoki007 commented 1 year ago

Im using the PSU Control and PSU Control Homeassistant plugin, to turn my printer automaticaly off. If my homeassistant gets unavailabe my printer starts to stutter.

  1. Start print
  2. Turn off homeassistant
  3. ...

What did you expect to happen?

Print continues as normal

What happened instead?

Print stutters

Version of OctoPrint-PSUControl

PSU Control (1.0.6) PSU Control - Home Assistant (1.0.5)

Operating System running OctoPrint

DietPi on ThinClient

Printer model & used firmware incl. version

Prusa i3 MK3s+ 3.11.2

Link to octoprint.log with octoprnt.plugins.psucontrol set to DEBUG

https://gist.github.com/MrJoki007/a048b1c4c08eb1c9d5ceeca03c597708

ulope commented 1 year ago

Same problem here. I think there are multiple issues here:

  1. There's no need to try "turning on" the printer while it's clearly already printing (i.e. serial connection is established and state is printing)
  2. The network request to HASS shouldn't block the whole octoprint main thread.
ulope commented 1 year ago

Similar issues with other sub-plugins: #259, #243

AJolly commented 8 months ago

I get this issue even when HA is available, and everything has a wired ethernet connection. Was wondering wtf had happened to my printer.