The Power of Integration: On demand heating using proximity, presence, and temperature
The Brief
This month we encountered a very interesting challenge during a client install.
Marco had just finished renovating his classic 30 year old apartment, when he heard about the Smart Home Center from a friend. He contacted us as he wanted a way to automate his heating system.
Marco had spent almost 10,000 Euros on a brand new, state of the art Samsung HVAC (Heating, Ventilation and Air Conditioning) system. Despite the name, he opted solely for the heating side of things. He had installed new Radiators into each room of his 3 bedroom apartment. The company who did the install also provided Marco with a ‘Samsung Wifi Kit’ so that he can turn the boiler on and off using his mobile phone. The app he was given was called Samsung Smart Things, which the Smart Home Center is very familiar with. Smart Things was the darling child of the internet of things for a while, until Samsung bought the whole company and integrated it (some would say poorly) into its own Smart Home products offering.
Marco was not very happy with Smart Things. He found it quite limiting, as unless he wanted to share his location with Samsung at all times in order for it to switch the boiler on and off when he arrives/leaves home (something he was reluctant to do), then all he could really use it for was to create an on/off schedule based on time of day. The problem with this is that Marco is a freelance photographer, and therefore did not have strict ‘office hours’ resulting in his home heating often turning on when he wasn’t home thus wasting a lot of electricity unnecessarily.
Marco asked us to find a solution. So we went round to his house for his free consultation and inspected his radiators and boiler.
The Plan
We decided the best approach to Marco’s problem was the following:
Detect when Marco was on his way home (trigger)
When the above condition is met, set the home temperature to Marco’s desired ‘base temperature’ (action)
Detect if a room is below the desired base temperature (trigger)
If so, instruct the boiler to begin heating and circulating hot water around the apartment’s radiators (action)
When Marco walks into a room, set that room’s temperature to Marco’s desired ‘room temperature’ (trigger and action)
When Marco has not been in a room for a while, return the room’s temperature to the ‘base temperature’ (trigger and action)
Detect if a room is above the desired temperature (trigger)
If so, instruct the boiler to turn off (action)
The hardware
Based on the above plan, the Smart Home Center decided the following hardware would be required:
Install the excellent open source, cloudless software Home Assistant onto a Raspberry Pi, and connect it to his home network. This will be the core of Marco’s solution as it will tie together all the below software and hardware. For more information on Home Assistant, please see here
Install the open source app ‘OwnTracks’ onto Marco’s Android phone. This is a superb app that sends a user’s phone’s location securely to a system of your choice. It does not use any clouds, and all communication is performed via a secure and private transmission protocol. For Marco’s case, we connected it directly to his Home Assistant software so that his location could be tracked in real time.
Install Smart Thermostatic Radiator Valves (TRV) onto each of Marco’s radiators. A TRV is a simple wifi enabled valve that replaces a radiators traditional valve (the knob you turn to set the temperature of a radiator). Using its built in thermostat, it is able to sense the temperature of the room, then adjust the amount of hot water entering the radiator by using its small electric motor to turn the internal valve of the radiator. It automatically turns the radiator up and down until the room reaches the desired temperature. By installing TRVs into each of Marco’s rooms, we are a step closer to granular control of the heating in every room.
Install Motion Sensors into each of Marco’s rooms. These are small, inexpensive passive infra red (PIR) sensors that stick to the corners of a room and can sense when there is motion in the room.
The Setup
Once the hardware was in place, the next step was to configure Home Assistant to tie everything together.
Proximity
First and foremost, we wanted to make the location information provided by OwnTracks more useful. We wanted to teach Home Assistant when Marco was travelling towards home, so that we could ensure the house was at his desired temperature when he actually arrived home (nobody likes to come home to a cold house right?!). So we first turned on the boiler and timed how long it took for it to start sending hot water to the radiators. Turns out the Samsung HVAC system is very efficient, and it only took around 10 to 15 minutes for the radiators to actually begin heating up. We therefore decided that if Marco was approximately 2KM away from home, and was driving towards home, then the heating should be switched on in order for his home to be warm by the time he arrived home.
We then created a sensor in home assistant that could detect when Marco was in fact achieving the above condition. This sensor received GPS location from Marco’s mobile phone, and provided all the information we required. It could tell how far Marco is away from home, plus his direction of travel (away_from, towards, arrived).
Cold Room Detection
Next up was to create a sensor in Home Assistant that could detect if any of the radiators were reporting as being cold. As mentioned above, the TRVs can detect the actual temperature of the room, and based on this turn the radiator up or down in order to achieve the desired temperature. As the TRVs are connected to Home Assistant, they also report their ‘state’ every minute. Their states are: ‘Off’, ‘Idle (Heat)’ and ‘Heating (Heat)’. We decided that this ‘state’ reporting was perfect for our purposes, so using a little bit of Jinja2 and YAML code, we created a cool little sensor to simply switch to ‘True’ if any of the TRV states switched to ‘Heating (Heat)’.
The Automations
Now that all the hardware, software and sensors are in place, we needed the final piece of the puzzle; the automations. An automation is a term used in Home Assistant to instruct it to perform ‘actions’ when something is ‘triggered’.
So in this case, our first trigger is Marco’s proximity to home, and our first action is to turn the radiators on. As an added bit of transparency, we also wanted to send a message to Marco’s phone that this has happened, so we used the messaging app ‘Telegram’ on Marco’s phone to send him a message.
Next up, was to integrate the motion sensors to further increase the temperature of a room if they detect motion:
We now need to write the automation to turn on the boiler if any of the radiators report they need to be heated.
Finally, we need to give Marco a way to change the variables of his heating system. So in his home assistant portal (that he accesses on his phone from anywhere) we created the following cards:
Wrap up
If you are reading this, congratulations! You have made it to the end of a very technical post. As you can see, a lot of work went on behind the scenes in order for Marco’s heating to be completely automated, energy efficient and transparent.
Because Marco’s heating was only turning on when it was actually required on a per room basis, he immediately saw a difference in his electricity consumption. His boiler is no longer turning on for long periods of time and his radiators are no longer trying to warm up an empty room. This is pure 21st Century heating automation!
If you have home automation needs that ‘just works’, be sure to contact us for a free, no-commitment consultation.