Moved

I moved this to https://github.com/cristianghsandu/hass-esp32-ac

ESP32 Home Sensor: AC Control

General info

This is a small board to add Home Assistant control to your old school AC.
It uses an ESP32 for WiFi connectivity and IR code sending(via the RMT peripheral).

This is what it looks like when fully built:

And this is the bare PCB:

Building

For a Fritzing breadboard schematic see this Fritzing file.
For the PCB I used the ESP32 30-pin DoIT devkit board footprint from this repo.

The KiCad sources for the PCB are in this folder.

BOM

The very few parts you will need are:

  • An ESP32 Doit Devkit v1 (the 30 pin version see this)
  • A NPN transistor in a TO220 package(you could change the design to use a TO92 transistor) like the 2N5296
  • Some male and female pin headers(pitch 2.54'')
  • A 12x12mm push button
  • An IR LED
  • A DHT22 humidity and temperature sensor
  • A 10k pull up resistor for the DHT22 sensor
  • Optional: a 2 pin screw terminal for powering the board externally

The Code

The code uses the Platformio ecosystem so you will need that to build it(sorry, no Arduino IDE support).
Currently it relies on the esphome-core library to connect to Home Assistant but I will need to get rid of it and use just MQTT messages because the author is no longer supporting the C++ API.

AC Control

To control your AC you will need to change the RAW codes in the config.h file. I used AnalysIR to get my raw codes but you could also get them with an Arduinoor even Lirc with irrecord(it's what I initially did). Hardware wise you will either need an Arduino/Raspberry Pi + TSOP4838 receiver(or any other receiver) or maybe an all-in-one solution like the USB IR Toy - which I already had and used.