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?
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!)
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.