This blog post describes making your own smart thermostat using machine learning (K-means clustering) and a bunch of hardware: Arduino, Raspberry PI, two XBee’s and an Amazon Cloud sever (see: idea in brief). I have to start with a disclaimer. I am not a
programmer good programmer and certainly not an electrical engineer. However, this research project yielded a working thermostat that is able to learn over time how to improve energy efficiency.
For those who want to directly go to the smart ‘learning’ part, you can skip to Part 7: Learning and adapting temperature scenarios in the Amazon cloud (SPARK). Otherwise, the structure of this post, after a short introduction and overview, follows the path of data, control and necessary feedback loops as shown in figure 1. Every part contains specific code examples. The full source code can found on github https://github.com/niektemme/.
- Introduction & overview
- Reading data form a ‘dumb’ thermostat and various temperature sensors (Arduino)
- Sending data, at 1,000 values per second, to a Raspberry PI (Python)
- Storing data in the Amazon Cloud (HBase)
- Turning the boiler on and off at the right time (Arduino)
- Using outside temperature and scenarios to control an Arduino from a Raspberry PI
- Learning and adapting temperature scenarios in the Amazon cloud (SPARK)