Making smart devices actually smart!

This all started a couple of years ago when I received a very large unexpected electricity bill. Around a year before this I had a new heating system installed which included an electric flow boiler to replace the old electric storage type.

12kW of money sucking horror

I knew this thing was going to cost more to run because it draws power whenever the heating is set to on but perhaps slightly foolishly, I did not pay much attention to the electricity consumption and being on a fixed-rate tariff, nothing much happened… at first.
After the shocker of a bill arrived (and I set up a new plan with the electric supplier) I was determined to reduce my overall consumption, and of course I wanted to use technology to assist with this.

Standard programmable timer





My heating system was installed with a programmable timer only. Typically it was set to heat in the morning until I left for work and then again in the evening until bedtime. At the weekend the heating could potentially be on all day long. The place was comfortable but there was a huge amount of waste because variable conditions were not taken into account such as; the weather, internal temperature and if I was even at home.
The most obvious improvement was to replace the timer with a programmable thermostat or supplement the timer with a thermostat. I decided this should be a smart thermostat and settled on the Nest.

Nest Heatlink, replaces timer on mains controlled boilers, typical in the UK

Nest Thermostat

Installation was easy and the thing looks really nice! It is billed as a “learning thermostat” which basically means instead of manually setting times to switch the heating on and off, it learns from your manual control to build up a schedule and begins to factor in other variables such as the weather and how long it takes to heat your house to the desired temperature. So, on the first few days I would get up in the morning and the place was cold, ok that’s fine, it hasn’t yet learned my patterns. After two or three days of manually setting the desired temperature it began switching on before I got up with the place at the correct temperature. Great! It should also detect when you have left the building and switch the system off, however, I found this rather inconsistent, often taking two or three hours to realise I was gone. Not so good. But the worst problem was coming home from work in the evening in winter. The Nest simply will not switch itself on while there is no-one home to preheat. I wasn’t happy with this.

Step up: Home Assistant

My heating section in Home Assistant

This is a piece of software that runs on a Raspberry Pi or PC which essentially gives an interface between different types/manufacturers of smart devices. It can also automate things like switching lights on and off, notify you of things happening like someone ringing your smart doorbell when you’re not home and control unsupported devices with Alexa or Google Home. Many non-smart devices can also be programmed in making its use limited only by one’s imagination.
After a bit of research it transpired that if I was to install an app on my phone which uses GPS to report my real world physical location back to Home Assistant I could this this to control my heating.

A little background: typically I work in the same location every day, however, as a support engineer I am sent around the country which means my return time in the evening can be unpredictable. I finished work at 5.15pm and it usually takes me about 25 minutes to get home but sometimes this can be A LOT longer.

Tracking my location

Now I have Home Assistant running on a computer at home which is able to control the Nest thermostat and an app on my phone sending location data back to Home Assistant. Great. But we still need to calculate the time it will take me to get home. I’m sure we have all used Google Maps at some point to get directions and an idea of how long a journey will take, well this can be used programmatically from Home Assistant with the location data. One of the best parts of Google’s journey time is is also factors in live traffic conditions!

So, here’s what happens on a weekday evening:

  1. At 4.45pm Home Assistant checks my journey time to home
  2. If the journey time is less than 45 minutes, set the Nest to Heat at 21°C, or
  3. If more than 45 minutes, wait until the journey time decreases to 45 minutes, then set the Nest to Heat mode at 21°C , or
  4. If by 6.30pm the journey time is still above 45 minutes, abort (and send a message to my phone for manual intervention)

And that is the basis of my smart controlled heating system. It’s not quite foolproof, for example, if I don’t head straight home or if I’m working late in my usual office it will come on early and stay on. These are scenarios I’m working towards resolving but they happen so infrequently it’s not a big deal to me.
There are other bits and pieces it does to save energy, such as; it will only switch on in the morning if I’m actually at home and turns itself on or off automatically as I leave and return home, within minutes. Less energy conscious actions it performs are boost the temperature if it is very cold outside late in the evening and only switch off in the evening when the main living rooms are vacated, i.e. I’ve gone to bed!

I’ll go into the technical details in another post but hopefully this will illustrate that smart devices can indeed be very useful while saving energy but still require some thought, effort and skill to be used effectively. Perhaps in a few years when the technology has matured we will see this sort of control as standard.