I love my little raspberry pi, and I am reviving an old home automation project, but instead of transmitting (in the old project, a butchered remote control) a signal at 433MHz (described here) to control plug sockets, I am trying to wire it up to the main lighting circuit in a room. I know that I could use that device, but it is quite bulky, and there is no way to accurately view the status of the device (i.e. rouge signals, other controllers, pressing the override button on the device itself).
To do this, I am going to open up the light switch, install a small 5v transformer to power the pi, then build a GPIO interface board that will control a set of relays that would be handling 240v, and a maximum of 13A (that is the fuse rating in the main fuse box).
Now, the interface between the GPIO pins and the Relay is causing me some issues. Can anyone provide any assistance, whether it be a circuit diagram or a module that I could reverse engineer, that can convert a 1-bit output from a GPIO pin to a relay capably of safely handling a mains supply?
I have done some searching so far, but the only components I can find so far that can be triggered by a GPIO pin can't handle 240v. I am also worried about any feedback or other circumstances that could cause damage to the GPIO controller (or worse, the entire device).