Continuing on my quest to control everything in my house from a phone or computer, over the last few days I’ve been working on controlling relays over my home network with a raspberry pi. I stumbled upon a really great framework for controlling the pi’s GPIO pins through the web called WebIOPi. It makes it very easy to serve a web app off the pi to control or see input from the pins, as well as providing an easy way to do the same in locally run python scripts.

First I set up a fresh install of raspbian, then just followed the installation instructions provided on the WebIOPi website. I used a model 2 pi, so I also had to use this patch to change the memory mapping.

It’s always fun to really be able to see your project work, so instead of being satisfied hearing the relay click on and off, I connected it to some LED strips I stuck in my radiators.IMG_0216

The wiring was very cleanIMG_0215

I also wrote some bash scripts to make it easier to start and stop the whole program, as well as making it automatically initialize at startup.IMG_0217

In the end, I can now turn my radiators red from my phone. Not the most useful project, but it looks pretty cool and I gained a lot of experience in stuff I had never done before. Next step is to build a nicer controller app more specific to my room, and put more things under the pi’s control.