Control light with RPi?

Can anyone tell me if there is an easy way to control a LED light with Octoprint?
What I would like to do is have the RPi turn on an LED light using a GPIO when I am actively printing and turn off the GPIO port when the print is done. I use an LED light to illuminate the print bed on my Ender 3 V2 so that the PiCam can get a good image of the print in progress. No need to have the LED light on when I am not actively printing.
Any ideas of how to do this?
Thanks in advance.

There's various solutions here, using basic on/off GPIO control all the way to individually addressable WS281x LEDs.

The various plugins you might want to look at:

LEDStripControl (octoprint.org)

WS281x LED Status (octoprint.org)

GPIO Control (octoprint.org)

OctoLight (octoprint.org)

And that's just a selection - a quick search on the plugin repository finds many more options :slightly_smiling_face:

1 Like

Thanks! I ended up using Octorelay and it works great. Turns the light on when printing starts, and turns it off when the the print is done.

1 Like