A while back I set up a little home automation using a USB 433Mhz transmitter to control some RF sockets I had lying around. The primary aim was to replace the timer I used to run my lamps, which needed constant changing throughout the year.
It worked, and I even made a couple of tweaks to update the timer so that it automatically came on around sunset, thereby switching itself on at an appropriate (ish) time without any interaction from me.
The project wasn’t particularly expensive, using a Telldus TellStick that cost about £55. I also needed a computer to trigger it, which I already had. The two combined make it quite expensive if you wanted to start from scratch, and the TellSticks aren’t easy to find (in the UK at least). Other alternative USB transmitters are dearer still.
With the arrival of the Raspberry Pi I could solve the issue of an expensive computer, plus reduce the power required. I started looking around and thought I could use a cheap 433Mhz transmitter and use the Pi’s GPIO pins to drive it. And so my quest began.
As I said, I had done my research. Google and the Pi forums proved my friend and I soon decided to grab a small 433Mhz transmitter from Amazon, this one in fact. Which cost a rather pricey £5.59 (for this sort of transmitter anyway, see below).
I also picked up some jumper wires, figuring I could simply attach them onto the GPIO pins and the pins on the transmitter. That didn’t go so well. I eventually gave up and purchased a GPIO starter kit off eBay (doesn’t look like it’s on eBay any more, but you can still buy direct from Smart-Elex, plenty of others are available too).
For £9.50, the kit provided me with a some LEDs, switches, resistors, a heap of jumper cables and, more importantly, an 830 point breadboard, a cable and a GPIO breakout kit (like the Cobbler). This made working on things much easier.
I tried a lot of different libraries (rf-bitbanger, RCSwitch-pi, and others) but couldn’t get it work, so gave up and figured I would some back to it later, hoping someone would develop an easier solution.
In hindsight, I had two problems:
- It appears I didn’t have my transmitter wired up correctly (there isn’t anything on the pins to indicate what does what aside from the antenna).
- I didn’t have a receiver to allow me to capture the signals from my handset, so I had to rely on what others had found.
A Second Go
It came back around to me thinking about the project again (thanks to this post) and I started yet more research. I liked the look of pilight (although I found it hard to install, with apt-get failing on me, got there with a git clone). Around this time I figured out my transmitter had been hooked up wrong so was excited to try this new option. Continue reading…