DIY smart home sensors with arduino, my sensors and openHAB

According to, smart home sensors require a lot of money to set up. Smart home sensor works as a motion detector or humidity sensor. Due to the high costs, MySensors framework is used to create a cheaper array for smart home sensors which can feed into an OpenHAB install. The MySensors framework is convenient as it can be fed into different homes automation controllers.

The making process

The idea used is to create a separate mesh-capable network just for the Arduino instead of adding it to the crowded local network using expensive Ethernet shields and unreliable WIFI. Using single gateway node containing Ethernet and radio connection to other Arduinos, a bridge is created to the local network. The sensor nodes made are used to gather data while the gateway node relays the data onto the OpenHAB server. For the making process to be successful, Arduino Uno, Ethernet shield andNRF24L01 are required.

Sin título1

When NRF24L01 modules are present in the sensor working process, the making process changes a bit. They are a complex part of the project. They contain an on-board signal amplification circuit. A person can be disappointed if they plug everything without reading the tips because they are very difficult to work. The tips are such as; the module being 3.3v input power to the VCC pin, use of short high quality jump cables and a 10uf solder capacitor is kept across the VCC terminals. Basic tests are necessary to establish if the radio is working.

After the radios are connected and checked to be working correctly, the development branch of MySensors Arduino package is downloaded. The development branch is used because the MQTT gateway is not part of the main package yet. The download package includes compatible libraries needed for every sensor together with the essential MySensors files. Therefore, to avoid any conflicts, it is suggested that the current libraries folder to be backed up and replaced with the ones from the download package.

It is required that a static IP address for the controller is defined together with IP address of the existing MQTT server and the IP of the network router and subnet. The topic prefixes can also be modified to one’s liking. Upload and plug that thing into the network. Check the serial console briefly for any glaring errors. Such an error includes being unable to connect to the MQTT server. After wiring up the choice sensor for testing, load up the humidity sensor from the MySensors menu and add the required line immediately after the comment.

Sin título2

Due to the use of a special version of the controller which forwards things onto the MQTT server, it lacks the standard controller feature that would assign node IDs to each new node automatically. Therefore, in each time, manual definition is done. After all that check the data pin for the DHT11 sensor is correct. If all the equipment is working well, observe some data reading come into the MQTT server, putting them into the OpenHAB outside the scope of the territory. If all is done well, the sensor will work effectively.


It is evident that the DIY smart home sensor with Arduino is effective and not very costly. It can be used in any home after installation without any problem.