Midea branded AC’s with ESPhome (no cloud)

Somewhere in here there’s a post from someone that asked the manufacturer the same question and received the response that if the unit is not wifi-capable, the necessary firmware code is not present. Connecting to the right points won’t do any good if there’s no code to do the talking.

yes it seems like the boards are aren’t WIFI supported really don’t have much info out there.

Correct, however I’m wondering if anyone managed to just control the board directly with an ESP, and not bother with the whole mfg. WIFI thing.

It’s a shame that even though the AC units themselves (and the boards inside) are similar, plenty of things just don’t work (including IR comms using the Midea IR library).

Would be nice to be able to automate my new mini-split system :slight_smile:

1 Like

I have been following this discussion for month, reading every bit to make sure I never missed anything. Just had a chance to realize it to the actual work on my midea unit last weekend with the basic code. Not working at first, but got it worked after swapping the TX and RX line. Thank to all whose contributed to this discussion. Double thumbs up to you guys. Here is what I have.

esphome:
  name: media-aircon
  platform: ESP8266
  board: esp01_1m

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:

ota:
  password: "myotapassword"

wifi:
  ssid: "mySSID"
  password: "mySSIDpassword"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "myAPSSID"
    password: "myAPpassword"

captive_portal:

uart:
  tx_pin: 1
  rx_pin: 3
  baud_rate: 9600

climate:
  - platform: midea
    name: "Midea AC"
    beeper: true

However, I realized there is a missing supported mode, which is AUTO. I tried to add ‘AUTO’ as one of the supported_mode, but the esphome reluctant to compile the code and reported it as an unknown value. Below is what I have added.

    supported_modes:    # All capabilities in this section detected by autoconf.
      - AUTO
      - FAN_ONLY
      - HEAT_COOL
      - COOL
      - HEAT
      - DRY

I’ve checked on the climate_mode.cpp and found that the CLIMATE_MODE_AUTO should be supported. Am I missing something?

const LogString *climate_mode_to_string(ClimateMode mode) {
  switch (mode) {
    case CLIMATE_MODE_OFF:
      return LOG_STR("OFF");
    case CLIMATE_MODE_HEAT_COOL:
      return LOG_STR("HEAT_COOL");
    case CLIMATE_MODE_AUTO:
      return LOG_STR("AUTO");
    case CLIMATE_MODE_COOL:
      return LOG_STR("COOL");
    case CLIMATE_MODE_HEAT:
      return LOG_STR("HEAT");
    case CLIMATE_MODE_FAN_ONLY:
      return LOG_STR("FAN_ONLY");
    case CLIMATE_MODE_DRY:
      return LOG_STR("DRY");
    default:
      return LOG_STR("UNKNOWN");
  }
}

Have you tried:

    autoconf: true              # Autoconfigure most options.

??
(part of climate section)

perhaps, that is something that I missed… what a shame…

Some models report the auto mode as HEAT_COOL, so adding that to your configuration might do the trick :wink:

@NOTORIOUSVR on WIFI enabled models there is a separate board connected to CN3, this board contains the actual UART bus which is required for the ESPHome component to work. To get this to work the only viable option seems to be to replace the indoor unit PCB and display PCB for wifi enabled ones.

Are you located in Europe? I am an ref technician and official parts supplier for Midea, so I might be able to help out with getting a Wifi enabled set of PCBs.

Another option would be control over IR, less elegant of course.

2 Likes

Thanks for your feedback @nvschilleman !!

Thank you very much for your post - it confirms what I was able to suspect reading this thread however wanted some confirmation regarding it all.

I’m actually totally ok with IR control at this stage as long as I can get it to work correctly which isn’t the case right now (I will tinker and try your suggestion however), not sure the costs would be worth it to invest in this system - I am in Canada actually as well, but thank you for the offer!

@NOTORIOUSVR I can highly recommend
SmartIR
I used it for my other ‘dumb’ AC

It is a little work when your AC isn’t in the list of known models, but if it does, it is almost plug and play :grin:

Awesome! Thanks for the tip - I’ll give this a shot for sure!

Cheers

Just learnt something today… If I have a missing mode, just show the log screen and play around with the remote control… i can see the missing mode being added in… This is super cool… And the AUTO is shown as HEAT_COOL as mentioned by nvschilleman… thanks mate…

1 Like

I have a simple, stupid question.

I just ordered the Universal IoT Dongle, TX/RX position: Midea-like (TX/RX: 3/2) Connector: USB-TypeA. I have a Pioneer, that appears to be a Midea. I am confused about the flashing. I have tried scrolling through the comments here, but there are so many, that I am finding myself lost in the search.

The instructions, under the hardware section, indicate one would need to flash, using an adapter, “even though it uses an USB connector.” If I ordered the device, I would not need to flash it, right? But, how would the ESP device get the WiFi network config to work with ESPHOME?

Thanks for the help

I’m afraid you need to flash it. This stick is not a real usb device. A physical connector from usb, in which only the power pins match, so inserting it into a computer port will not damage it. But the two middle pins are the serial interface UART with a TTL level of 5v. For programming, you need a usb-uart converter and a usb connector to insert a stick into it. There are two buttons on the stick,
which are used to put the esp8266 chip into programming mode. In principle, it is enough to flash the Esphome firmware once, then you can use the OTA for good.


Credit goes to Sergey Dudanov, who sent me this via email.

There are also 2 types of ESP8266’s; the ones with and the ones without mini-usb.
The latter you can program through this mini-usb port (which mounts as a serial port on the PC), for the other one you require an uart2serial converter (the one I used to flash my esp01)

Hi,

I have a bit older Midea unit that I would like to control using UART.
So far I made it work using IR LED transmission with BJT transistor to amplify signal from WeMos D1 Mini, but the drawback is that it’s not reliable during very bright and sunshine days. I could pump more power but… UART seems to be much elegant option.
I’ve try to read a good amount of the posts here, but still struggling with understanding of connector on AC side.

Here is my Midea AC model:

Here is how display board looks like:

Here I zoomed in end part of the board where 5pin connector CN2 is placed.

Can I use CN2 for this?
I don’t know if I miss it somewhere in posts, but why 5pins are here?
Need to measure, but as far I saw from posts seems like starting from left side I should have 5V and GND then have 3 pins to deal and find Tx and Rx right?

I think what @nvschilleman said applies here, your unit needs to be wifi-ready.

Ok, thnx, so if I understand correctly, this will not work. AC needs to have PCBs that supports WiFi module which actually have UART connection, that is the only way.

How about if I try to inject packages I am sending from my WeMos D1 mini IR transmitter on the rail/pin of AC IR Remote receiver (so directly on data pin of IR1 on the board from my 3rd image)?

I’ve seen others do it:


Seems there is some more info on Dudanov’s IOT dongle, which uses similar:
image

3 Likes

So if I am understanding correctly Dudanov’s schematic following requirements needs to be fulfilled:

  • ESP GPIO pin should be wired to AC IR receivers signal pin by logic inverter.
  • sent data shouldn’t be modulated with 38kHz.

Anyone knows why bits are inverted?

1 Like

@wbarber69 You either need to connect an IR transmitter, or hard wire it (as discussed in the post above)