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
Home Assistant custom integration to fetch data from Powerpal

Powerpal custom component for Home Assistant Component to integrate with powerpal. This repository and integration is not affiliated with Powerpal. Th

Lawrence 32 Jan 07, 2023
Blender Camera Switcher

Blender Camera Switcher A simple camera switcher addon for blender. Useful when use reference image for camera. This addon will automatically fix the

Corgice 1 Jan 31, 2022
Christmasvillage-rpi - Raspberry Pi relay controller for ChristmasVillage.io

ChristmasVillage.io Relay Controller Links ChristmasVillage.io - Live Stream & Controls Youtube Instagram About This repository controls the light rel

Grant Windes 2 Feb 15, 2022
Custom component for MPC-HC for home-assistant

mpc_hc The current mpchc integration in homeassistant violates ADR0004, so it will be deleted from core. This is just the existing integration copied

3 Dec 15, 2022
A Raspberry Pi Pico plant sensor hub coded in Micropython

plantsensor A Raspberry Pi Pico plant sensor hub coded in Micropython I used: 1x Raspberry Pi Pico - microcontroller 1x Waveshare Pico OLED 1.3 - scre

78 Sep 20, 2022
Implemented robot inverse kinematics.

robot_inverse_kinematics Project setup # put the package in the workspace $ cd ~/catkin_ws/ $ catkin_make $ source devel/setup.bash Description In thi

Jianming Han 2 Dec 08, 2022
Robo Arm :: Rigging is a rigging addon for Blender that helps animating industrial robotic arms.

Robo Arm :: Rigging Robo Arm :: Rigging is a rigging addon for Blender that helps animating industrial robotic arms. It construct serial links(a kind

2 Nov 18, 2021
🐱 Petkit feeder components for HomeAssistant

Petkit for HomeAssistant Installing Download and copy custom_components/xiaomi_miot folder to custom_components folder in your HomeAssistant config fo

62 Dec 29, 2022
FHEM Connector for FHT Heating devices

home-assistant-fht from: https://github.com/Rsclub22 FHEM Connector for FHT Heating devices (connected via FHEM) Requires FHEM to work You can find FH

5 Dec 01, 2022
Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs

Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs

Matthew Garrett 1.2k Jan 04, 2023
Cow Feeder is a bot automatically execute trade on cowswap

Cow Feeder is a bot automatically execute trade on cowswap, includes functions: Monitoring Ethereum network gas price and execute trade whe

6 Apr 20, 2022
An open source operating system designed primarily for the Raspberry Pi Pico, written entirely in MicroPython

PycOS An open source operating system designed primarily for the Raspberry Pi Pico, written entirely in MicroPython. "PycOS" is an combination of the

8 Oct 06, 2022
Home-Assistant MQTT bridge for Panasonic Comfort Cloud

Panasonic Comfort Cloud MQTT Bridge Home-Assistant MQTT bridge for Panasonic Comfort Cloud. Note: Currently this brige is a one evening prototype proj

Santtu Järvi 2 Jan 04, 2023
🌱 - WebhookHard◞ Fines Educativos ◟

v1.0.0 WebhookHardware ¿Que es WebhookHardware? WebhookHardware se trata de un proyecto tratado para sacar informacion sobre el hardware de tus victim

3 Jun 14, 2021
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
The example shows using local self-hosted runners on-premises by making use of a runner on a Raspberry Pi with LED's attached to it

The example shows using local self-hosted runners on-premises by making use of a runner on a Raspberry Pi with LED's attached to it

Martin Woodward 6 Nov 13, 2021
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
Home Assistant custom component to help ev-chargers stay below peak hourly energy levels.

Peaqev ev-charging Peaqev ev-charging is an attempt of charging an ev without breaching a preset monthly max-peak energy level. In order for this inte

Magnus Eldén 35 Dec 24, 2022
LifeSaver automatically, periodically saves USB flash drive data into the PC

LifeSaver automatically, periodically saves USB flash drive data into the PC. Theoriticaly it will work with any any connected drive ex - Hard Disk ,SSD ... But, can't handle Backing up multipatition

siddharth dhaka 4 Sep 26, 2021
Hook and simulate global mouse events in pure Python

mouse Take full control of your mouse with this small Python library. Hook global events, register hotkeys, simulate mouse movement and clicks, and mu

BoppreH 722 Dec 31, 2022