Support for Midea A/C

Tags: #<Tag:0x00007f32654a7330> #<Tag:0x00007f32654a7038>

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)

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)
image

PS:If I understood Rene Klootwijk correctly, you can order them pre-assembled, have a look here

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


example of my mideahvac.yaml:

# Example configuration entry

esphome:
  name: mideahvac
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "mywifissid"
  password: "mywifipassword!"

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

captive_portal:
# Enable Home Assistant API
api:

ota:

# Disable logging over UART
logger:
  baud_rate: 0

uart:
  tx_pin: 1
  rx_pin: 3
  baud_rate: 9600

midea_dongle:

midea_ac:
  name: "Midea AC"
  beeper: true

Unfortunately, the MideaAC pull request still did not make it into the main git repository, but the ESPHome add-on can actually use a custom repository:

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.

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)

OTA still don’t work for me, as the image is too big for my ESP01; but maybe it would if I use an empty one. Ofc you can also compile it on HA, and then download and flash it over ser2usb, But I ended up compiling the bins on W10 and flash it over the serial com-port.

Below my command lines used to compile:

cd c:\workshop\esphome

pip install esphome
pip install esphomeflasher
pip install --upgrade git+https://github.com/dudanov/[email protected]

esphome mideahvac.yaml wizard
esphome mideahvac.yaml compile

esphomeflasher

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

image
Assuming you already installed python :wink:

Required hardware:
1x


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)

More info here:
https://easyeda.com/aceindy/midea-open-dongle


3 Likes

Hi,

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.

@aceindy
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.

image

It also looks like there are some additional logic compared to the image as seen here: https://github.com/dudanov/midea-open-dongle

Updated:

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 Hass.io) 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!

@yodi
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:

@bartlebi
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?

@all
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:https://community.home-assistant.io/uploads/short-url/c6Vw2OecR8AGWCaxo79ESYhcCn2.jpeg
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 > https://twitter.com/PlatformIO_Org
- star it on GitHub > https://github.com/platformio/platformio
- try PlatformIO IDE for embedded development > https://platformio.org/platformio-ide
********************************************************************************

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
PACKAGES: 
 - 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 https://github.com/reneklootwijk 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.