Web Based Automation Courtesy Of Raspberry Pi


This project is a great example of the Raspberry Pi’s ability to eclipse Arduino when it comes to interaction. [Fall Deaf] mentions that he used to use an Arduino board with an Ethernet shield to add extensible interactivity to his project. But this one, which is a home automation lamp project, uses a Raspberry Pi instead. The concepts end up being very similar. But the cost of the hardware is less and the coding work is arguably orders of magnitude easier.

Don’t get us wrong, the hardware is fundamentally different. When you move from Arduino to RPi you lose some I/O pins and the low level control of them isn’t quite as straight-forward. But you also don’t have to program the thing in C. The Linux kernel handles the low level control which means you can write your scripts using Python. Because Python is an interpreted language the testing and debugging is much faster — no need to flash new code, just run the script again.

This project used the RPi GPIO to drive a strip of LEDs which use the WS2801 protocol. The board includes a NIC which makes it a snap to use as a web server. The smart phone controls seen above are served up from the Pi using jQuery. Right now there’s a cord running out of the lamp. But there should be plenty of room to use a screw-in outlet adapter and to hide the RPi and its PSU inside.

The board still has enough juice to drive other automation features too, like acting as a web radio server.

6 thoughts on “Web Based Automation Courtesy Of Raspberry Pi

  1. sigh. ‘home automation lamp project’ the only thing even remotely related to being related to home automation is his plugin for an external product that DOES provide home automation. controlling a light from your phone or the web IS NOT home automation.

    “I will also be coding and publishing a Mi Casa Verde plugin that will allow you to control the functions of the Lamp and see it’s status through their home control system.”

    Now the actions takens based on the rules and sensors actively being monitored by the MiCasaVerde product IS true home automation. this plugin simply bridges an overly complex third party solution. If you had this MCV device (you already have the ability to do true HA) to realize the features described you would simply add another z-wave node to your mesh and add rule sets for your automated control.

    I await all of those who plan to argue that home automation can == remote control. Dont worry i wont argue, because you’re wrong.

    1. It seems a little like you’re splitting hairs with Mike’s headline. I’ll respect your wish not to argue the point. But for anyone else reading, there are a couple things that would make this project a great addition to a home automation system. Not just a lamp and the display LED’s but anything you care to hook up to RPi’s GPIO pins!

      Besides the Micasa plugin that I’m working on, the code that I wrote has a really simple HTTP api and pairs up with android’s Tasker app really well! When I plug my phone into the charging cradle at my bedside table it uses the http api to turn on the ‘information display’ mode automatically. So even if you don’t have an expensive home automation system like Micasa, with just an android phone you can absolutely automate the lamp!

      Also, the ‘information mode’, is the lamp’s primary function and is a display for my home automation system. (It tells me in real time if all points of egress are secured and whether the motion sensors have been tripped.)

      Besides the home automation quibble though, thanks for taking the time to check out my post :)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.