Thank You very much for this guide.
I want to extend this with a Power-Relay for the AC-Supply of my Printer.
I need my Printer not very often, ant want to automatically break the AC Supply, if the Printer is not needed. Now i have a little Print-Server installed to the printer, and power it via the Power-Switch of the Printer. But it would be very conveniant, when i can start a printing job via a RaspberryPi ant the Printer gets turned on automatically, if the job is reported as finished, a delay starts, after that my RaspberryPi Print Server breaks the AC Power of the Printer.
The Relay and proper Handling of the AC Power is no Problem for me, but the code to use a GPIO for controlling the Relay is the tricky part for me. Is there any advice, or is there someone, who already solved that Problem?