Winter is coming! - written by on 2019-10-02

Winter is coming!

Upgrading an old, battery-powered thermostat

Winter is coming, and so does cold. It's time to turn on the heating and to enjoy a hot cuppa. But not without first automating and controlling with our phone our home's heating system.

My current thermostat only allows me to program a 24h schedule, without regarding the temperature at all.

Old thermostat

Wiring is as simple as joining the two wires found inside the thermostat; a relay will be perfect for this. I'll be using a NodeMCU as the controller as it has WiFi, and allows me to quickly set everything up before the tea goes cold.

Choose any digital pin of the NodeMCU, and connect the relay to it. Then, connect the heating cables to the relay. It should look like this:

New thermostat

After closing the case...

New Thermostat closed

It's time to flash the NodeMCU firmware. The code is available here https://github.com/ResonantWave/heater-bot/tree/master/heat_nodemcu. Don't forget to set your WiFi SSID and password!

Now it's time to control it. I'll be using a Telegram bot, that will allow us to turn on or off at any moment the heating. We will also be able to set a basic schedule. Files are available here https://github.com/ResonantWave/heater-bot/tree/master/heat_telegrambot. To spin up the Telegram bot, you'll need an API Key from the Botfather. Also, don't forget to configure the NodeMCU Ip address.

When finished, the bot will be able to control your heating. No more cold cuppas ensured!

There's still a lot of work to be done on the bot, allowing to individually schedule each day or with recurring times. Another nifty improvement would be a temperature sensor, to stop heating when necessary.

If you are having any trouble using this bot drop me a line in the comments and we'll solve it!



No comments yet


Leave a comment