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

Post On GCode Script - not executing #242

Open calvinbui opened 2 years ago

calvinbui commented 2 years ago

What were you doing?

Turn on my lights with my 3D printer through the Post On GCode Script section. I am using the TP-Link Smartplug plugin to enable sending GCode commands to power on and power off the lights.

The commands are either M80/M81 192.168.3.23/1 or @TPLINKON/@TPLINKOFF 192.168.3.23/1. I can execute these commands from the OctoPrint terminal successfully.

The Gcode however is not executed during power on based on the octoprint and serial logs. The GCode for Pre Off however is executing successfully.

I am powering on and off the printer via the nav bar lightning button.

image

What did you expect to happen?

The Gcode command to be executed.

They are executed when turning off the printer via the nav bar button

What happened instead?

The Gcode was not executed.

Version of OctoPrint-PSUControl

1.0.6

Operating System running OctoPrint

OctoPi RPi4 image

OctoPrint 1.8.1 Python 3.7.3 OctoPi 0.18.0

Printer model & used firmware incl. version

Prusa MK3S+

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

octoprint (1).log serial (3).log

enishi1357 commented 1 year ago

Did you solve this?

Crono141 commented 6 months ago

I have this same problem, but with the pre-off commands.

EDIT: I just looked at your serial log, and I see an "unknown M code" at line 63 of your serial log.