Why not wasting 10 seconds to write something about the linked article?
homeassistant
Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io
I'll write a quick gist for anyone coming along:
One gas boiler in the house, each room has a smart TRV.
PIR sensor to set room presence, each window has an opening mag sensor.
HASS has a general presence sensor set.
Each room's temperature is targeted based on presence and window status:
For each room, if person is home at all, and has been in the room for 5 mins, and the window is closed, TRV to 19, boiler on if <19.
If the room presence is negative and the window is closed, drop TRV target to 16.
If the window is open, drop the TRV target to 7.
There is a little more detail that that in the article, but that's the basics.