Support for Midea A/C

Tags: #<Tag:0x00007fc3fcda53a0> #<Tag:0x00007fc3fcda52d8>

I’ve been asked to secure this info from Any Support for Midea A/C
I’ve put here all relevant info from that topic:

Looks like it is finally working!
Thanks Mac-Zhou, ReneKlootwijk, SergeyDudanov, Fraschi for awesome collaboration.
(it already works, but development still ongoing to support more models and functions)

See this post for supported models (list is updated regularly) Thanks @paddy0174 !!

You can either order them online (pre-assembled, have a look here Thanks @dudanov for making this available for free!!)

Or make your own:

and to program it
1x image
or with soldered links to put it into programming mode

(Check this link for more options flashing esp-01’s)

I used this to flash the esp-01: USB Serial Adapter CH340G 5V/3.3V USB to TTL-UART.

As the AC itself doesn’t use USB (even though it uses an USB connector), you cannot use the programmer adapter there, you need the 5V/3.3V Adapter.
Mine looks like this (my A/C was both equipped with USB as well as header plug, so I could choose)

Normally ‘programming’ would be done from the ESPHome add-on

example of my mideahvac.yaml:

# Example configuration entry

  name: mideahvac
  platform: ESP8266
  board: esp01_1m

  ssid: "mywifissid"
  password: "mywifipassword!"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
    ssid: "Midea-Hvac Fallback Hotspot"
    password: "53416ef6123"

# Enable Home Assistant API


# Disable logging over UART (required)
  baud_rate: 0

# UART settings for Midea dongle (required)
  tx_pin: 1   # hardware dependant
  rx_pin: 3   # hardware dependant
  baud_rate: 9600

# Optional (if you want modify settings)
  period: 1s
  timeout: 2s
  num_attempts: 3

# Main settings
  - platform: midea_ac
    name: "Midea AC"    # Use a unique name.
    autoconf: true
    beeper: true        # Beep on commands.
    visual:             # Optional. Example of visual settings override.
      min_temperature: 17 °C    # min: 17
      max_temperature: 30 °C    # max: 30
      temperature_step: 0.5 °C  # min: 0.5
    supported_modes:    # All capabilities in this section detected by autoconf.
      - FAN_ONLY
      - HEAT_COOL
      - COOL
      - HEAT
      - DRY
      - SILENT
      - TURBO
    supported_presets:  # All capabilities in this section detected by autoconf.
      - ECO
      - BOOST
      - SLEEP
    custom_presets:     # All capabilities in this section detected by autoconf.
      - VERTICAL
      - BOTH
    outdoor_temperature:  # Optional. Create outdoor unit temperature sensor (may display incorrect values after long inactivity).
      name: "Temp"
    power_usage:          # Optional. Create power usage sensor (only for devices that support this feature).
      name: "Power"
    humidity_setpoint:    # Optional. Create indoor humidity sensor.
      name: "Humidity"

A full overview of parameters can be found here

Checking size /data/mideahvac/.pioenvs/mideahvac/firmware.elf
RAM:   [=====     ]  45.2% (used 37064 bytes from 81920 bytes)
Flash: [====      ]  40.1% (used 411128 bytes from 1023984 bytes)
Creating BIN file "/data/mideahvac/.pioenvs/mideahvac/firmware.bin" using "/root/.platformio/packages/framework-arduinoespressif8266/bootloaders/eboot/eboot.elf" and "/data/mideahvac/.pioenvs/mideahvac/firmware.elf"
========================= [SUCCESS] Took 8.98 seconds =========================
INFO Successfully compiled program.

OTA works for me nowadays(which was not the case when i used the dev repository).
But, if it fails, you can also compile it on HA, and then download and flash it over ser2usb,
Or compile the bins on W10 and flash it using the serial2usb com-port.

Below my command lines used to compile on W10:

cd c:\workshop\esphome

pip install esphome
pip install esphomeflasher
pip install --upgrade git+

esphome mideahvac.yaml wizard
esphome mideahvac.yaml compile


using the compiled C:\_workshop\esphome\mideahvac\.pioenvs\mideahvac\firmware.bin

Assuming you already installed python :wink:

More info here:

PS: If you have a Midea branded AC which uses an osk102/103 wifi module, and it doesn’t work (or works partially), please contact the Midea-msmart development team on Telegram and they will try to fix it😉



Thanks for the detailed information, do you know if there are any pinout details available for the Midea usb-a to the header plug? My Midea dont look exactly as yours, hence I dont see the plug in the Midea circuit board, if not I probably need to measure for 5v and guess rx&tx pins :slight_smile:

The picture is from Telegram, and should help:

  • blue gnd
  • red +5v
  • yellow Rx
  • green Tx

    But still, if you measure you are sure😉
    Tx/Rx seems to be a guess always, as it also depends from which side you’re looking at it.
    (That also explain why manufacturers are not very consistent with it :thinking:)

Can’t you pull it apart a little more? The circuit board should be accessable relatively easy. What model do you have?

These units are mostly pretty basic in design, there is not much “technical” inside.

Thanks a lot for this thread, very much appreciated. Unfortuntaely I can’t test it, some python things are missing in the “supervised install” of HA (in the esphome container add-on), so I can’t get your version to install. I didn’t invest much time in it yet, so this may as well be just a small thing. I’ll try again in the next days. :slight_smile:

You could try the ‘custom’ repo option for esphome?

I think the bin is too big for OTA but you will be able to compile and down load the bin…

Hmm looks like my USB is not standard model A, it have some minor cut at the ends as seen in the picture, so I cant just plugin a usb cable.


It also looks like there are some additional logic compared to the image as seen here:


So I tried to connect it using a modified USB connector and found the 5v/gnd lines, it however dont quite work as it should, I managed to get the AC to start but it kept “beeping” and did not allow me to make any changes on temp or modes beyond this. I thought it were an easy swap since I use the midea_ac by mac-zhou without any issues guess not :frowning:

Can i just use a Wemos D1 Mini instead of the ESP01 with the adapter? The Wemos has 5V and ground pins to be powered and the tx,rx pins for the serial connection. Also can be programed with a usb cable.

Please provide your manufacturer and model. :slight_smile:

Its a QLIMA SC-JA2516

I have midea-like AC (Lessar). I’ve opened it, found the board but there is no any usb-like port.
But there is some unsoldered ports with points 5v and grnd. Can somebody take a look on my board and say, is there any chance to connect it to HA?IMG_20210110_204618|280x500

Thanks, unfortunately the esphome container (the addon for does seem to miss some requirements, so it doesn’t compile your version. I’ll have to check what exactly is missing. Can’t be something big.

I’ll try and report back!

Unfortunately I can’t find any information what chipset is build into the wifi dongle or even the A/C. Sorry, can’t be of more help here, we need to wait for someone to debug this model. It is, unfortunately, not very easy to debug something, you don’t own and can’t mess around with… :frowning:

This is the under side of the circuit board, what about the other side? :wink: The dongle has to have a connection to that board, otherwise it wouldn’t work even with the manufacturer dongle. Or is your model not able to use a manufacturer dongle?

Just to note: it does make sense, to give at least the manufacturer and model, so helping get’s a little easier. So please provide the data for your setup.

@paddy0174 There is a second photo in the post with a link. I don’t know why it was so loaded from the mobile.
There it is:
No, my air conditioner does not support the wifi port out of the box, but I think they use a similar board, which in my case is simply not wired. It would be great if I could just solder the port and use it.

@paddy0174 That’s weird…it compiles fine here:

INFO Reading configuration /config/esphome/Midea-hvac.yaml...
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d /config/esphome/mideahvac
Please wait while upgrading PlatformIO...
PlatformIO has been successfully upgraded to 5.0.1!

If you like PlatformIO, please:
- follow us on Twitter to stay up-to-date on the latest project news >
- star it on GitHub >
- try PlatformIO IDE for embedded development >

Processing mideahvac (board: esp01_1m; framework: arduino; platform: [email protected])
Tool Manager: Installing platformio/tool-scons @ ~4.40001.0
Tool Manager: tool-scons @ 4.40001.0 has been installed!
Tool Manager: Removing tool-scons @ 3.30102.0
Tool Manager: tool-scons @ 3.30102.0 has been removed!
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
 - framework-arduinoespressif8266 3.20704.0 (2.7.4) 
 - tool-esptool 1.413.0 (4.13) 
 - tool-esptoolpy 1.20800.0 (2.8.0) 
 - toolchain-xtensa 2.40802.200502 (4.8.2)
Library Manager: Installing Update
Library Manager: Already installed, built-in library
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncWebServer-esphome> 1.2.7
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
Compiling /data/mideahvac/.pioenvs/mideahvac/src/esphome/components/midea_ac/midea_climate.cpp.o
Compiling /data/mideahvac/.pioenvs/mideahvac/src/esphome/components/midea_ac/midea_frame.cpp.o
Compiling /data/mideahvac/.pioenvs/mideahvac/src/esphome/components/midea_dongle/midea_dongle.cpp.o
Compiling /data/mideahvac/.pioenvs/mideahvac/src/esphome/components/midea_dongle/midea_frame.cpp.o
Compiling /data/mideahvac/.pioenvs/mideahvac/src/main.cpp.o
Linking /data/mideahvac/.pioenvs/mideahvac/firmware.elf
Building /data/mideahvac/.pioenvs/mideahvac/firmware.bin
Retrieving maximum program size /data/mideahvac/.pioenvs/mideahvac/firmware.elf
Checking size /data/mideahvac/.pioenvs/mideahvac/firmware.elf
RAM:   [=====     ]  45.2% (used 37064 bytes from 81920 bytes)
Flash: [====      ]  40.1% (used 411128 bytes from 1023984 bytes)
Creating BIN file "/data/mideahvac/.pioenvs/mideahvac/firmware.bin" using "/root/.platformio/packages/framework-arduinoespressif8266/bootloaders/eboot/eboot.elf" and "/data/mideahvac/.pioenvs/mideahvac/firmware.elf"
========================= [SUCCESS] Took 8.98 seconds =========================
INFO Successfully compiled program.

I only can’t upload it OTA:

ERROR Error binary size: Error: ESP does not have enough space to store OTA file. Please try flashing a minimal firmware (remove everything except ota)

However, I can download the bin, and then flash it by USB using ESPFlasher

The board I have looks similar, however, if I disconnect the cable to the Wifi module USB port, my indoor unit stops responding to the IR remote. So I dont think you can just solder on a port, the IR receiver is on the PCB with the LED display. The USB port module that I have looks similar to the one @yodi has. I also have the USB A port with the cuts.

@yodi did you have any success yet ?

Here are some pictures:

My system is an Inventor Multisplit with AR2MVI-12WiFi indoor units. The WiFi module that came with it is the EU-OSK103.

@nvschilleman, No sorry I’ve not had time to play with this yet, plan is to setup the serial bridge / uart sniffer from to get a better view of what is being transmitted, but indeed our units looks very similar.

@bartlebi Do you have the wifi board as shown in nvschilleman’s 3rd picture? I think you’ll need that in order to enable wifi…
@nvschilleman The left connector on the wifi board goes to ?? CN3 on the display board ??

@nvschilleman Thanks for your photos. It is strange, and is not clear for me how the IrDA and the Wi-Fi module are related. Am i right that you already had a board for connecting USB devices when you bought it, and after you bought only the Wi-Fi module itself?

I wrote to the service of the air conditioner brand with this question, they replied that simply unsoldering the connector on the board or replacing the display board with one with an indication and a connector will give nothing, since the presence of a wifi is not programmed in the main unit of the air conditioner and it simply will not work …

@yodi Okay! I ordered some ESP-01’s yesterday. When those arrive I’ll also give it a shot and post my progress in this topic.

@aceindy The left connector on the wifi board goes to CN3 on the display board.

@bartlebi, yes it is indeed strange, when I connect the WIFI board the LED on this board stars blinking a few times, also when there is no WIFI module plugged into the USB port of the WIFI board. When it stops blinking my IR remote works again…

What make/model is your air conditioner?

@nvschilleman I have 2 Lessar LS-H09KPA2/LU-H09KPA2.