Shutdown PI after print job is done

Just curios why there is no option in the OctoPrint settings to have the RPI shutdown after the print is complete. I thought it would be nice that once the print is done to have the RPI shutdown, so that when I come to the printer later I can just power off the printer without having to go to my PC and log in just to make it shutdown.

Hello @mikemoy !

You may have a look at the OctoPrint plugin repository:

There are some plugins

1 Like

Thanks for the reply!
I did go through the whole Rep. Unless I missed it, The only thing I found was a hardware way for doing it. Was hopeing for a simpler solution like:

" shutdown RPI after x minutes when printing finished"

Ah, wait it seems that one's not compatible to Python 3, it's been abandoned for a long time. So probably won't work.

I use the following plugin in combination with a smart-plug (sonoff pow with tasmota REST-Endpoint).
I am running OP 1.7.2 with Py 3.7.3

Thanks, but I am looking to shutdown the RPI safely after the print is done.

With my Tasmota or TPLink Smartplug plugins that is possible utilizing a combination of settings. I've documented it here.

If you want a plug that has this functionality, but not use a plugin, you can use "octoplugout". See GitHub - ruedli/OctoPlugout: Customize a Sonoff plug for Octoprint communication and power switching

This connects directly with Octoprint through its API. It can wait for the printer to finish a printjob, wait for the extruder to cooldown and do a shutdown of the Pi. After that it will also power off both printer and Pi, which is nice if you power the Pi directly from the printer PSU.

All this is achieved without any physical connection with the Pi. So no GPIO pins, it all works via WiFi and the power cord itself (for cutting the power).

Early versions had the disadvantage that they could not be operated from MQTT, only with the "physical" button on the relay and automatically by monitoring the printjob. The latest version can be operated via Wifi, so if you want to trigger a safe shutdown / poweroff from the Octoprint GUI you can also achieve that with the MQTT. Power on is also possible via MQTT.

FYI @mikemoy - the plugin I linked above, while still unmaintained has been updated to at least be compatible with Python 3 now.

I use the "Shutdown printer" plugin to do that:
activate "mode GCODE" and put in some dummy g-code command like "M104 T0 S0"
then at " Extra command/script" enter "sudo shutdown -h now"

This will do the job.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.