Midea branded AC’s with ESPhome (no cloud)

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)

The guy that makes them will flash them so that you can easily add them to your esphome like any other esp32 or 8266 device. Once powered on it will act as a hotspot that you join and then you can set it up to connect to your network. Once it’s online you use the esphome interface to flash them ota.

You are not the first to ask…but on THIS thread…

According latest info, some models apparently have a toggle available on the UART, but then HA still doesn’t know the state, rendering it useless.
This is one of the reasons Dudanov added support for a IR transmitter to his dongle, as it seems the display ON/OFF signal doesn’t seems to be available on all models, and on some it is available, but just a toggle…

(Can we clean up the other thread please…?)

Yes I’m looking for the way to add the toggle to my hass. My unit can do all of this over uart. In fact the remote is basically useless . It is a generic mini-split remote and most of its functions don’t even work on the unit it came with. I can turn the led off with the remote. And it should stay that way. But for some reason and there’s no consistency to it. The leds come back on all by themselves. Sometimes multiple times a day and sometimes not for weeks. But the strange thing is when they do come back on, they come back on for every unit I own, and they do so at exactly the same time. Also it even happens after I removed the cloud dongles and only use the iot dongles. I wonder if they are set to reset their state for some reason. But it’s strange that it’s not an isolated incident between units. You’d think they’d simply stay off if turned off or come back only during a power outage or some other significant reason. But I’ve been here when it happens. And sometimes it’ll happen multiple times in the same hour sometimes I’ll turn them off and they come right back on. Sometimes they stay off for long periods of time. It’s just really weird. But having them on at night is not something I recommend if you have one in your bedroom and try to sleep. I guess I could build a toggle using my harmony hubs and make it an ir command. I really don’t want to solder anything to my hvacs while they are still under warranty.

ESPHome documentation → midea_ac.display_toggle Action
This action toggle ac screen. Works via UART if supported or Remote Transmitter.

on_...:
  then:
    - midea_ac.display_toggle:

or

switch:
  - platform: template
    name: Display Toggle
    icon: mdi:theme-light-dark
    turn_on_action:
      midea_ac.display_toggle:

And when you can’t get it to work over uart, then Dudanov’s IOT dongle also supports an IR LED, which you can mount close to the IR receiver, that would also solve your issue I guess…

# When using IR signals
remote_transmitter:
  pin: GPIO13                       # For iot-uni-stick.
  carrier_duty_percent: 50%        # 50% for IR LED, 100% for direct connect to TSOP IR receiver output.

# template momentary switches for sending display control command actions
switch:
  - platform: template
    name: Display Toggle
    icon: mdi:theme-light-dark
    turn_on_action:
      midea_ac.display_toggle:

@wbarber69 Can we now clean up the thread of supported models ??

1 Like

I think @aceindy is right here. As far as I know only units with a CN3 connector on the display board have the UART bus onboard.
You should be able to power a WeMos from the CN2 connector though.

Where is “esphome_version” field? I see only “keyfile” and “relative_url” on my ESPHome plugin.

You can find the version on the webserver (if enabled) of the esphome unit:

or you can check the logs from within the esphome addon:

[21:37:53][I][app:099]: ESPHome version 2021.11.3 compiled on Nov 28 2021, 21:53:13

Anybody had experience with A010268-V1.1 boards? It’s used on many chinese AC like TLC, Philco, Zephir and more. The wifi port is located on the main board, I tried to connet a Wemos D1 but I have no response. The board is this:

I have the exact same part number on mine. Mine is a Pioneer WS009GMFI17HLD. Did you wind up getting this to work? I bought the device by Sergey Dudanov.

Yes it works great with the latest firmware :slight_smile:

from scanning through the related topics it seems at least @paddy0174 and @aceindy seem to have an Olimpia Splendid (probably either bought from the german shop selling it under their own brand and mistyping Nexya without a ‘y’) :upside_down_face:

right?

could any of you tell me what is possible in terms of controlling the power of these units via this component? i’m considering buying one for using surplus PV output (just ~450W max) so it would be interesting to know if it’s possible to control how much energy is consumed with automations from within HA.

tia.

After I’ve managed to get my AC working with an ESP-01 and an Adapter (picture) last summer … (I haven’t updated ESPhome since then, because of some breaking changes to the climate component )

I wanted to upgrade to an ESP32 … however, this does not seem work…

Im not even sure how to wire it in the first place … Theoretically the ESP32 does support 5v logic, so do I even need a converter?! if so, how do I wire it correctly … should I be able to use the same as for the ESP-01?

This setup does not work … (ignore if the RX/TX wires are wrong - I tried both ways)

So, right now, the only things that are different between the ESP-01 and the ESP32 are the ESPhome version (with the correct YAMLs)

esphome:
  name: ac01-test
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_pass

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Klimaanlage Wohnzimmer Hotspot"
    password: "53416ef6123"
web_server:
  port: 80
  auth:
    username: admin
    password: !secret web_server_pass

captive_portal:
# Enable Home Assistant API
api:
  password: !secret api_ota_pass

ota:
  password: !secret api_ota_pass

# Disable logging over UART
logger:
  baud_rate: 0

uart:
  tx_pin: 1
  rx_pin: 3
  baud_rate: 9600

midea_dongle:
  strength_icon: true

climate:
  - platform: midea_ac
    name: "Klimaanlage Oben"
    visual:
      min_temperature: 17 °C
      max_temperature: 30 °C
      temperature_step: 1 °C
    beeper: true
    outdoor_temperature:
      name: "Klimaanlage Außen Temp"

and

esphome:
  name: esphome-web-9dc92c

esp32:
  board: esp32dev
  framework:
    type: arduino

substitutions:
  device_name: "ESP32-AC-01"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_pass

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "${device_name} wifi"
    password: !secret wifi_ap_pass
  
web_server:
  port: 80
  auth:
    username: admin
    password: !secret web_server_pass

# Enable Home Assistant API
api:
  password: !secret api_ota_pass

ota:
  password: !secret api_ota_pass

captive_portal:

# Enable logging
logger:
  baud_rate: 0

uart:
  tx_pin: 1
  rx_pin: 3
  baud_rate: 9600

climate:
  - platform: midea
    name: Midea Climate         # Use a unique name.
    autoconf: true              # Autoconfigure most options.
    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: 1 °C  # min: 0.5
    outdoor_temperature:        # Optional. Outdoor temperature sensor (may display incorrect values after long inactivity).
      name: Temp

No matter what I change in the yaml and what way I connect it to the AC, the logger shows this:

EDIT:
WELL … literally the only thing I haven’t tried over the past couple of days trying to get it to work was the problem in the end … the logic levelshifter is defective … :woman_facepalming:

2 Likes

Hi @Farnsworth I have exactly the same problem from few days. I soldered TTL converter to wemos mini and I have the same logs with
“response timeout” I have tried the ESP without Level shifter but I suspect the same behavior.
I will change to the new one.

Yeah, try that … I used a brand new level shifter, so it was the last thing I suspected…

Also, I did connect it a bit differently than in my picture. I do not use the 3.3V output to the ESP32, but directly connect it to 5V. No idea if that makes a difference, but all devices I eventually hooked up run on 5V, so it made wiring easier.

1 Like