I am using the GCODE macro script to run an end-sequence of the job, ensuring cooling down, shutdown Pi and poweroff. Shutdown and poweroff are done by the Tasmota plugin and work (using the M81 gcode)..
I have the following GCODE when finishing (a single line):
@shutdown_power
Shutdown power is defined as follows (also a single line):
M117 Cooling down
;
M109 S50 ; wait for extruder temp (cooling)
M109 R50 ; wait for extruder temp (cooling)
G4 S1
;
M104 S0 ; turn off temperature
M117 Shutdown/poweroff
M81 MK3S 1
;======================= Stop printer
Strictly speaking only one M109 R50 is needed, but I used both just to be sure the firmware is not causing a problem.
The problem is that "M81 MK3S 1" is executed, without waiting for the printer to cooldown. It looks like it is "just" executing", but not waiting for the command to complete.
By contrast: if I add the M109 to the endcode, everything works, so whithout the scipt altered, these three lines work as a workaround:
M109 S50 ;
M109 R50 ;
@shutdown_power
ALSO: If I split the commands over two macros, it works:
What were you doing?
I am using the GCODE macro script to run an end-sequence of the job, ensuring cooling down, shutdown Pi and poweroff. Shutdown and poweroff are done by the Tasmota plugin and work (using the M81 gcode)..
I have the following GCODE when finishing (a single line):
@shutdown_power
Shutdown power is defined as follows (also a single line):
{% include "shutdown_tasmota.gcode" %}
The content of the gcode file is:
pi@octopi:~/.octoprint/data/gcode_macro $ cat shutdown_tasmota.gcode
Strictly speaking only one M109 R50 is needed, but I used both just to be sure the firmware is not causing a problem.
The problem is that "M81 MK3S 1" is executed, without waiting for the printer to cooldown. It looks like it is "just" executing", but not waiting for the command to complete.
By contrast: if I add the M109 to the endcode, everything works, so whithout the scipt altered, these three lines work as a workaround:
ALSO: If I split the commands over two macros, it works:
Using a prusa MK3S+, latest firmware 3.12.2 System bundle included. octoprint-systeminfo-20230613195238.zip