What is the problem?
I need to be able to run cool down gcode commands before shutdown is initiated.
gcode:
M140 20 Bed cool down
M109 R50 Wait until hotend cools down to 50
run these before
![image](https://community.octoprint.org/uploads/default/original/3X/1/8/189d31d9db3c8113293f2f7585340a575f47701d.png)
Specifically, hitting shutdown from Octoprint, wait to cool before shutdown.
What did you already try to solve it?
Tried a couple of different event manager settings to no avail.
Have you tried running in safe mode?
N/A
Did running in safe mode solve the problem?
N/A
Systeminfo Bundle
N/A
Additional information about your setup
Highly modded Anet A6, with pc ps - RPi control, SONOFF S31 Lite Smart Plug wired to gpio, modified Marlin firmware, 2 cams, Text and email notification, custom fans and lighting, solid state x,y,z stop and runout switch.
Plugins:
cmd exec
Gcode system commands
GPIO control
Marlin Slider plugin
Multicam
Most simple way is to put these lines
either at the end of the end gcode in your slicer or in the
After print job completes slot in the OctoPrint GCODEscripts
That's if I am running a print, I have that already.
I need it before I shutdown via octoprint.
Note: I did try in the "Before serial connection to printer is closed".
1 Like
Does your printers firmware support action commands?
I don't know... lol But thank you for your input. That's how I found the answer.
I would think that shutdown event in event manager would work, but I suppose that the serial connection is killed prior to the commands being sent. Which makes me think the GCODE Scripts for "Before serial connection to printer is closed" would have worked, but that might only be triggered if you click disconnect from the UI.
You are correct. That's what I thought too...
-JC
Glad you found a solution
My idea was a small gcode file with you commands and then the shot down host action command.
If you print this file it would send the commands to the printer and shut the pi down afterwards.
Obviously that's just a workaround and it's better to have a correct solution