I got a Nest Thermostat recently and it was installed (for free) by my Electricity Supply company. Initial reactions were good, however as time goes on, I’m less and less happy with it. This article covers my initial attempts at getting around some of it’s shortcomings, and future articles will cover more.
One major problem is the control of the circulation pump that’s part of my central heating system. The problem is that when the Nest gets to temperature, the relay in the HeatLink (the part of the Nest system that sits on the front of the boiler and does the AC switching) turns off, and cuts the power to both the pump and the burner. This is not ideal, as the closer radiators to the burner will be at a higher temperature, and the farthest rads will not get any of that heat once the pump is cut off, resulting in a very unbalanced system. One room gets so little hot water, that it’s almost always stone cold. Ideally, the Nest should just control the burner, and the circulation pump should keep going until the temperature of the water going to the radiators drops below a certain value. The other option is to separate the pump AC, and leave it running 24/7, another non-option. So, on the suggestion from my plumber, I devised a system that would measure the flow pipe coming out of the boiler and turn on the pump when the temperature is over a particular value. The plumber actually suggested a temperature difference between flow and return pipes, but I’d only got one spare sensor at the time, and decided to do a prototype with just the one sensor.
There was also an additional issue in that I couldn’t just rely on the temperature of the flow pipe, I also had to turn on the pump when the burner starts, to avoid having no circulation when the burner initially starts, so that requires an extra input to the system, we’ll get to that later.
So, I hooked up a DHT22 temperature sensor to a NodeMCU board (ESP8266 MCU based), loaded up the application to read the temperature every 10 seconds. On attaching the DHT22 to the flow pipe, I could see the temperature get to about 40 degrees C when the burner was on, and when the burner was off, the temperature would drop slowly to 20-25 degrees C over several hours. When the pump was on, this drop was much faster, as the hot water in the system was being pushed around to the colder radiators.
So after the initial measurement phase, I wired up an AC relay board to the NodeMCU, and connected in the circulation pump after disconnecting it from the Nest HeatLink. So the Nest was now free to start and stop the burner, and my new MCU setup was doing the circulation control. I initially set it up just based on temperature. Once the temperature went above 30 degrees C, I’d start the pump, and when the temperature dropped below 28 degrees C, I’d stop the pump. That all seemed to work fine first go.
But there was a concern, and that was what was happening to the system when the burner kicked in from cold, and that effect that would have on the burner until the temperature got to 30 degrees C. A quick text to my plumber and he confirmed my concerns, the pump needs to come on whenever the burner is on, as well as staying on after the burner stops to keep the hot water circulating.
So, I added a 240V to 5V DC power supply onto the output of the Nest HeatLink, and fed the 5V from that into a GPIO pin on the NodeMCU. That acted as a kind of override, so forced the pump on regardless of the temperature. Then after a few minutes, the flow pipe would get up to temperature, and when the power to the burner was eventually killed by the Nest, the temperature algorithm could take over.
Something like:
if 5V from burner,
the burner is on, turn on pump .
else
if temp > 32
turn on pump
if temp < 28
turn off pump
So the inputs the the NodeMCU board are
1. DHT22 temperature one-wire sensor
2. GPIO input for 5v PSU from burner
Here’s a picture of the prototype Circulation Pump Controller:
The DHT22 is out of picture top left, cable-tied to an exposed part of the flow pipe. Most of it is covered in grey insulation material.
The temperature graph of the Flow pipe looks something like this:
The sharp rises and falls are when the circulation pump is active, and you can see then the temperature drops below 28 degrees, the rate of fall is much slower, as the pumps is off, and the water just sits where it is.
Note: The DHT22 is not giving an accurate measurement of the water in the pipe, which is more likely to be 60-70 degrees C, but the measured relative temperature is good enough for switching on and off the pump.
The firmware I’m using is a modified version of the Sonoff-MQTT-OTA-Arduino firmware for Sonoff switches
https://github.com/arendst/Sonoff-MQTT-OTA-Arduino
(modified slightly so it will work on NodeMCU boards). Here’s a screen shot:
This excellent software gives me a web interface into the device, and it publishes it’s telemetry at regular intervals to an MQTT topic for storage in my energy monitoring system (EmonCMS running on an AAEON Up-Board).
Although the functionality is available to toggle the pump on and off via the web interface, I rarely use it. I leave the on/off decisions to the sketch running on the NodeMCU board.
Next issue to address is the issue that the Nest thermostat is woefully inadequate at keeping up with the rapid temperature changes in my house. So the rooms get too hot before the thermostat switches off, and too cold before it switches on again. I’m going to have to go behind it’s back and control the burner myself based on the actual temperature in the kitchen as measured by a DHT22 (far more accurate and responds quicker to temperature changes). But that’s for another article. 🙂
Hello David,
I have this thermostat I just installed it in test, it works very well your system is badly connected the heatlink contacts must shut off the pump the burner will be managed by the thermostat of the boiler
With you an email address I will send you my wiring scheme on the boiler
cordially
Jean-Claude,
Sure, please sent me diagram, dave@davidhunt.ie
My nest was installed by a professional installer arranged by the Electricity Company, so I can only assume that they knew what they were doing. However, I do find it incredible that there is such a major flaw in the design of the system. I look forward to seeing your diagram.
Regards,
Dave.
Dave,
Thanks for sharing. Here’s a quick description of my Nest alternative:
My boiler is Glowworm Micron70ff. When it was installed, it was wired to a 7-day timer which just turned it on/off on a schedule. Connecting one particular wire to live turns it on, and disconnecting that wire turns it off. When it’s on, it controls the pump and the burner. We used to turn on the heating (pressing the ‘boost’ button) when the house was cold. But then we’d get too hot, so we’d turn it off. Then when we’d get cold, we’d turn it on again. It was a PITA. And not very comfortable.
So, I replaced the timer with an Arduino (with RESTapi) and a relay. The Arduino turns heating on/off based
on the indoor temperature compared with the ‘set’ temperature. Both of these are settable via the RESTapi
over the Web.
The code in the Arduino is pretty short – but I had to build in ‘hysteresis’ of a couple of degrees. Basically, if the
‘set’ temp is 20 and the indoor temp reaches 20, then it turns off the boiler. However, it won’t turn it back on again
until the temp falls below (say) ‘set’ – 2 (i.e. 18). Otherwise it would just keep flip-flopping around 20 degrees.
I learned that It’s important that it’s not too accurate.
Then on the front-end I have a Rasp Pi with 7″ touchscreen and DHT22. The code on the Pi is really just a
web page with a few (fairly simple) PHP functions. The main screen shows temp/humidity and
local forecast (from yr.no). I have other ‘buttons’ which show temp today/this week/month, how long the heating
was on, etc. Also a cron job (just one ‘curl’ line) which will turn the heat up in the morning, and lunchtime, and
evening … at night it lowers the temp while we’re asleep. The same Pi does other stuff too .. like controlling
our lights, media (OSMC), and I’ve added ‘Alexa’ now aswell.
The indoor temp in the Arduino is basically the temp of the DHT22 which is ‘blu-tac’ed behind the touchscreen.
It’s not looking at the temp of all the different rooms … just the temp of the kitchen/hallway. It could all be combined in the one Rasp Pi (without the need for the Arduino). However, I have found that the ‘distributed’ solution is very robust.
If the Pi stops for whatever reason, the basics still work. (Arduino is so stable). You could maybe
‘improve’ this by getting all the temps from around the house – but after using this for over a year now,
it works really well as is. Most importantly our house is never ‘hot’ or ‘cold’. Just a very steady 18 or 19. Our heating used to be around 10M3 of Natural Gas per day during the winter. Nowadays it’s around 4 or 5. Of course comparing usage over two different winters won’t be the same anyway, but I’m pretty sure we’re using a good bit less, and it’s definitely more comfortable.
If you want any more info, you’re welcome to send me an email.
Hope this helps.
Thanks.
Best regards,
Niall.
here’s a quick vid … you can see the Pi touchscreen, the relay, and the Arduino.
The glare in the recording isn’t great – it looks a lot better in real life 🙂
Excellent comment Niall. Loads of good info in there. Good to know that the temperature is steady with your setup. With the Nest, it’s all over the place. At one stage last night, for example, the Nest temperature was reading at 20.5 steady from 8pm till 2am (+-0.5), yet the DHT22 showed it varied from 18.5 to 22.5 in the same period (I have both temperatures in graphs on an EmonCMS setup. Now whether to throw out the Nest (I did pay €200 for it), or keep it as an expensive doorstop, that’s another question.
I have a Fire HD6 tablet mounted in the kitchen (like your touchscreen), running the Imperihome app, was planning on adding in the thermostat control into that at some stage.
Hi Dave,
I like the idea of using Kindle Fire screen. It looks really nice in your picture.
And the definition is much better than mine which is 840×480.
However, I went with the Rasp Pi touchscreen for the following reasons:
1) My home-brew app for Home Automation is running on Pi, and the
front-end is a browser. The Pi can do both at the same time.
2) I have DHT22 directly connected to Pi, so needed GPIO access.
3) Wanted to be able add other stuff (eg. Siri, Alexa, control my roomba, etc. etc.)
4) Wanted screen to stay on 24/7 (without blanking)
5) Wanted boot-up in browser (kiosk mode)
For the Kindle, did you root it? Can you get it to boot up in a browser (kiosk mode)
and turn off the screen-blanking?
Using Kindle as ‘front-end’ (browser), and a Pi mounted behind it as ‘backend’
could be a good solution. Probably could even power both from the same PSU.
Now that I think about it, a PiZero with WiFi dongle might even be enough (and that would be slim
behind the screen).
Thanks.
Best regards,
Niall.
Niall, Imperihome has a nice feature where it can activate on camera movment. So as soon as anyone comes close, the dashboard comes up. I didn’t need to root it, but I did have to get the Google Play store on there so I could get Imperihome on it.
Dave,
Looks nice. For showing info on a wall-mounted display, I’ve found
that less is more, ie you shouldn’t have to stop and squint, and figure-out ‘what exactly
am I looking at here’. So, I only show the bare-minimum … and as big as possible.
So that it’s clear from anywhere in the room or just walking past at a glance you can see
the temp, and if there’s rain on the way, or if the heating is on.
I’ve found an app which would allow the Kindle to run a browser in Kiosk mode. So I might consider upgrading
my lo-res touchscreen to a KFHD6 with a Pi stuck behind it. The Pi touchscreen was originally around
euro 70, and I accidentally broke off a bit of the bezel (there is black insulating tape over it)
BTW, I sent an email to you with info about boiler control.
Thanks.
Best regards,
Niall.
Hi Dave,
Temp is very steady. The house is never ‘cold’. But it’s never ‘hot’ either.
Most of the time it’s just slightly above ‘cold’. Sometimes, I’ll manually up-it by a degree or 2.
But once the reading is around 18, then the house is comfortable.
(here’s the temp in/out for today)
http://i1168.photobucket.com/albums/r496/mcandrewniall/TempToday_zpsqqcmly8y.png
Also, I took a meter reading today .. in the last 10 days we’ve averaged 3.6 m3 per day. So, it’s definitely more efficient. I remember some years ago looking at gas bills and estimating that we are using around 10m3 per day in the winter.
Thanks.
Best regards,
Niall.