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
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
Testing out some (stolen) DMA code for RP2040 Micropython

RP2040_micropython_dma testing out some (stolen) DMA code for RP2040 Micropython. Heavy inspiration and some code from https://iosoft.blog/2021/10/26/

2 Dec 29, 2022
PlatformIO development platform for GSM modules

PlatformIO development platform for GSM modules Supported Modules Quectel M66 OpenCPU Arduino - TODO other - in progress... Supported Boards Comet M66

Georgi Angelov 5 Aug 06, 2022
ROS2 nodes for Waveshare Alphabot2-Pi mobile robot.

ROS2 for Waveshare Alphabot2-Pi This repo contains ROS2 packages for the Waveshare Alphabot2-Pi mobile robot: alphabot2: it contains the nodes used to

Michele Rizzo 2 Oct 11, 2022
Zev es un Bot/Juego RPG de Discord creado en y para aprender Python.

Zev es un Bot/Juego RPG de Discord creado en y para aprender Python.

Julen Smith 3 Jan 12, 2022
Интеграция Home Assistant с ЛК "Интер РАО"

ЕЛК ЖКХ «Интер РАО» для Home Assistant Предоставление информации о текущем состоянии ваших аккаунтов в ЕЛК ЖКХ. Введение @ TODO @ Установка Посредство

Alexander Ryazanov 27 Nov 05, 2022
iot-dashboard: Fully integrated architecture platform with a dashboard for Logistics Monitoring, Internet of Things.

Fully integrated architecture platform with a dashboard for Logistics Monitoring, Internet of Things. Written in Python. Flask applicati

2 Jul 29, 2022
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
Event-based hardware simulation framework

An event-based multi-device simulation framework providing configuration and orchestration of complex multi-device simulations.

Diamond Light Source Controls Group 3 Feb 01, 2022
Inykcal is a software written in python for selected E-Paper displays.

Inykcal is a software written in python for selected E-Paper displays. It converts these displays into useful information dashboards. It's open-source, free for personal use, fully modular and user-f

Ace 727 Jan 02, 2023
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
Pihole-eink-display - A simple Python script to display PiHole statistics on an eInk Display

Pihole-eink-display - A simple Python script to display PiHole statistics on an eInk Display

Mark McIntyre 64 Oct 11, 2022
A PYTHON Library for Controlling Motors using SOLO Motor Controllers with RASPBERRY PI, Linux, windows, and more!

A PYTHON Library for Controlling Motors using SOLO Motor Controllers with RASPBERRY PI, Linux, windows, and more!

SOLO Motor Controllers 3 Apr 29, 2022
Technical Answers to Real-World Problems. Evolution of Watering Manually to Watering Automatically.

Automatic Watering System using Soil Moisture Sensor and RTC Timer with Arduino Technical Answers to Real-World Problems Know the plant, Grow the plan

NelakurthiSudheer 3 Jan 03, 2022
ModbusTCP2MQTT - Sungrow & SMA Solar Inverter addon for Home Assistant

ModbusTCP2MQTT Sungrow & SMA Solar Inverter addon for Home Assistant This addon will connect directly to your Inverter using Modbus TCP. Support model

Teny Smart 40 Dec 21, 2022
Homeautomation system created with Raspberry Pi 3 and Firebase.

Homeautomation System - Raspberry Pi 3 Desenvolvido com Python, Flask com AJAX e Firebase permite o controle local e remoto Itens necessários Raspberr

Joselino Santos 0 Mar 09, 2022
Adafruit IO connected smart thermostat based on CircuitPython.

Adafruit IO Thermostat Adafruit IO connected smart thermostat based on CircuitPython. Background and Motivation I have a 24 V Heat-only system with a

Shubham Chaudhary 1 Jan 18, 2022
A 3rd party Moonraker component to create timelapse of 3D prints.

A 3rd party Moonraker component to create timelapse of 3D prints.

Mainsail-Crew 166 Dec 26, 2022
A refreshed Python toolbox for building complex digital hardware

A refreshed Python toolbox for building complex digital hardware

nMigen 1k Jan 05, 2023
Raspberry Pi Spectrometer

PySpectrometer 2021-03-05 Raspberry Pi Spectrometer The PySpectrometer is a Python (OpenCV and Tkinter) implementation of an optical spectrometer. The

Les Wright 538 Jan 05, 2023