I was keen on turning things ON and OFF remotely by sending an e-mail to the Raspberry Pi. The Mains Switch Widget (MSW) allows me to easily plug in an appliance and use the Raspberry Pi to control it. I looked at Twitter and then text messages to control the MSW. Twitter did not allow me to send the same message twice, which was kind of essential to send ON and OFF commands. Text messages looked a little complicated with either a GSM connection or some sort of text to e-mail service.
Controlling the RPi directly with an e-mail had many advantages. It seemed relatively easy to do and could be expanded to control more than 1 appliance. Please see here for our blog posts on this.
Mains Switch Widget
Since launching the Custard Pi range for the Raspberry Pi, we always get asked for the ability to switch mains powered devices ON and OFF from the RPi as well as other single board computers like the Beaglebobe or a micro controller like the Arduino. I always explain that there is more to switching mains ON and OFF than just using the correct relay.
One has to take into account the following:
1. The correct spacing on the PCB between the mains voltage side and the low voltage side
2. Anchoring the mains cable so that they do not accidentally pull out and touch other parts - thus making them LIVE
3. The correct fusing - to prevent a fire in case of a fault
4. Prevent the user from accidentally touching the PCB with mains voltages on it
All this is taken care of on the Mains Switch Widget. It is supplied in kit form and the user supplies the appropriate mains plug and socket based on the country where the appliance is going to be used.