Getting started with MySensors

For a long time I have been following the website/project I’ve been thinking about building a temperature and humidity sensor-network in my house for a long time and this project seems to have figured out all the hard stuff (radio communication, low-power battery sensors, network gateway and even controllers).

The Getting Started guide on is a really great starting point to read about the MySensors project and see what it can do.

For my first project I used the following hardware:

  1. ESP8266 NodeMcu v0.9
  2. Arduino Pro Mini 3.3v (ATMEGA328 at 8 MHz)
  3. NRF24L01+ (2 pieces)
  4. AM2302/DHT22
  5. FTDI USB 3.3v programmer

I setup the ESP8266 as an WiFi gateway, the only thing I added was an extra 22µF capacitor between the ground and the power of the NRF24L01 as described here under Connecting a Decoupling-Capacitor.

With the Arduino Pro Mini I created a temperature and humidity sensing node. When I started building this node, the MySensors-website contained an old version of the code that was not compatible with the latest (2.0) version of the MySensors-library. So I ended up changing the code and fixing a couple of problems. I was planning on writing down all the steps that I took, until I discovered that Henrik Ekblad created a new version of the code with the exact same fixes. So if you go to Air Humidity Sensor page right now, you will have a working node in minutes (mine took an evening of tinkering).MySensors humidity node

After creating the gateway and the humidity-node, I needed a (what MySensors calls) Controller. Since I’m doing all my work on a Windows machine and my day-job is a .NET Developer, I went for MyNodes.NET. After starting the software (with localhost.cmd run as administrator) and opened a browser to http://localhost:1312, all I needed to do was add the ip-address of the gateway in the configuration-section and when it was connected, the temperature&humidity node appeared!

MyNodes.NET humidity node

This was just my first step at creating a sensor network for my house. It only proves that the MySensors library is a very good fit for the sensors I’m planning on creating. The next step will be to convert the gateway to a MQTT gateway and use a different controller that supports more hardware and has a larger (more active) community (most likely it’s going to be Domoticz).