Introduction: DIY Smart Thermostat

Smart thermostat for furnace and air conditioner management, home alarm system, light management and ambient statistics (Temperature, Humidity, Pressure, Indoor Air Quality)

Written for Arduino IDE and PlatformIO.

Source code on GitHub:


  • Arduino C++ sketch running on an ESP8266EX D1 Mini from Lolin running @ 160MHz
  • Raspberry + Home Assistant for Web GUI, automations and MQTT server
  • Bosch BME680 environmental sensor (temp, humidity, air quality, air pressure)
  • SR501 PIR sensor for motion detection
  • TTP223 capacitive touch buttons
  • SD1306 OLED 128x64 pixel 0.96"
  • 1000uf capacitor for 5V power stabilization
  • 5V 220V relè used to turn ON/OFF furnance
  • IR emitter/receiver to manage Air Conditioner (you can use a simple IR LED, with no transistor/capacitor IR range is reduced)
  • Google Home Mini for Voice Recognition

Step 1: Wiring Diagram

Step 2: Photos

Step 3: Project Is Bootstrapped With Arduino Bootstrapper