Home automation using RF mesh network and arduino

Creating home automation sensors and controllers that can be used around the house forming a mesh network for communication

Similar projects worth following
The internet of Things is growing fast. With this project I aim to manufacture low cost sensors and controllers that anyone can plug and play to easily connect into their home. These will work together with open source Home Automation software to make any house responsive by monitoring and saving energy in an intelligent way.

Footsteps (the software side of the project) will monitor which rooms are in use and when. From this information it will be able to predict which rooms will be used and turn the heating up to the desired temperature before you walk through the door, saving energy from heating the whole house up.

Lighting and appliances will also be monitored and automated using a "follow me" system, automatically lighting the way and turning off lights and appliances when you leave the room. AV systems will also follow you around the house, moving music and TV around the house allowing you to not be tied down to a particular room, get more done, save energy and sa

Why I started this project

In houses across the world, every minute of every day energy is wasted. When you walk out of a room with your hands full, unable to switch the light off even after trying to press the switch with your nose. Walking into a freezing cold house and turning the heating up to full, heating every room in the house when you are in the living room.

We all leave lights on, leave chargers plugged in and heat the whole house even when you try your best to switch everything off and unplug everything something is always missed or forgotten. This is a problem that needs a solution...

One solution is systems such as Control4, Crestron and Lutron, however this can cost many thousands of pounds or dollars, not to mention the disruption to your house and channelling many electrical and network cables through the walls. Even then most of these systems just offer remote control of your devices through a smart phone or wall panel. So we need a solution that is automated and affordable to everyone.

I am looking to create simple sensors that anyone that can follow simple instructions would be able to assemble. I will also be producing ready made sensors for anyone that does not want or have the time to assemble and program. Each one of these sensors will use radio frequency transmission to communicate to other sensors and controllers and back to the main controller.

Up to this point we are only gathering information from the sensors and sending commands to devices like pressing a button on a remote control. The real beauty of home automation is when you don't have to press a button on a remote control, when you walk in to the house and the room you are going into is already at a comfortable temperature. Lighting that knows where you are going and how you like each room lit at different times of the day.

I would like to introduce "footsteps", this is the software that monitors you, without you even noticing, it knows to switch the heating on if the temperature is below a certain level half an hour before you come home from work so that it is comfortable when you walk in the door. It knows that 99.34% of the time you turn right out of the living room door you are heading to the kitchen. The TV in the kitchen and audio system will switch to the same program you were watching. In short it predicts what you are doing around the house and controls the heat, light and power usage for you. When a room or the house is vacated it shuts down the rooms saving energy and money without you having to even think about it.

What I will be doing

In this project I will be creating a range of arduino based sensors and controllers that will communicate using NRF24L01 transceivers. The sensors and controllers will communicate using a mesh network so that if one sensor fails, the others will be able to find a different route to the server.

Currently the server is openRemote on a PC, however I will be changing over to openHAB and moving it to a raspberry pi to save on power usage. I currently have a Current Cost device sending data to Xively (formally Pachube) this then sends the data to openRemote which I can view on my phone.

The sensors will be cheap to build and only use a small amount of power with the possibility of running from solar power or batteries. The information from the sensors will form an automated home that can save energy by switching off rooms that are not in use and let your technology follow you around the house.

The RF sensors I am building will be based on the arduino nano and could include the following sensors:

  • Temperature and Humidity
  • Light level
  • Noise sensor
  • PIR sensor

With external connections for other sensors such as:

  • Door/Window contact
  • Soil moisture
  • Smoke and gas sensors
  • Water leak sensors

The first versions will just be wired together and held in place with sticky tape but I am working towards building a printed circuit board where devices and sensors can simply be plugged in.

By importing products using Ali express and eBay I have kept...

Read more »

  • 1 × Arduino Nano
  • 1 × NRF24L01 2.4Ghz RF Transceiver
  • 1 × Prototype board 70mm x 30mm
  • 1 × DHT-11 Digital Humidity and Temperature sensor
  • 1 × Photoresistor LDR

View all 8 components

  • Remote control made easy...

    Lewis01/31/2016 at 13:33 0 comments

    While this project is about Home Automation I would still like to control everything from one simple and easy to use interface.

    The main problem is that with all the different brands of equipment, come different smart phone apps or remote controls and even different protocols. The key is to have a system that takes care of everything from one place. Once everything can be controlled centrally then the home automation can take shape.

    I have chosen openHAB to control everything for a few reasons:

    • Its open source and free.
    • There are a wide variety of plugins available for it to control different systems.
    • It is still being developed and improved.
    • There is plenty of support through forums.
    • I can create custom devices to send information about the house to it, using MQTT.
    • There are iOS and Android apps available fro remote control.

    There is of course a downside to it as well:

    • There is quite a steep learning curve.
    • It is definitely not plug and play, each device has to be setup manually.
    • A lot of problems can arise when programming it.

    Without spending thousands on a professionally installed system, I still believe that this is one of the best ways of controlling your home using different products. It is also very flexible with all the different systems and communication methods that exist.

  • New year... New stuff...

    Lewis01/16/2016 at 14:06 0 comments

    This is my first log of 2016, yet again life has got in the way of this project. Over the last few months I have been gathering equipment for Smart home control and home automation and things are finally starting to take shape.

    TV Distribution:

    A few days ago my new 4x4 HDMI Matrix arrived. This allows four HDMI inputs to be distributed to four televisions around the house with two-way IR remote control all through a single cat6 cable.

    Audio distribution:

    Last year I bought an audio matrix - XAP800 to handle the multi room audio, I have also added a Sonos connect as an input for the matrix. This will allow internet radio and apple music to be streamed around the house. I went with Sonos because of the capabilities of the system and compatibility of the app with many different internet radio and music sources.


    Last year I bought a Philips Hue starter kit. It is very expensive at around £50 per LED bulb and there is no way I could change every bulb at that price. Philips also make Livingwhites bulbs which integrate with the Hue controller. They have also recently released white LED Hue bulbs at about £15 each. The colours are great to have in some rooms and the white bulbs can be used in all the other rooms. I also have a few LIFX bulbs around, these have Wi-Fi built in and are great to start with as there is no expensive controller.


    I have upgraded my existing wireless Hive thermostat to a nest thermostat. The nest uses smart controls such as presence sensors and learns how you like the heating. This is a true home automation product and I am amazed how easy it was for it to learn our heating patterns while it also saved energy by not heating an empty house. My only issue with nest is that it goes into auto away mode if you do not enter the room with the thermostat for a while. I aim to overcome this by integrating it into my automation system which will have more presence sensors around the house.

    Appliance control

    I bought a few smart plugs which with an online tutorial I managed to hack and connect them to my openHAB server. So instead of them sending a signal through the internet to a server somewhere and waiting for it to send a signal to the switch, it is now instant and does not rely on a working internet connection.

    Home automation software

    The raspberry pi 2 is fully setup and running openHAB 24/7. It currently does not control much as I have one sensor and one smart plug connected to it. I am going to expand this system over the next few months to control TV, Audio, Lighting, Heating and appliances around the house. More logs will come soon with more detail but if you are looking for a place to start out I really recommend the Home Automation for geeks website.

  • Project update...

    Lewis07/30/2015 at 13:49 0 comments

    Just a quick update to say that I currently don't have anything to update you on in terms of the project. In other news, I have moved house now and once I find the box with my electronics kit and soldering iron in I will really start to update this project. In this new house, well new to me, I plan to start to build the sensors and controllers into each room, implement basic control software and solve many problems that would arise in a real install.

    From this point on things will get really exciting, I have already installed one LIFX bulb to act as a nightlight. At the moment this is just on a timer, but I plan on adding movement and light sensors to slowly fade the light up when it is too dark and movement is detected and fade the light back down after a few minutes of no movement.

    As there are about 60 lights in the whole house it will take some time (and money) to automate everything. This project will take quite a long time to complete but once all the bugs are worked out it will be very simple to expand the system.

    I currently only have two LIFX bulbs but I am looking into the Philips Hue system. I will using Living White bulbs which are white dimmable bulbs that are compatible with Hue. The best thing about these bulbs as the price, about £5 for 15 Watt and about £9 for 20 Watt.

  • Pi 2 up and running

    Lewis06/08/2015 at 13:41 3 comments

    I have just setup my Raspberry Pi 2 to run everything I need for my home automation project. I have set it up running:

    The Pi is connected to:

    • NAS Enclosure (Network Attached Server with 2x2TB Hard disks) - used for storing media to access through Kodi
    • USB to CurrentCost - to send energy usage data to Xively
    • Arduino with RF - connected over Ethernet for two-way communications
    • USB backup battery (the kind used to charge phones) This is plugged in all the time and used as a battery backup in the event of a power failure. Some of the main nodes around the house will have this backup as well.

    The Pi is running well and consuming much less power than the computer it has replaced with the added benefit of battery backup. Kodi is running on the HDMI output of the Pi and I access it through SSH.

  • First RF sensor node soldered together

    Lewis05/27/2015 at 22:20 0 comments


    Seven days after my prototype boards arrived I have planned which sensors and controls to add to it and where to put all or the wires. This node is a hybrid sensor and controller combining three sensors (temperature, humidity and light level) and space for two relays to control electrical appliances. Finally a 2.4Ghz RF transceiver is attached to the arduino nano to communicate with openHAB. I am currently powering my sensors from a USB battery pack and even with the built in RF aerial they work all around the house and outside. I will have to see how they cope when I move to the new house with thick stone walls that don't even let a wifi signal work in the next room.

    Once I have decided which sensors and controllers to use where I will produce some PCB's to make the sensors slim and neat enough to hide in the room. The controllers will be made into light switches in the rooms, with just one problem, how to get power to them. This one may leak out into a new project as I have already come up with some ideas

  • Prototype boards arrived

    Lewis05/20/2015 at 12:52 0 comments

    I ordered some 7cm x 3cm prototype boards a while ago which have just arrived. I will create a few sensor boards and a relay board to make sure everything is working correctly and test out some of the rules for the automation before I do a big parts order for the new house. These will be put in a temporary box until I finalise the design on my 3D printed cases.

    Each sensor or controller will have the same basic components which include the arduino nano, the NRF24L01 and a DHT11 as a sensor in the sensor nodes and as a safety feature in the controller units to make sure nothing overheats. I am also making a PCB to hold the basic components with expansion sockets for extra sensors and control devices.

    Over the next few days I will create step by step instructions for the basic sensors and controllers. Please let me know what features you would like to see on the sensors and controllers and I will integrate what I can into the prototypes and the first version of the PCB

  • Node 0 and node 1 now working

    Lewis05/15/2015 at 14:42 0 comments

    Node 0 (right in the image) and node 1 (left in the image) are now up and running. I have made node 0 using an arduino nano and NRF24L01 with an antenna, this is now plugged in to my server and connected to openHAB. Node 1 now has a DHT11 temperature sensor attached and transmits information to node 0 which shows up in openHAB.

    My next step is to create more nodes and add extra sensors so that I can gather information from around the house. I will also be working on a circuit board when my prototype boards arrive so that these boards can just plug and play. The board will have female header pins for the arduino and the RF radio with capacitors, resisters and LED's. There will also be a few inexpensive sensors on board including a DHT11, an LDR and maybe a PIR. All of this will be housed in a custom designed 3D case. I am currently designing this as a slim case with the two boards end to end (approx 30mm x 90mm) with holes for the sensors and LED's. Once I get my cases custom-printed it will change my project from a pile of electronics to an actual product that would look good in any room.

  • Searching for a smaller arduino

    Lewis05/13/2015 at 13:07 2 comments

    I am looking at making smart sockets and lightswitches which may grow too big for this project and become projects of their own. The main problem I am facing is squeezing all the components in such a small space. There are quite a few micro sized boards out there that are capable of the job. One board that I am considering is the Teensy-LC board, it is a very small board that includes a micro USB for power and programming (a lot of boards this size just have the serial connector and power connectors). Hopefully I will be able to get my hands on one soon to create some prototypes.

    I have also uploaded the parts picture from the node 0 update yesterday.

    More updates coming soon.

  • Node 0 : Pi 2

    Lewis05/12/2015 at 22:11 0 comments

    Just a quick update today...

    Node 0 has now been built and programmed, picture to follow shortly. It is comprised of an Arduino nano and a NRF24L01 with a SMA Antenna. This will be permanently connected and powered by the server (currently a PC).

    My Raspberry Pi 2 has just arrived today, this will be used as a server once I am happy that everything is working correctly. I have chosen this due to its low power consumption and compact size.

  • Version 0.00000001

    Lewis05/10/2015 at 22:44 1 comment

    The very first version of the sensor has now been built. I use the term sensor loosely as it is currently not sensing anything as it is just an arduino and an RF transceiver. I will be adding more sensors to it in the next few days now that I know that the very basic version of the mesh network works as well as improving the sensors.

    I have also been looking around at some of the other projects on here for inspiration for lighting control. I have changed my design from a rotary encoder control to a glass covered circuit with capacitive buttons and an OLED two line display. A simple touch will turn the light on or off, at least until I can find an easy way to dim lights. Other functions of the control will include temperature, music control and a room to room intercom.

    More updates will be coming soon...

View all 11 project logs

  • 1
    Step 1

    instructions for building the first sensor controller node.

    Parts required:

    • Prototype board (3cm x 7cm)
    • Arduino nano
    • RF transceiver (NRF24L01)
    • Temperature/humidity sensor (DHT11)
    • 1-2 relays
    • Light sensor (LDR)
    • 4.7uf capacitor
    • 10k resistor
    • Wires and solder

  • 2
    Step 2

    Choose the best layout and parts for what you need to sense or control.

    Lay the parts out on the prototype board so that it fits into a case.

    Start by putting the wires in place and the smaller components around the edge of the board with less connections.

  • 3
    Step 3

    Always try and get the wires in place before the component as this will keep the wires organised and they can be hidden under some components.

    I am using a solid core wire (from a stripped down CAT5 network cable) this is great as it stays in place, but it does snap quite easily.

View all 4 instructions

Enjoy this project?



Wassim wrote 02/17/2018 at 11:01 point

Hi, the idea of this project is nice and we could join effort to make it easier. In my project #Home Smart Mesh I focus on the custom RF protocol and the time series database that collects all your data from OpenHAB, MQTT,... in one place with one dashboard (Graphana). The mesh network I implemented is not limited to one HW, I currently have STM8L, STM32 with nRF24 and even nRF51 beacons all talking the same mesh protocol. Maybe you could join your arduino as well ?

  Are you sure? yes | no

kateb wrote 05/19/2017 at 02:29 point

about same here : I'm working on an autonomous fence application for cattle.

  Are you sure? yes | no

Robin wrote 12/04/2015 at 11:51 point

I am trying to do something similar, including temperature sensors in the switches, to allow room by room feedback for heating.

I've given lots of thought to the problem of powering the nodes, using various wiring topologies (I have the benefit of planning this install in a new-build house, though not bespoke, so options are still limited). Concepts have included wiring Ethernet to switch locations (using homebrew POE) and deriving power from a ~16V DALI bus (somewhat of a challenge if you wish to stay within the 2mA per device specified by the standard, particularly with RF).

One solution I came up with, that you may wish to consider, which allows retrofitting to systems using the (standard) two-wire switched-live wiring to switches, is to have a simple switching/transforming node on the lighting ring ("in the ceiling"), which then allows the existing two wires to the switch to be repurposed as VCC/GND.

  Are you sure? yes | no

Lewis wrote 05/09/2015 at 13:33 point

the network nodes will operate using the arduino and the 2.4Ghz RF Signal. I have found a few mesh network programs for the arduino and I am combining different parts to make a secure optimised version. I will post it on GitHub when it is complete. Have you seen any mesh code that looks good

  Are you sure? yes | no

lewis.wakeland wrote 05/08/2015 at 23:50 point

I'm looking at a project that needs a mesh network, how are you setting yours up ? 

Lewis W, 

  Are you sure? yes | no

Wassim wrote 02/17/2018 at 11:15 point

Hi, my project #Home Smart Mesh do need a mesh network, I'm designing my own protocol, it is documented on the page, if you have improvements suggestions, that'll be welcome.

  Are you sure? yes | no

Lewis wrote 05/08/2015 at 21:27 point

I am planning to use openHAB and ITTT rules with the sensor information being transmitted using a 2.4Ghz mesh network. It is still in the planning and playing stage at the moment so this could change.

  Are you sure? yes | no

Sounak Ranjan Das wrote 05/08/2015 at 18:03 point

I am using similar setup for my project. Are you creating your own network protocols or using any library?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates