Midea branded AC’s with ESPhome (no cloud)

Oh no, Sergey’s github profile says he’s in the hospital with covid! I wish him good luck and a speedy recovery.

Of course that means there’s nobody to fix this problem.
I have seen some UART issues mentioned on discord. Could be those are related and will get our issue fixed.

I updated Github comments. IR integration in midea component makes boo boo. I disabled it, and used old IR commands (which works independently from midea component) and whole thing works again now. Except missing sweet, sweet FollowMe function :frowning:

2021.12.0-dev fixes my problem.

Wondering if anyone can clarify as after reading all of this thread and a few others it still isn’t clear to me the following points:

  1. do you need an already WIFI capable unit for this mod? If so why?
  2. connecting an ESP device directly to the board headers CN2/CN3 is possible? even if there are no headers (I’ve tried and the board no longer responds when TX/RX wires are connected to ESP).
  3. what are the options if you do not have a WIFI device?

I have this Danby unit: DAS180DBAHWDB | Danby 18,000 BTU Mini-Split Air Conditioner with dual Air Handlers; Heat pump and variable speed inverter | EN-US

and it has a display board that looks very similar to others on here - if anyone would be able to help me understand if I’m wasting my time here or not. Thanks!



2 Likes

That board looks very much like @nvschilleman ’s in this response

But he is also talking about a wifi module and not working IR when disconnected???

maybe he can sched some light on this?

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?