O'Reilly logo

Raspberry Pi For Dummies by Mike Cook, Sean McManus

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Home Automation

One Raspberry Pi programmer, Will Q, has used the Pi to create a web app for controlling lights, using a wireless remote control and switch set to turn the lights on and off. The great thing about this project is that you can control anything that’s plugged into a power socket, not just lights.

The most complicated part is using the Raspberry Pi GPIOs to emulate pressing the buttons on the remote control: You’ll have to take apart your remote control unit and do some additional wiring and soldering. Will uses a ribbon cable as an interface between the unit and the Pi in his solution.

For software, Will installed a web server called Web2py and a Python GPIO module to run the outputs on the Raspberry Pi. The finished project enables you to turn your lights off using any web browser to send a signal to the Raspberry Pi, so you could use an iPhone or a PC to remotely control your house.

You can find detailed instructions about how Will achieved this project, including the home_lights program code, at www.instructables.com/id/Raspberry-Pi-GPIO-home-automation/ .

If this inspires you, look around on the web for more ideas: Home automation is a growing trend. Projects range from the simple to the incredible. For example, you could turn your house into a Halloween attraction with a spooky light and music display, triggered by a PIR (passive infrared) motion detector: www.instructables.com/id/Raspberry-Pi-Halloween-Lights-and-Music-Show/ .

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required