Adafruit IO connected smart thermostat based on CircuitPython.

Overview

Adafruit IO Thermostat

Adafruit IO connected smart thermostat based on CircuitPython.

Background and Motivation

I have a 24 V Heat-only system with a 2-wire system (No C-wire, only R and W). It used a manual Honeywell single-point thermostat. I wanted to get the functionalities of a smart thermostat (potentially HomeKit compatible) without the hassle of installing a C-wire myself or having to buy with expensive smart thermostats. So I created a simple smart thermostat with an Wi-Fi capable microcontroller.

Hardware

I used a Adafruit ESP32S2 Feather board, along with a TMP36 analog temperature sensor, and a simple non-latching relay.

I wired up the TMP36 to an analog input pin (A5) and the relay to a digital pin (D10), and connected the relay to the R and W wires in my heating panel in the NO mode i.e when the relay is off, the heater is also off. The circuit diagram is given below.

This image shows how the components are wired to the microcontroller board.

Flasing the Code on the Microcontroller

As is with any CircuitPython device, you just need to copy the contents of the src folder to the root directory of the CIRCUITPY drive. If you're using a different board, or different pins, or components (say, a digital temperature sensor), the relevant code is in src/code.py for you to change. Remember to enter the credentials for your Wi-Fi and Adafruit IO account in src/secrets.py.

I have included the prerequisited for my board in the src/lib folder. For a different board, you might need some more extra libraries.

The code should "just work", however, this is rarely the case with hobby electronics; so use your judgement and a lot of testing to make sure to not fry your home heating system. I provide no gurantees whatsoever. However, feel free to file issues for important things!

Setting Up Adafruit IO

Below is a set of brief steps to setup your Adafruit IO accoount to interface with your smart thermostat.

  1. Setup an Adafruit IO account.
  2. Create the following feeds:
    1. config: This is to configure the status of your smart thermostat (0 = OFF, 1 = SINGLE POINT, 2 = DUAL POINT).
    2. tgt-temp: This is to set the target temperature in heat-only (SINGLE POINT) mode.
    3. min-temp: This is to set the lower bound (heating threshold) temperature in dual (DUAL POINT) mode.
    4. max-temp: This is to set the upper bound (cooling threshold) temperature in dual (DUAL POINT) mode.
    5. heater-on: This feed is where the status of the heater is published.
    6. curr-temp: This feed is where the current temperature is published.
  3. You can try creating a IO Dashboard so see some of the things. Here is a picture of how mine looks.

This image shows how the Adafruit IO Dashboard for the thermostat looks.

Homebridge Plugin

My ultimate goal was to integrate with HomeKit so I wrote a Homebridge plugin that talks to Adafruit IO to send commands to the thermostat. Find it here.

Owner
Shubham Chaudhary
PhD student at the Department of Computer Science at Cornell University.
Shubham Chaudhary
Python code written to utilize the Korlan usb2can hardware to send and receive data over the can-bus on a 2008 Nissan 350z

nissan_ecu_hacking Python code written to utilize the Korlan usb2can hardware to send and receive data over the can-bus on a 2008 Nissan 350z My goal

Liam Goss 11 Sep 24, 2022
A simple non-official manager interface I'm using for my Raspberry Pis.

My Raspberry Pi Manager Overview I have two Raspberry Pi 4 Model B devices that I hooked up to my two TVs (one in my bedroom and the other in my new g

Christian Deacon 21 Jan 04, 2023
uOTA - OTA updater for MicroPython

Update your device firmware written in MicroPython over the air. Suitable for private and/or larger projects with many files.

Martin Komon 25 Dec 19, 2022
Transform a Raspberry Pi into a network diagnostic machine.

EtherView Last updated jan 30, 2022. Welcome to the EtherView project! This is a project to transform a RaspberryPi into a portable network diagnostic

1 Jan 30, 2022
Python Wrapper for Homeassistant's REST API

HomeassistantAPI Python Wrapper for Homeassistant's REST API Please ⭐️ the repo if you find this project useful or cool! Here is a quick example. from

Nate 29 Dec 31, 2022
A Home Assistant integration for Solaredge inverters

A Home Assistant integration for Solaredge inverters. Supports multiple inverters chained through RS485.

Seth 50 Dec 23, 2022
🎃 Some spooky code samples to hack yourself a pumpkin 👻

🎃 Tech Or Treat 👻 It's spooky season for those who celebrate Halloween, and to get in the spirit (spirit - get it? 👻 ) we thought it would be fun t

Jim Bennett 5 Feb 07, 2022
A python file which I wrote to allow the Dorna Robots API to draw an Image on a 3D plane

Dorna-Robotics-Internship Code In the directory "Code" is a python file which I wrote to allow the Dorna Robots API to draw an Image on a 3D plane. I

Stephen Otto 2 Dec 06, 2021
Ansible tools for operating and managing fleets of Blinksticks in harmony using the Blinkstick Python library.

Ansible tools for operating and managing fleets of Blinksticks in harmony using the Blinkstick Python library.

Greg Robinson 3 Aug 10, 2022
Electrolux Pure i9 robot vacuum integration for Home Assistant.

Home Assistant Pure i9 This repository integrates your Electrolux Pure i9 robot vacuum with the smart home platform Home Assistant. The integration co

Niklas Ekman 15 Dec 22, 2022
Automatic CPU speed & power optimizer for Linux

Automatic CPU speed & power optimizer for Linux based on active monitoring of laptop's battery state, CPU usage, CPU temperature and system load. Ultimately allowing you to improve battery life witho

Adnan Hodzic 3.4k Jan 07, 2023
Resmed_myair_sensors - This is a Home Assistant custom component to pull daily CPAP data from ResMed's myAir service using an undocumented API

resmed_myair This component will set up the following platforms. Platform Description sensor Show info from the myAir API. Installation Using the tool

Preston Tamkin 17 Dec 29, 2022
Repo for the esp32s2 version of the Wi-Fi Nugget

Repo for the esp32s2 version of the Wi-Fi Nugget

HakCat 30 Nov 05, 2022
emhass: Energy Management for Home Assistant

emhass EMHASS: Energy Management for Home Assistant Context This module was conceived as an energy management optimization tool for residential electr

David 70 Dec 24, 2022
A dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc. written in Python

Weather Clock for Raspberry PI This project is a dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc.

Markus Geiger 1 May 01, 2022
Make your MacOS keyboard brightness fade in and out

Make your MacOS keyboard brightness fade in and out. (It's working depends on the Kbrightness file, which only works for 2015 Macs, so this will only work on 2015 Macs.)

1 Dec 16, 2021
hardware design of the 250mm drone

hardware design of the 250mm drone

ZJU FAST Lab 645 Dec 25, 2022
Port of Uxn to digital hardware in the Logisim simulator

Uxn-Logisim Implements the Uxn instruction set in digital hardware. Very WIP. Contents cpu.circ - The Logisim file microcode.mc - Microcode source fil

DeltaF1 11 Mar 27, 2022
3D-printable hexagonal mirror array capable of reflecting sunlight into arbitrary patterns

3D-printable hexagonal mirror array capable of reflecting sunlight into arbitrary patterns

Ben Bartlett 2.3k Dec 30, 2022
Monitor Live USB Plug In & Plug Out Events

I/O - Live USB Monitoring Author: Jonathan Scott @jonathandata1 Date: 3/13/2021 CURRENT VERSION 1.0 This is just a simple bash script that calls a pyt

Jonathan Scott 17 Dec 03, 2022