Home-made Smart Home Heating

Home-made Smart Home Heating

Well - sort of home-made. And not really smart either.

Until recently our house didn't have a thermostat, which meant that when we put the (gas-fired) central heating on it stayed running until it was switched off (automatically if we had hit the boost button or had a schedule enabled, or manually if it had been set to always on mode). I'm not sure why we've no thermostat - most centrally heated houses in Ireland have a thermostat on a wall somewhere. My assumption is that it was disconnected when we renovated shortly after we moved in, and never reconnected but at this point I've no way of knowing.

Not having control over the temperature of the house - particularly the living room that we spend most of our time in - was annoying so I decided to do something about it: I bought a Hive Thermostat Mini and Receiver kit.

The receiver replaces the digital control panel - of the aforementioned boost button - that's usually found near the boiler. The thermostat goes wherever - the living room in our case. They're linked wirelessly and you can control the heating from the thermostat, but to get the most out of them and control them using a smartphone you need the Hive Hub, a controller that you connect to your router.

I didn't bother with the Hub though - the thermostat and receiver both support Zigbee, a personal area network protocol for low-power IoT devices, so I bought a USB Zigbee adapter instead.

€20 versus €70, but it'll take more time and work to build a system that I can do more than just switch the heating on and off with.

So far I have the following building blocks:

  • zigbee2mqtt - a bridge between the Zigbee network and the MQTT messaging protocol.
  • n8n - an automation platform.
  • InfluxDB - a time-series database.
  • Grafana - a visualisation platform.

I've a small number of flows built in n8n; most are triggered using webhooks (that I can call from curl in a terminal session, or from Shortcuts on my iPhone):

  • Heating Boost On - sets the target temperature for the living room to (currently) 21 degree.
  • Heating Boost Off - sets the target temperature to 10 degrees, effectively knocking the heating off.
  • Heating One Hour - sets a high target temperature to turn the heating on, waits an hour, then sets a low temperature to turn it off.
  • Thermostat Monitor - watches MQTT for updates from the thermostat and adds a temperature reading to InfluxDB when it sees one.
  • Receiver Monitor - watches MQTT for updates from the thermostat, updates InfluxDB with the status of the system (on/off), sends a message via Telegram to tell me when the heating comes on or goes off.

The only things I'm missing at the moment are an easy system for creating schedules for turning the heating on/off, and some kind of web-based interface for controlling everything. Using curl or iOS Shortcuts to call webhook URLs is fine for me but I don't think they're very practical for the rest of the family.