66% or better

Raspberry Pi helps with 2.4GHz home automation

rpi-rf-server

Wanting to extend the capabilities of the radio frequency devices in his home [Kalle Löfgren] turned a Raspberry Pi into an RF control hub. We’ve seen some of his home automation work in the past. In his media room he built a universal remote base station which used the same RF board as in this project. The main difference is that before he went with an AVR microcontroller and this time he’s upgrade to a Raspberry Pi board.

The RPi brings a lot more to the table. Notably, the scripting (whose output is shown above) and networking features. His radio board is an nRF24L01 which he talks to via the SPI protocol. The Raspberry Pi has no problem talking to SPI devices through its GPIO header. [Kalle] just needed to do a bit of setup to configure the pin modes.

A Python script lets him sent commands using his keyboard, but this can also be automated. Combine that with the TCP server script he wrote and it opens up the a wide range of configurations to switch or talk to any device operating on the 2.4 GHz band.

Comments

  1. Couldn’t the whole process be simplified by using wiringPi2? Does Quick2Wire have any advantage over wiringPi?

    • What is the benefit with wiringpi2 over Quick2Wire? does it come with the python API as well?
      The nice thing with the python code, is that it is very simple compared to the other c-based codes i have seen out there, like this one: http://arduino-for-beginners.blogspot.se/2013/02/setup-nordic-nrf24l01-rf-modules-to.html
      The pyton code makes is very easy to setup for different configurations, since it only depends on this one py-file!

      Anyway i find the quick2wire python API to be very easy to work with!
      Hope it can help someone out there..

      • It just seems as though wiringPi is much more adopted. As well, instead of whitelisting the SPI module, you can dynamically load it from the command line using “gpio load spi”.

        wiringPi-python provides the bridge over to Python. SPI performance has been fantastic on it.

        That guide does seem brutal. Assuming the SPI on the NRF24L01 is well documented, it wouldn’t be that hard for us to write a library for it :)

        Thanks for posting your guide. I’ll have a look at it this weekend to see if I can optimize any of my projects. All I have right now is my OLED weather station which polls Environment Canada every 15 minutes.

  2. Bajdi says:

    I’ll need to try this out, been playing with the nRF24L01 modules and Arduino for a while. Time to try it with an RPi. BTW, the little nRF24L01 modules cost less then 2$ a piece from China.

  3. I’ve got a rPi listening for data from a bunch of arduinos around my house – see here : https://www.rmhome.co.uk/pi/ – The arduino’s are a mix of protoboards, rFU 328′s (from Ciseco) which send their data every 60 seconds. I’ve also added a 433MHZ radio for controlling my LightwaveRF devices (light switches) which seems to screw up some of my nodes… working on that.

    It’s running as a c++ app that my node.js app spawns and controls via STDIN/STDOUT. I’ll need to post up some more detail though since I don’t have a blog ready.

  4. electronics says:

    Oh man, I am completing my project that is 90% similar to this one. I am not using Pi, but ATmega328P, ENC28J60, nRF24L01+ with a TCP/IP stack from Tuxgraphics.
    :-)

  5. Chris says:

    Interesting – thanks for posting. I’m using a TellStick at the moment for 433MHz control of lights. http://random-stuff-of-chris.blogspot.co.uk/2013/05/tellstick-on-raspberry-pi-to-control.html. Will investigate this further.

  6. Kubik says:

    Looks like everyone is doing something similar. My setup is based on JeeNodes and 433MHz senders to control light switches, then bridge to my older wire based bus devices, and a few Arduinos here and there. RasPi could be a nice next generation of the project.. but I should finish this one first! :)

  7. Drone says:

    So “everybody” is using these nRF24L01 modules. But just how far do they go? Let’s say in a house with concrete walls and with at least one WiFi router/access-point running? I’ve been following this module for awhile but I’ve never seen any real-world range test results.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s