Close
0%
0%

Multi Zone Wireless Thermostat

Replace the bimetallic thermostat with a few microcontroller based thermostats to control the combi boiler.

Similar projects worth following
The current combi boiler control bases the home heating in the living room bimetallic thermostat, this is not convenient nor confortable when we are mostly in other rooms, e.g, sleeping.

The project aims to:
- Replace the bimetallic thermostat with a micro controller based thermostat (remote unit) capable of commanding the boiler, logging temperature and receiving commands from the controller unit.
- Add mobile micro controller (remote units) to report temperatures to the controller unit.
- Build the controller unit to receive temperatures from the remote units and command the boiler consequently.

Improvements:
- Log humidity and perhaps pressure, just because.

  • User Arduino IDE to program the NodeMCU
  • Use MQTT to communicate boiler, remote and controller unit (https://en.wikipedia.org/wiki/MQTT)
  • Boiler and remote units to be a NodeMCU (https://nodemcu.readthedocs.io/en/master/)
  • Remote Units to include an output pin controlled by a MQTT subscription. This can be used to drive the relay, a signaling LED or leave disconnected.
  • Controller unit to be an always on Raspberry Pi. It receives room temperatures from remote units and commands boiler ON/OFF accordingly.
  • Remote units to make use of low power modes, disconnect WiFi between updates... not really to use batteries. Consider getting power from 24V thermostat circuit. (https://www.sparkfun.com/news/1842)

  • 2 × NodeMcu ESP2866 ESP-12E Micro controller with WiFi module built-in
  • 2 × BMP280/BME280 I2C/SPI Temperature, humidity and atmospheric pressure sensor
  • 2 × Breadboard Electronic Components / Misc. Electronic Components
  • 1 × Software: MQTT Dash for Android. Nice app to check everything is feeding the broker, the status of the boiler and force the boiler ON if wanted
  • 1 × OpenHab An easy way to get a control panel

View all 6 components

  • Adding web server

    Jose Maria Rodriguez Saez07/04/2017 at 12:09 0 comments

    Last commit in git adds a simple webserver serving a basic weg page where I can check values, status and restart the ESP if required.

  • Added Grafana and CollectD

    Jose Maria Rodriguez Saez05/09/2017 at 20:04 0 comments

    I added a couple of very nice things. I no longer depend on Xively to display my data, I will not use it any more I think. Now I can keep all data local and the display looks WAY better.

    To do this I got Grafana with Carbon woking in the RPi and a script subscribes to MQTT topics and feeds the Carbon database, this is how it looks:

    I added RPi stats just for fun:

    Using Grafana you can send alarms via Telegram bot so you can receive them wherever you have it installed, check this out:

    Also, I did a small change to have some default values for when the threshold temperatures are not set or stored in the MQTT broker

  • RemoteUnit code minor changes

    Jose Maria Rodriguez Saez03/11/2017 at 11:06 0 comments

    I have updated RemoteUnit.c in git. Only minor changes, code cleaning and output format.

  • ​Added support for day/night temperature

    Jose Maria Rodriguez Saez03/04/2017 at 18:19 0 comments

    I found myself changing the target temperature every night before going to bed so I splitted the target in two, one for the day and another for the night.

    Code updated in github

  • OpenHub2 MQTT binding config

    Jose Maria Rodriguez Saez03/04/2017 at 18:17 0 comments

    I finally found why the MQTT binding was not working properly with random behaviour of boiler switch and temperature setpoint.

    Apparently Openhab keeps a the MQTT configuration in the internal database despite you change the config file, this confuses the mqtt client and makes it disconnect constantly.

    In this forum I found the solution: https://community.openhab.org/t/mqtt-config-under-oh2/15497/9

    Connect to the Karaf Console (ssh openhab@localhost -p 8101 with password: habopen) to check if previous configs has been stored stored in the OH2 "internal database" by using:

    config:edit org.openhab.mqtt

    config:property-list

    You can start clean by configuring your mqtt.cfg and mqtt-eventbus.cfg and clearing out whatever is stored already by:

    config:delete org.openhab.mqtt and then restart OH2 to reload the .cfg files

  • Files updated in GitHub

    Jose Maria Rodriguez Saez03/01/2017 at 21:55 0 comments

    I have updated the C code and config files for Opehab in GitHub

  • Upgraded to BME280

    Jose Maria Rodriguez Saez03/01/2017 at 14:00 0 comments

    I received the BME280 just before going holidays but I managed to get them working and reporting humidity too. I will give a better update later and update the project coode in Git

  • ​Two days up&running

    Jose Maria Rodriguez Saez02/14/2017 at 09:04 0 comments

    With a few minor code tweaks it has been running for 2 days so I think this is usable.

    See the capture below for a nice example this night. Target temp set to 19.5 °C, after 20h bedroom2 controls the boiler. The boiler was fired up twice when then temperature was 19 °C.



  • Openhab2 and controller up&running

    Jose Maria Rodriguez Saez02/11/2017 at 02:29 0 comments

    Added Openhab2 config files.

    Controller python scripts: boiler logic and Xively feeder.

    I am testing now the behaviour for a while before fully trust the thing to take total control of the boiler.

    The secondary remote has a LED instead of the relay showing when the boiler is turned on.

    Xively will show how it behaves.

  • Manual operation is working

    Jose Maria Rodriguez Saez02/05/2017 at 20:02 0 comments

    Manual operation is UP & RUNNING.

    After wiring the relay and tidy up a remote unit is ready. By publishing ON to boiler/onoff the boiler is turned on.

    I have changed my mind. All the ESP8266 are going to be names Remote Units. All the remote units will report temperature and support an output connection.

    The same code will run in all the Remote Units. The relay will be installed in the unit next to the thermostat, the other units could have a LED, to signal the boiler is ON, or nothing at all.

    Photos soon.

View all 14 project logs

  • 1
    Step 1

    For this project you will need a "server" to perform as MQTT broker, OpenHub2 server and boiler controller.

    I am using a Raspberry Pi 2 running DietPi

    You can install the mosquitto broker using the software menu in DietPi It is supported

    You need to install OpenHub2 (it requires Java) Guide

    You need Python but it is probably installed already

  • 2
    Step 2

    Checkout the repo.

    The etc folder contains the openhab2 config files ready to be copied.

    The controller folder contains the boilerLogic.py script. Copy the script to your prefered location.

    Highly recomended to create an init script (or systemd service) to automatically launch the control every boot.

  • 3
    Step 3

    Download all the Adafruit libraries.

    Install the Arduino IDE and make it work with the ESP8266: Guide

    The code for the remote units is RemoteUnit.c Create a new project and use tthe code from this file.

    Remember to change IP, WLAN details, MQTT topic names...

    Flash your device and that's it, it should be working.

View all 3 instructions

Enjoy this project?

Share

Discussions

Jose Maria Rodriguez Saez wrote 01/31/2017 at 11:10 point

Hi, thanks for your comment. My first idea was not to use batteries. The boiler unit is going to be wired to the boiler cables in the wall so I do not mind to have it plugged into a mains socket too.

For the remote unit it is a bit more tricky, the idea was that you can move it around the house to adapt the temperature where you are, that requires batteries. But now I am considering to leave it permanently in one room so mains socket will do for me.

Finally, I will really consider your suggestion and check what the boiled needs from the thermostat and maybe get power from there. So far I know it is a 24V circuit but I do not even know if it is DC or AC.

  Are you sure? yes | no

Martin wrote 01/31/2017 at 09:00 point

Although it is common these days, I would not accept a device in fixed installation, connected to wires, needing replaceable batteries. There are some commercial products (thermostats) which are built like this, but I would not like it.

One possibility would be to check, how much voltage and current the circuit for the bimetallic switch needs to be considered "closed", stay sufficiently below this value and trickle charge a battery or double layer capacitor.

  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