Midea branded AC’s with ESPhome (no cloud)


Are these one and the same unit?

As said before:

So delete the Midea-ac-4 6861, and hopefully the midea-ac will come online…

I also took the liberty to clean up your yaml; you either use autoconf: true OR you specify the optional configurations:

substitutions:
  node_name: midea-ac
  node_id: midea_ac
  friendly_node_name: "Midea AC"

esphome:
  name: ${node_name}
  comment: ${friendly_node_name}
  platform: ESP8266
  board: esp12e

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.1.34
    gateway: 192.168.1.1
    subnet: 255.255.255.0
  ap:
    ssid: "AC-wifi"
    password: "slwf01pro"

captive_portal:

logger:
  baud_rate: 0

ota:

web_server:
  port: 80

api:

uart:
  tx_pin: 1
  rx_pin: 3
  baud_rate: 9600

climate:
  - platform: midea
    name: ${friendly_node_name} Climate         # Use a unique name.
    id: ${node_id}_climate
    period: 1s                  # Optional
    timeout: 2s                 # Optional
    num_attempts: 3             # Optional
    autoconf: true              # Autoconfigure most options.
#    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                # This capability is always used.
#      - HEAT_COOL
#      - COOL
#      - HEAT
#      - DRY
#    custom_fan_modes:
#      - SILENT
#      - TURBO
#    supported_presets:          # All capabilities in this section detected by autoconf.
#      - ECO
#      - BOOST
#      - SLEEP                   # This capability is always used.
#    custom_presets:             # All capabilities in this section detected by autoconf.
#      - FREEZE_PROTECTION
#    supported_swing_modes:
#      - VERTICAL                # This capability is always used.
#      - HORIZONTAL
#      - BOTH
#    power_usage:                # Optional. Outdoor temperature sensor (may display incorrect values after long inactivity).
#      name: "${friendly_node_name} Power Usage" 
#      id: ${node_id}_power_usage
#    outdoor_temperature:        # Optional. Power usage sensor (only for devices that support this feature).
#      name: "${friendly_node_name} Outdoor Temperature"
#      id: ${node_id}_outdoor_temperature
#    humidity_setpoint:          # Optional. Indoor humidity sensor (only for devices that support this feature).
#      name: "${friendly_node_name} Humidity"
  
switch:
  - platform: template
    name: ${friendly_node_name} Beeper
    icon: mdi:volume-source
    restore_state: true
    optimistic: true
    turn_on_action:
      midea_ac.beeper_on:
    turn_off_action:
      midea_ac.beeper_off:
      
binary_sensor:
  - platform: status
    name: ${friendly_node_name} Connection Status
    id: ${node_id}_connection_status

text_sensor:
  - platform: template
    name: Uptime Human Readable
    id: uptime_human
    icon: mdi:clock-start

  - platform: version
    name: ${friendly_node_name} ESPHome Version
    id: ${node_id}_esphome_version    

  - platform: wifi_info
    ip_address:
      name: ${friendly_node_name} IP Address
      id: ${node_id}_ip_address
      icon: mdi:ip-network

sensor:
  - platform: uptime
    name: Uptime Sensor
    id: uptime_sensor
    update_interval: 60s
    on_raw_value:
      then:
        - text_sensor.template.publish:
            id: uptime_human
            state: !lambda |-
              int seconds = round(id(uptime_sensor).raw_state);
              int days = seconds / (24 * 3600);
              seconds = seconds % (24 * 3600);
              int hours = seconds / 3600;
              seconds = seconds % 3600;
              int minutes = seconds /  60;
              seconds = seconds % 60;
              return (
                (days ? to_string(days) + "d " : "") +
                (hours ? to_string(hours) + "h " : "") +
                (minutes ? to_string(minutes) + "m " : "") +
                (to_string(seconds) + "s")
              ).c_str();

  - platform: wifi_signal
    name: ${friendly_node_name} WiFi Signal
    id: ${node_id}_wifi_signal
    update_interval: 60s

button:
  - platform: restart
    name: ${friendly_node_name} Restart
    id: ${node_id}_restart
    icon: "mdi:restart"
  - platform: shutdown
    name: ${friendly_node_name} Shutdown
    id: ${node_id}_shutdown
  - platform: safe_mode
    name: ${friendly_node_name} Restart (Safe Mode)"
    id: ${node_id}_safe_mode

2 Likes

Hi All,
I have an Airfel LRX/LTXN35UV1B, it is a Midea brand or licensed from Midea.
I installed esphome in my home assistant and configured a Midea component.
Unfortunatelly it doesn’t seems to working. I always get a response timeout error (transmission is working but there is no response)
I tried some config for rx and tx (1-3; 3-1; 2-3; 3-2, RX-TX; TX-RX) but without success.
The hardware looks like as same in this thread. I programmed a nodemcu.



I connected the nodemcu with an usb cable and a delock usb to pin header adapter to the climate.

Do you have any advice how can I go further?

Thanks!

I’ve heard several people suffering from a defective level shifter…tried another one?

You can quite easily check tx/rx if you connect tx to rx (so it will read/echo it’s own data)

Thx! This “echo” thing is a good point. As I checked the possibilities I found out that the installing of a new yaml not working somehow. So first I have to go deeper into this esphome…
(As far as I understand, the level shifter is not relevant for me because I’m using a nodemcu through usb where 5V is default - but maybe I’m wrong)
So back to start line, I will inform you of something new occures…

Unfortunately you are wrong, at least for most nodemcu dev boards.

The level shifter has nothing to do with the board itself. The board can be powered by 5V via USB. But what we need here is something different. The signals that get send to and from the AC unit are digital signals, but totally independent from the board voltage. They need a specific voltage, and that is what we are looking for here.

So you have 5V to power the dev board, but the signals are only sent in 3.3V, so long story short, you need a level shifter with the usual nodemcu dev boards. You can look it up within the datasheet of the board, you should get that from the seller. It is called “logic level voltage”, at least that’s what they call it with my seller. :slight_smile:

1 Like

If I could expand even further for @petikeje, because I’ve seen this a lot on the forum: The emphasis is on powered by 5V, which isn’t the same as the voltage used. It’s only 5V, because it’s a common source voltage (like USB). The ESP board converts this regardless to 3.3V to power the ESP chip. 3.3V is the voltage used for TTL (transistor-transistor logic). If you have a laptop, you plug it into your wall socket (which is one of 110V, 220V, 240V or something like that, depending on where you are located), but you have that big power adaptor, because the laptop doesn’t actually run on that voltage (side-note: more complex computers use a number of different voltages internally for different parts). So, don’t be caught out by where you plug it in. You need to consider the voltages used on the pins.

1 Like

Thx @paddy0174 and @parautenbach for clarifying! For testing I’m using the following board:


And it is connected to the AC unit with a delock usb to pin header adapter and a micro usb cable (to the board micro usb socket):

I have already ordered the following to the final solution:

(Esp adapter with esp01)
Could you please give an advice if I need further board to test the unit with the nodemcu above?
Could you please check if the ordered boards are proper for this project?
Thanks in advance!

hmmm…that won’t work…
Did you all the posts in the topic?

Yeah thx! I went through the thread again and found an other post with the same board: Support for Midea A/C - #143 by BakaMonogatari
Now its clear that I need further hw.
I would like only ask a quick confirmation if the following are fit for this project:
Esp8266 Esp-01 Serial Wifi Wireless Adapter Module 3.3v 5v Esp01 Breakout Pcb Adapters Compatible For Arduino - Integrated Circuits - AliExpress
THX!

Yeah, that works, i have two AC’s on that configuration :wink:

PS, he did get that NodeMCU to work, turned out his level shifter was faulty :wink:

Hi ppl,

I bought CH340G USB TTL converter and ESP8266 ESP-12F module and I don’t know how to flash the damn thing. On USB TTL converter page it says that 5V, VCC and 3V3 are jumpers that select the voltage level of the logic on the Rx and Tx lines. So because ESP8266 ESP-12F module needs 5V, I connected 5V and VCC with a jumper. I connected Tx on Rx, Rx on Tx and GND to GND from converter to ESP module, but what should I connect to VCC pin on ESP module? External 5V?

I also don’t know if I have to do something special to enter flashing mode in ESP module?

see first topic image

Btw, you still need a level shifter….although…it looks like the esp12 has an adapter with level shifter…please check specs…

regarding setting it i to program mode…sorry, don’t know (don’t have any esp12’s yet)

according docs:
power-on while GPIO0 is held low

1 Like


I connected everything like on your picture but still nothing. Rx diode on converter is constantly turned on and the flasher says that COM port could not be opened. If I just for the fun of it rotate Tx and Rx, then Tx is blinking on converter when trying to flash, but I get error ESP Chip Auto-Detection failed.
What should I try next?

Only thing i can find is that gpio0 should be connected to ground during power up, so the esp12 will start up in flash mode…

on my level shifter i did that with the orange wire, not sure what the pinout is of J2 for esp12

Hi,
The new esp01 and the level shifter have arrived. I flashed it and tried out, but not seems to work.
If I put the esp01 and the level shifter together and connect it to the AC unit with dupont cables nothing happens (the led on the esp01 not lighting). I think I connected the right pins because I measured it with a multimeter.
If I put the esp01 and the level shifter together and connect the level shifter to a cp2102 and I connect the cp2102 usb to the AC unit with a delock usb to pin header cable, the esp01 boots up, but I always get the timeout no response message in the log, no matters the rx/tx connection.
Then I accidentaly cooked the esp01…
I ordered 2 more esp01, level shifters and a ch340g adapter. I still have an esp01, so trying to find out a correct connection method…

Finally I have managed it to work! Thanks for your help!

@petikeje So what was the solution in the end?

Finally it was easy based on the first post and second picture. I followed the colors of the cables… (I had to change the tx and rx)
Could you please give some hints, how I can put the esp01 with an ir led together.

Hello guys

i need help

will this dongle work with my dolceclima air pro 14 hp?

If i google “Olimpia dolceclima air pro 14 hp“, i found it supports wifi and uses the app ‘OS Comfort’, which inclines it will work.

Do you know the wifi dongle it uses?
If it is a OSK-103 or OSK-105 i’m quite sure it will work :wink:

1 Like