Automatic Shutdown - shutdown command help


Hi, I'm using 1.3.7 (stable) with the Automatic Shutdown plugin installed (amongst others) on OctoPi. I have my Pi set up with a GPIO relay, so that the Automatic Shutdown actually powers down the printer itself, rather than just the Pi, when the print finishes.

At the moment, I have changed the OctoPrint Settings -> Server -> Shutdown System command to sudo and created a bash script that does it for me, which works. However, instead, I would like to enter a native OctoPrint command in the Shutdown System field to first disconnect the printer, then trigger the two GPIO ports - which flip the relays cutting the live & neutral connections. I can actually get this to work from a menu item in config.yaml - so I know that the command works, but I can't get it to work here, in the Shutdown System field

disconnect; gpio -g write 17 1; gpio -g write 18 1

What do I need to do to get it to run from the Shutdown System field - or is it impossible & I should just stick with my working bash script? Thanks.


Stick with your working bash script. Those commands there are (at least currently) supposed to be one command to call, not multiple chained ones, so a bash script doing everything you want is the right approach.


Thanks, will do, much appreciated.