I have an Anycubic i3 Mega. When i print "offline" via SD-Card and the print is finished, the PSU Fan and Mainboard Fan are cooling down the printer for about 5 minutes after the print. Is it possible to add a delay in the Automatic Shutdown Plugin? Where you have multiple options, e.g. "Shutdown printer 5 minutes after print is finished" ; "Shutdown printer 2 minutes after print is finished" and so on.
the "shutdown" is usually done trough G-CODE (mostly disabling the printer with M18 or M84 or both) ... so all you want to do is find where you are injecting this M18 or M84 (end of print in octoprint or end of script in your slicer or ...) and remove it ..
then you at the scripts part of the gcode edit "ending scripts" and add something like
M400 ; wait for queue to be empty
G4 S300 ; wait 300seconds
M84 ; disable steppers
I use a "sonoff POW" for remotely turn on/off my Printer.
Under Settings / Octoprint / Server I added a shellscript e.g. /home/pi/scripts/myShutdownScript.sh
So each time the system is shutdown (via plugin or web-menu) this script is executed.
The script looks like this:
#!/bin/bash
echo "Shutdown System and power of after a short delay"
echo "...Sonoff call..."
curl "http://192.168.178.38/cm?cmnd=Backlog%20Delay%20250;Power%20Off"
echo "...shutdown..."
sudo shutdown -h now
You can replace the sonoff-call with something like sleep 5m
Ok. So i created an script and "imported" it into Octoprint. Sadly itΒ΄s not working, and i donΒ΄t have any idea whats the problem. Can you have a look at these please?
I would be very happy if you can help me to fix this problem.
So i would like to create a script, that shuts down the printer (and maybe the Raspberry too) after a finished print, then wait (for example) 5 minutes and then shut it down.
When i start the script directly from the putty session via "./ShutdownScript.sh" it runs like it should. But from the octoprint web UI itΒ΄s not working. I also added "sudo" to the command. But what is the problem?
BTW: Is there an option to add an Marlin Command to a shell script? And if yes, how?