Skip to content

o0Zz/ha-climate2mqtt

Repository files navigation

HA-Climate2MQTT

A lightweight solution for integrating any climate control system with Home Assistant via MQTT and an ESP32 for less than 10$ by heatpump

❄️ Supported Climates

  • Any Headpump with IR (Midea, etc...) Generic_NEC_IR
  • Mitsubishi (UART) Mitsubishi
  • Toshiba (UART) - (Seiya, Shorai, Yukai, ...) Toshiba
  • Daikin (UART)
  • LG (UART)
  • Fujitsu (UART)
  • Hitachi (UART)

⚙️ Supported Features

  • HA Auto discovery
  • Set temperature, mode, power, swing
  • Fully configurable from WebInterface
  • Access point to setup it
  • Firmware upgrade
  • AC can be remotly control via WebInterface

🧪 Tested Hardware

🚀 How to Flash & Run

  1. Download the firmware for your microcontroller (In release section)
  2. Wire your AC unit. Refer to the documentation in the doc/ folder for wiring details.
  3. Flash your ESP32 via ESP flasher https://www.espressif.com/en/support/download/other-tools
    or
pip install esptool
esptool.py --port COM3 erase_flash
esptool.py --chip esp32 --port COM3 --baud 460800 write_flash -z 0x1000 firmware.bin
  1. Power on the ESP32. By default, it will create a Wi-Fi access point named ESP32_Climate2MQTT.
  2. Connect to the ESP32 using that access point and access to "http://192.168.8.1"

LED Status Indicators

The ESP32 (Especially C6) has a builtin RGB led. This LED is used to know the current ESP32 status.

  • Solid Blue: Device is booting or connecting to network
  • Solid Red: Error state, or disconnected from WiFi, MQTT, or climate system
  • Blinking Blue: Access point mode active, waiting for configuration
  • Solid Green: Fully operational (connected to climate system, WiFi, and MQTT)

🧰 Build Instructions

⚙️ Prerequisites

Ensure you have the following installed before building:

🖥️ Using ESP-IDF Command Line

Open the official ESP-IDF Command Line and type:

git clone https://github.com/o0zz/ha-climate2mqtt.git --recursive
cd ha-climate2mqtt
idf.py set-target {esp32|esp32s2|esp32s3|esp32c2|esp32c3|esp32c6}
idf.py menuconfig
idf.py build
idf.py flash

🧩 Using VSCode - Windows

Before building, ensure you have set the correct target as described in the previous section.

Open the official ESP-IDF Command Line and run:

idf.py set-target {esp32|esp32s2|esp32s3|esp32c2|esp32c3|esp32c6}

⚙️ Configure VS Code Terminal

In VS Code, set Command Prompt as the default terminal:

  1. Press Ctrl + Shift + P
  2. Select Terminal: Select Default Profile
  3. Choose Command Prompt (C:\Windows\System32\cmd.exe)

🚀 Build the Project

  1. Press Ctrl + Shift + P
  2. Select Tasks: Run Task
  3. Choose Build & Run (ESP-IDF)

Disclaimer

This project involves interacting with existing appliance electronics.
Proceed at your own risk.

The author is not responsible for any Hardware damage of any kind.

About

Connect any AC/Climate with an ESP32 to homeassistant over MQTT

Resources

License

Stars

Watchers

Forks

Packages

No packages published