Home automation

TECHNOLOGY

Node.js, Raspberry Pi, BlueTooth, WiFi

CATEGORY

Project Goal

This project aimed to optimize the thermal comfort within a home equipped with electric heaters. All heaters had thermostat, but the type that only took into account the indoors temperature, not the difference between indoor and outdoor. The goal was to adjust the heaters’ output so that optimal thermal comfort could be achieved for each room, taking into account not only outdoor temperature, but also the desired temperature level depending on the room’s function, time of day, moment, timespan and temperature conditions while the windows are open and many other factors.

Solution

The system was designed to enable remote control, programing in advance for holiday modes and estimations of future electricity consumption based on previous usage. It’s also meant as a proof-of-concept for further applications that will allow users to remotely control carbon monoxide sensors, electronic blinds, anti-flooding sensors and anti-burglary systems, by using an application on their smartphone.


Building this system involved the purchase of weather stations equipped with TFA sensors that register temperature and humidity levels every minute, and placing one in each room in the house. An RF module then uses a 433.92 MHz radio protocol for wireless communication with a central unit, which consists of a Raspberry Pi receiver and emitter enclosed in a router housing.

temperature2

The weather station’s sensor relays the temperature to the Raspberry Pi receiver. The central unit then determines if it’s necessary to turn off the electric heater or adjust its output on a 1 to 7 scale, in order to achieve a pre-set indoor temperature. The heaters are plugged into remote control sockets, which are controlled by the Raspberry Pi emitter in the central unit.


One of the challenges was caused by interferences with the radio protocol, which required the use of e pre-filter to eliminate most of the noise on the frequency. However, there was still enough interference that passed the firmware filter so that the heaters wouldn’t always start on the first command from the Raspberry emitter. This was solved by programming a second command, to follow 5 seconds after the first one, to ensure that the heaters would pick it up.

temperature2

Pilight Software

Pilight version 5 was the open source software installed on the Raspberry Pi device, to enable communication with its emitter and receiver over the 433 MHz protocol. Pilight was used as a plugin for Pimatic, a home automation server and framework for the Raspberry Pi running on node.js.


This software solution enables the user to define specific rules that regulate how the electric heater in each room operates, based on indoor temperature preferences, outdoor-indoor temperature differences, preferred modes for morning / evening / holidays etc. It also detects the user’s presence in the house, by detecting their smartphone, and additional settings can be programmed depending on whether the user’s at home or not.

Another sensor placed on the window in each room detects whether or not the window is closed and this enables the system to switch to a ventilation mode and turn off the heaters until the window is closed.

Based on the information collected by the outdoor temperature sensors, the user can obtain a graphic representation of the indoor – outdoor temperature correlation and estimate future energy costs by day / week / month / season.

The automation system is entirely controlled by a wireless dongle. To achieve this, while avoiding time-consuming reverse engineering on the electric sockets, an SDR antenna receptor was used. It captures, saves and clones the signal from each separate button on the remote control for the sockets and relays it to the radio dongle.

By using pre-existing solutions, building the entire automation system required a budget of less than 200 euros and achieved great performances in terms of comfort and energy costs: the temperature variations were brought down to +/- 0.3 Celsius degrees, while year round energy expenses were cut by 30%.