Do you want to remotely control power to your Taz and peripherals?

Do the following:

  1. Get one of these (relay power strip):

  2. Make one of these (Octopi): (I suggest this for simplicity

Once you have Octoprint up and running…

  1. Do this:

-. Hardware and setup:

Remember, there are two ways to refer to GPIO pins; board, and BCM. Board means the physical pin number, BCM means the port number. Above, when adding the line to the init.d/octoprint file, the entry assumes BCN. So in this case, if you are using physical GPIO pin 7, its BCM address is 4.

So what you have in the end is this:


gpio export 4 out (line 77, where export makes GPIO available to octoprint, 4 sets the BCM pin number (pysical GPIO pin 7), and “out” sets the GPIO as outputing the state [1 or 0, on or off] )

RETVAL="$?" (existing line)

Your config. yaml looks like this:


  • action: printer on
    command: gpio -g write 7 1
    name: Turn on the printer
  • action: printer off
    command: gpio -g write 7 0
    confirm: You are about to turn off the printer.
    name: Turn off the printer**

Note: You can make the text in “Name” and “Confirm” anything you want.

So there ya go, what you get in the end is an install of "WiringPi ", a pair of normally OFF and a pair of normally ON plugs in a relay controlled power strip. Two wires leading out the side that plug into your Raspberry Pi, and a couple of new commands in Octoprint for turning stuff on and off.

Credits go to:
Gina Häußge (foosel) aka Ms. Octoprint!
Digital Loggers Direct ( for making cool stuff like this relay.

Nice mod, thanks!

I was only aware of the power tail nice to see another option with more outlets and both NO and NC relays built in. It looks like the power tails advantage is size and the placement flexibility of the cable pigtails.

These 5v relays are available in a variety of sizes.
I’m using a 4 gang version -

There is a very nice case for it on Thingiverse -

Best regards,

Agreed, this is a good solution, but much riskier for a layman. Wit these relays, you must be absolutely confident that you are wiring it correctly and that you understand that you are dealing directly with mains voltage.

With the Loggers solution, you are only controlling a power strip with 3.3 volts for all intent and purpose, and one with built in fail safes.