OctoPi.. halt raspberry from printer LCD keypad(Marlin)


#1

Is it possible to halt the raspberry PI from Marlin LCD screen ?. I use the very latest Octopi and Marlin 1.1.9, custom build for CR10/Ender.

I currently have to halt the PI from either a SSH session or from the web browser, and sometimes you just want to switch the printer on/off without a web page / ssh available. This is to prevent a SD card corruption ..

I can easily add/change Marlin for adaption to ease this option. This wouldl be a very useful option, as it is always possible to destroy your Octopi image and force a re-creation of the image, a grace full shutdown is highly advisable.

Thanks


#2

Do you mean halt the entire Pi or shutting down OctoPrint and the the Pi?


#3

Sounds like he needs to do an OctoPrint shutdown plus controlled power switch for the OFF part and a controlled power switch for the ON portion.


#4
  1. If you shutdown the PI ..OctoPrint is shutdown by the process automatically.
  2. I just want to send a command to OctoPi so that Octopi can run a shutdown now command to the PI, as available on the webpage of OctoPi

#5

The final answer is very simple, just connect a push to make switch between pins 5 and 6, and add the following to /boot/config.txt at the bottom of the file

 # this will shutdown the Pi if pressed after power up, and place the Pi in a power down mode,
 # however pressing it again it will boot again.
 dtoverlay=gpio-shut/>down

//----------------------
// You can also toggle a GPIO on power supply, this can switch the printer/light etc
// on on a specific GPIO, even config active low or high, please note you need
// pull up resistor (the shutdown does have this on the PCB) if a other GPIO is used

#dtoverlay=gpio-poweroff,gpiopin=10,active_low=0
#dtoverlay=gpio-poweroff,gpiopin=2,active_low=1

#dtoverlay=gpio-shutdown,gpio_pin=9
#dtoverlay=gpio-poweroff,gpiopin=2,active_low=1