The safest way of controlling power sockets

More than a year ago, I bought a PiFace to be able to control power sockets. This is something that I've been doing for a long time with an Aviosys 9258 device. This is nothing much more than an IP interface bundled with four relays to switch power sockets. The box has a web interface for normal users and an API as well to implement more sophisticated uses. I integrated mine to my Asterisk PBX system, so with a phone call I can switch power outlets. This is handy, as I can have programmable keys on the phone for address book entries. So what I did was to put the relevant extension to the address book and with a touch of a button, I can invert the outlet. As the phone immediately hangs up after, this is truly just a press of a button. I also have icons on my taskbar to switch power outlets on and off, so whenever the laptop screams about an empty batter, I just click an icon and the charger is lit up.

The Aviosys device did really work well, although it's quite expensive, costing around £100. Somebody who is a bit more hands-on with DIY and soldering could easily build something like this for much less. I'm however not a very DIY person, so I had no option to do it for less. Then came the PiFace which is basically a circuit board for the Raspberry Pi adding extra inputs, outputs and relays. The board and its interfaces can easily be controlled from the Raspberry Pi and most of the soldering is now history. However, this is still not as compact as I'd hoped and some DIY is still required. Of course, I did build stuff, like blinking leds, making light controlled junctions for matchbox cars etc, but when it comes to business and controlling 230V, I don't really trust myself. And I certainly wouldn't want something around that is not entirely safe and/or foolproof. No need for anybody to get electrocuted. Not to mention safety from the Pi's point of view. The last thing I need is a thunder striking into the mains and frying up everything that's connected - that includes the Pi as well. No thanks. So when I read about the energenie Pi accessories, I really got excited. Because they do exactly what I wanted to build myself, but never was able to. An RF controlled outlet.

Introducing radio frequencies (RF) is a great thing, as it eliminates the galvanic connection. No more risk of electrocution, or misconnecting wires. Low and high voltage equipment is properly isolated from one another, totally eliminating the risk. Example scripts are provided by Energenie, in python. What I recommend doing, is a small CGI so you'd have a web interface to turn power sockets on/off.