Home automation in an afternoon

A while ago I acquired a Raspberry Pi Model B, and set about trying to hack it to do as many things as possible. I eventually settled on connecting a large USB drive use it as a NAS (although unfortunately it was a little too unreliable for TimeMachine backups), and connecting it to my stereo amp via a cheap PCM2704 USB DAC, as an AirPlay server.

So now I can stream music from my iTunes library or iPhone to my HIFI, great! Except I still have to remember to switch the amp (which lives in a cupboard in the hallway, with the Raspbery Pi, seperate from the speakers in the sitting room) on and off every time I use it, what a pain. FWP I know.

Anyway, when I happened accross this blog post about a Pi add on for controller RC mains sockets, I was inspired.

Upon recieving my pimote stater kit including two RC sockets, it became the afternoon's challenge to start switching my Amp on and off from my phone. The starter guide proved reasonably idiot proof, and I'd heard the bottle was the easiest way to get a web service up and running in python (it probably is).

Few more than 200 lines of python and a few less than 200 lines of front end code later, and socket_control was born, and now my not only plays music from my phone, but turns on and off from a wee web app on my phone as well. awesome!

Now I just need to find a use for the other socket.

ScreenShot