Safe Automated Mains Sockets page describes how to turn mains powered appliances on and off under computer control without risking killing yourself. It describes how to use a Raspberry PI computer to control three mains sockets. Audacity was used to capture the codes from the original RF remote, and the captured codes were sent to RF controllable outlets with small Linux software and cheap 433 MHz RF transmitter module. Nice idea. There is also article on this at MagPi magazine.