First I apologize if this topic has already been mentioned, but I didn't find anything useful yet.
I'm runing Octoprint on a Raspberry Pi 3 B+, everything is working perfectly.
I've managed to create "buttons" on the web interface in order to control gpio and a 4-way relay behind it.
This relay allow me to control a few things, PSU, lights, Hotbed and Printer.
I wanted to add somehting more to my configuration, but since I'm new to all of this it's a bit obscure, and also I think I don't have the rights words to express myself.
I would like to use 4 physical push button, in order to control my 4-way relay (in addition to the web interface).
These buttons will be assigned to a specific relay, and when pushed, they will "invert" the status of the relay. Meaning that if the relay is open it will close it, and if it's closed it will open it.
I know how to change the status of a gpio using WiringPi, but this task is a bit more difficult, I will need to read the status of 4 entries in some sort of loop and then make a decision based on what is done.
On paper it seems easy, but I'm a bit lost here to apply this.
Thanks in advance for your help.