This repo is consolidating the instructions and helper scripts used for setting up ESP8266 or ESP32 devices for local control of Mitsubishi Electric air conditioners.
You can control the units by using any of the following implementations (all of which are usually based on the SwiCago/HeatPump library):
ℹ️ I tried both of the implementations above and they work fine in my case with the following AC models:
MSZ-HR25VF
MSZ-AY42VG
-
Remove the plastic covers of your AC in order to familiarize yourself with the internals and locate the CN105 connector. It's usually in red with CN105 written right next to it.
-
An ESP8266 or ESP32 device which you will physically connect to your AC using the CN105 port. I purchased the following parts:
-
Connect/solder the wires directly to the board as shown here: SwiCago/HeatPump#13 (comment)
-
Install Docker on your machine in order to run the steps from these instructions later
- Head over to: https://web.esphome.io
- Connect the MCU to your laptop using a USB-C cable
- Click on
Connect
and chooseSerial
- Once connected, click on:
Prepare for first use
to flash a basic ESPHome which will allow you to configure the WiFi details and you'll be able to control the device remotely - Find the IP address of the device
- Set up a DHCP reservation for the device so it'll always receive the same IP address
- Head over to "http://{IP_ADDR}" in order to flash any custom configurations/firmware using the steps below (you can also control the device from the web interface)
-
Edit the
secrets.yaml
file to provide your WiFi details -
Once the MCU is plugged in and connected to your WiFi, use this example command to upload the updated ESPHome firmware which will include the geoffdavis/esphome-mitsubishiheatpump climate component:
docker run -it --rm \ -v "${PWD}":/config \ --entrypoint /config/entrypoint.sh \ ghcr.io/esphome/esphome \ my_office 192.168.1.2 run
-
Once the MCU is plugged in and connected to your WiFi, use this example command to upload the gysmo38/mitsubishi2MQTT firmware binary on the device:
docker run -it --rm \ -v "${PWD}":/config \ --entrypoint /config/entrypoint.sh \ ghcr.io/esphome/esphome \ my_office 192.168.1.2 upload mitsubishi2MQTT/mitsubishi2MQTT_WEMOS_D1_Mini_2023.8.0.bin
-
The device will reboot and will start advertising a temporary WiFi network:
HVAC_XXXX
-
Set your WiFi defailts and click on "Save & Reboot"
-
Set the MQTT information for use with Home Assistant
-
(optional): Set up a Web password to prevent unwanted access in Setup -> Unit -> Web password -> Save & Reboot
-
If you haven't disabled the MQTT autodiscovery in Home Assistant, you should see the device automatically appear
Once you're done with the firmware flashing and you're able to communicate with the device remotely (using its IP address), connect the device to the CN105
port and carefully place back all the plastic covers.