Control the BTT Relay 1.2 (reset) via Octoprint / RPi4

Good morning all,

Call to Raspberry Pi programmers. Request help for a project. My programming knowledge is very weak or even zero.

Project: Control the BTT Relay 1.2 (reset) via Octoprint / RPi4 to turn the printer back on.

Currently: A momentary button is connected to the pins "5V" and "RST" / ground on the BTT Relay 1.2. When the button is pressed, the 5V is grounded and the relay closes = the printer turns back on.

My goal: Add in addition to the current physical button, a "virtual" button via GPIO on the Rasberry Pi and controllable via Octoprint to turn printer on.

Question: Is it possible? If yes, how should I proceed?

you can control a relay from octopi using the "Enclosure Plugin" (https://github.com/vitormhenrique/OctoPrint-Enclosure)

There are lots of DC 5V Relay Modules avaliable
(https://www.amazon.com/s?k=DC+5V+Relay+Module&ref=nb_sb_noss)
I use them with the Enclosure plugin to turn on the printer lights and the exhaust fan as needed.

Personally I use smart switches on my Rpi and my printer so I can turn both on (or off) remotely. The smart switches have manual buttons to turn them on/off and as a bonus they monitor and record power usage.
(https://www.amazon.com/s?k=smart+plug&ref=nb_sb_noss_2)

Note: I'm not endorsing any particular retailer, relay, or smart plug, there are many to choose from. The links above are provided solely for reference (other than Enclosure, That plugin is the Bomb!)

Hi, did You manage to solve this problem, I would like to turn printer off by g-code and turn it back on by RPI.

There are already other solutions:

https://community.octoprint.org/search?q=relay%20gpio

Also you may look into the OctoPrint Repository for plugins

Hi,

I am not sure whether this is right. I am not a electronics expert but it works for me.

Connect any pin from raspberry pi to the reset/ground pin in the diagram from original post. Ex: pin14 of raspberry pi to reset pin (note: Not to the 5v pin of the relay the other pin which says ground or reset) of the btt relay. Use gpio control or relay control add-on to turn on and off pin14 to reset the relay.

Needless to say the raspberry pi power is separate from printer power otherwise this doesn't make any sense.