Nice mod for Octopi that will let you control relays etc

Hi, I’ve just got octopi running on a raspi. Had a few problems:
Kernal panic - power supply not up to the job (must be more than 1A).
Web cam - didn’t support JPEG (github.com/guysoft/OctoPi/issues/14 For fix).

Then I found I could do this!!

Those of you that use octopi will see that the last four items on the menu are not standard.
So now I can control these items from a remote computer, ipad or phone.

If you connect relays to the gpio pins of the raspi you can switch them from octopi.
I have used 2 5v opto coupled relays:
One to switch the 240V power supply for the printer.
One to switch the 12v leds.

I could have (& may well) connect more: let me think multipole relays to switch between different hotends (drive,heater & thermister).

A little gem of a bit of text on the web:

Using a Grove Relay with the OctoPi image
The SeeedStudio Grove Relay Board is readily available, and very easy to get working.
You will need to install WiringPi as above.
Connect the Relay board to the Raspberry Pi as follows:
VCC -> 5v
GND -> GND
Signal -> any GPIO pin, I used Pin 18
In /etc/init.d/octoprint, add the following at line 77, before RETVAL="$?"
gpio export 18 out
Where “18” is the GPIO pin you’re using.
Next, add to ~/.octoprint/config.yaml, in the system>actions section:

  • action: printer on
    command: gpio -g write 18 1
    name: Turn on the printer
  • action: printer off
    command: gpio -g write 18 0
    confirm: You are about to turn off the printer.
    name: Turn off the printer
    Next, restart your Raspberry Pi. You should now have two options in the System menu. Test them by clicking the options - the relay should turn on and off, and the LED on the Grove Relay Board will light up. Once you have confirmed the relay is working as intended, you can connect the power supply.
    Credit due: found here github.com/foosel/OctoPrint/wik … m-your-RPi

I will make a second post to this thread to reserve space for a walk through if there is intrest.

Post space reserved for walkthrough if intrest.

I’m hoping to do this for my Vertex - I don’t know if it has the same board as the K8200, but many thanks for your helpful explanations they should put me on more or less the right track.

No, The Vertex uses a differend board.