OctoPrint-PSUControl icon indicating copy to clipboard operation
OctoPrint-PSUControl copied to clipboard

Causes Printer Hangups When Misconfigured

Open AshtonKem opened this issue 2 years ago • 6 comments

What were you doing?

  1. Installed & Configured PSU Control w/ Home Assistant Plugin
  2. Moved Smart Plug somewhere else & renamed it (ran out of them, had more pressing need)
  3. Attempt to print without removing or reconfiguring the plugin

What did you expect to happen?

I expected Octoprint to work normally, without PSU functionality working.

What happened instead?

Continuous printer hangups. The following message was repeated in the log when the printer was hanging up.

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.

This was fixed when I uninstalled both plugins (PSU Control & The Home Assistant Plugin).

I understand that I misconfigured it by moving the smart plug, but I also don't think it should render octoprint effectively inoperable when misconfigured.

Version of OctoPrint-PSUControl

I uninstalled it, but latest stable version. Updating was part of my triage.

Operating System running OctoPrint

OctoPrint 1.8.1 Python 3.7.3 OctoPi 0.18.0

Printer model & used firmware incl. version

Ender 5 Pro, Marlin 2.0.x

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

octoprint.log serial.log

I believe the following snipped is the culprit. This happened when the printing halted, perhaps this is a blocking operation?

2022-06-21 03:46:53,575 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by M140)
2022-06-21 03:46:53,575 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2022-06-21 03:46:53,632 - octoprint.plugins.psucontrol_homeassistant - WARNING - Server returned 404 Not Found. Check Entity ID.
2022-06-21 03:46:58,783 - octoprint.plugins.psucontrol_homeassistant - WARNING - Server returned 404 Not Found. Check Entity ID.
2022-06-21 03:46:58,797 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by M106)
2022-06-21 03:46:58,798 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2022-06-21 03:46:58,853 - octoprint.plugins.psucontrol_homeassistant - WARNING - Server returned 404 Not Found. Check Entity ID.
2022-06-21 03:47:03,925 - octoprint.util.comm - INFO - Communication timeout while printing, trying to trigger response from printer.
2022-06-21 03:47:03,961 - octoprint.util.comm - INFO - Changing monitoring state from "Cancelling" to "Operational"

AshtonKem avatar Jun 21 '22 13:06 AshtonKem

I have this exact issue though not from misconfiguration. I restarted my HomeAssistant instance while a print was going and all of a sudden it slowed to a few commands a seconds with the same error on the Octoprint console

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.

My HomeAssistant is now back up again but the printer has not recovered to normal operation. The print is 90% done so I'm going to leave it and see what happens.

It's not limited to HomeAssistant though, I used to use OpenHab and I had the same problem when it was down and I started a new print.

duanemck avatar Jan 27 '23 14:01 duanemck

This seems to be the culprit, it looks like it's spamming HA with "Turn On" commands even though it is on:

2023-01-27 15:01:59,620 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:01:59,989 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:01:59,989 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:00,481 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:00,481 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:01,118 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:01,118 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:01,615 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:01,616 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:02,045 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:02,046 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:02,521 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:02,521 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:02,916 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:02,917 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:03,358 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:03,359 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:03,864 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:03,865 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:04,322 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:04,323 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:04,721 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:04,721 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:05,097 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:05,097 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:05,538 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G0)
2023-01-27 15:02:05,539 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:05,968 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:05,969 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:06,720 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:06,721 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:07,221 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:07,221 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:07,692 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:07,693 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:08,226 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:08,226 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:08,653 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:08,653 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:09,033 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:09,034 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:09,473 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)
2023-01-27 15:02:09,473 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-01-27 15:02:09,879 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G1)

duanemck avatar Jan 27 '23 15:01 duanemck

I went into settings and unchecked the following boxes, when I saved the printer immediately kicked back into life:

image image

Not sure which one fixed it

duanemck avatar Jan 27 '23 15:01 duanemck

I'm experiencing the same issue, using the Home-Assistant integration...

It seems that an "easy fix" might be to check whether Octoprint has an active Serial Connection, and skip any "Power On and Wait for Printer to be ready".

I have not had a look at the code though...

FrederikNJS avatar Feb 11 '23 20:02 FrederikNJS

Same with fritzplug installation within Homebridge. Since years now. I switched from tplink to fritzplug to deal with that issue. With no success. I'll try @duanemck s solution

sebbl2 avatar Mar 02 '23 05:03 sebbl2

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

ulope avatar Jun 30 '23 15:06 ulope