Giter Site home page Giter Site logo

esphome_aircon's Introduction

ESPHome-based Air Conditioner

Replace your window air conditioner manual controls with a relay board, connected to an ESP8266-based microcontroller running ESPHome.

Prerequisites

This project assumes that you have Home Assistant running locally, with the ESPHome project installed and running. The author recommends a Raspberry Pi runing HassIO with the ESPHome add-on installed.

Hardware

This firmware has been developed and tested with the following hardware:

  • Wemos D1 Mini R2 microcontroller (other ESP8266 boards may also work)
  • SSD1306 I2C OLED display, 128x64
  • HTU21D I2C temperature and humidity sensor
  • BH1750 I2C light sensor (optional)
  • Generic 2 or 3 relay module, active low! (meaning it will activate the relay when the GPIO is at 0V)
    • For units with dual fan speed, you will need 3 relays to control compressor, fan state, and fan speed
    • For units with only compressor and fan, a dual relay module will suffice.
  • 8-LED WS2812B ring module
  • Rotary Encoder

Installation

For this document purpose, we will assume the device ID is set to airconditioner1 in your setup.

Home Assistant

This firmware is designed to run independently of Home Assistant, but with strong integration using the native ESPHome API. There are two basic control input elements expected by the firmware, for setting the desired temperature and the operation mode.

You will need to add the following configuration.

input_number:
  airconditioner1_temp:
    name: Air Conditioner Temp
    min: 19                       # Modify these values as appropriate for your desired operation.
    max: 27
    step: 0.5

input_select:
  airconditioner1_mode:
    name: Air Conditioner Mode
    options:                      # These are the default operation modes available
      - "off"
      - "auto"
      - "cool"
      - "fan_only"
    initial: "off"
    icon: mdi:snowflake

ESP8266

Download or clone the repository, and copy the files into your /config/esphome directory on your Home Assistant instance. You can optionally exclude some of the files in this repository that are not required for operation (e.g. README.md).

You will need to make the following connections:

Wemos D1 Mini SSD1306 HTU21D BH1750 WS2812B Relay1 (Fan Enable) Relay2 (Compressor) Relay3 (Fan Speed) Relay VCC Relay GND
3V3 VCC VCC VCC
5V VCC VCC
D1 SDA SDA SDA
D2 SCL SCL SCL
D3 D IN
D5 IN
D6 IN
D7 IN
GND GND GND GND GND GND

You will also need to create a secrets.yaml file inside your /config/esphome directory, with the following definitions:

ssid: {{your_network_ssid}}
wifi_password: {{wifi_password}}

Once you have the configurations set up for both Home Assistant and ESPHome, you can use the ESP Home interface to upload to the device.

esphome_aircon's People

Contributors

jptrsn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

esphome_aircon's Issues

IR Receiver Functionality

Integrate TSOP38328 and/or TSOP4838 receiver into circuit. Add internal functionality (e.g. move target temp) and external functionality (trigger automation in home assistant) examples. Breakout into separate files.

Light Animations

When mode changes, animate ws2812 led ring to indicate state.

E.g. in auto mode, when target temperature is reached, show a green pulse. When transitioning to cooling mode, pulse cyan. Blink on settings updated.

Display Pages

Create a display page for each operation mode/state combination. Show relevant information given each state.

Include optional external HASS sensors, e.g. outdoor temperature from forecast.

Adjust brightness based on lux sensor and/or time of day.

Create circuit diagram

Create a circuit diagram for the hardware connections. Add explanation to documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.