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
203 stars 113 forks source link

PSU Control sends postPowerOn commands after print starts. #175

Closed CharlieTemplar closed 3 years ago

CharlieTemplar commented 3 years ago

What were you doing?

Printing via Octoprint/Klipper

What did you expect to happen?

Pre-Heat and Print

What happened instead?

PSU control had already switched on, was reporting isPSUOn:True and everything else was good and reporting ready. PressedPrint in Octoprint, Heater ON gcode sent and PSU Control sent the postPowerOn code (FIRMWARE_RESTART) which caused the printer board to report Not Ready and octoprint to cancel the print. heat-on, Firmware-restart, heat-off then home. log contains 2 instances of this and tried many other times with various options.

Version of OctoPrint-PSUControl

OctoPrint 1.5.3 PSU Control (0.1.11) (+ #166)

Operating System running OctoPrint

Raspbian Jessie

Printer model & used firmware incl. version

SKR1.3, Pi2b, Klipper (v0.9.1-278-g1c1c517), Delta

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

serial.log octoprint.log

Wiring diagram

NA

kantlivelong commented 3 years ago

Are you sending M80 anywhere? (gco, octoprint scripts, etc...?)

CharlieTemplar commented 3 years ago

No, only in the PSU plugin afaik... image

D_calibrate_size.gcode

kantlivelong commented 3 years ago

If you could, since you know how to patch. Can you modify using the below and recapture logs:

    def hook_gcode_queuing(self, comm_instance, phase, cmd, cmd_type, gcode, *args, **kwargs):
        skipQueuing = False

to

    def hook_gcode_queuing(self, comm_instance, phase, cmd, cmd_type, gcode, *args, **kwargs):
        self._logger.debug(cmd)
        skipQueuing = False
kantlivelong commented 3 years ago

Closed due to inactivity.