A Raspberry Pi Remote Mains Switcher, to switch these
with one of these
using the awesome reverse engineering detailed here
git clone https://github.com/WiringPi/WiringPi-Python.git cd WiringPi-Python/ git submodule update --init sudo apt-get install python2.7-dev python-setuptools sudo python setup.py install
You'll need something like this http://proto-pic.co.uk/434mhz-rf-link-transmitter/
Assuming that is the one you buy, the transmitter has 4 pins. Wire
|Tx Pin||Raspberry Pi Header Pin|
|Pin 1 GND||Pin 6 0V (Ground)|
|Pin 2 Data in||Pin 11 GPIO 0|
|Pin 3 Vcc||Pin 2 5.0 VDC Power|
|Pin 4 ANT||173mm antenna wire (not on the Pi!)|
If you've had to read this section, please see the disclaimer below.
Needs to be run as root -
sudo ./strogonanoff_sender.py --channel 1 --button 3 --gpio 0 on
It works for me, but connecting stuff to your Raspberry Pi can destroy either end. If it does, no matter how negligent I've been, I'm sorry, but it's your problem.