Midea branded AC’s with ESPhome (no cloud)

Look at this. That’s my implementation. Not very appealing but it’s not visible from outside and I am not touching any internals (hope for retaining warranty). Looks inspirational?

absolutely ! what kind of usb cable did you use ? and why not connect it directly to the motherboard using the uart connector (idk what is called)

Check my previous post for a link to some details what I did. Spoiler alert: I did this cable by myself. You buy USB connector for cable attachment, which comes in pieces, and I just modified the plastic insert to fit the connector.
As I said, I did that because I didn’t want to modify the AC unit. Just unplug USB dongle and stick in mine…

Mine looks like this, i only removed the usb2header


and used a 4 pin header plug including cables which i took from an old pcb.
So i did not modify / solder anything :wink:

1 Like

Well, your setup looks bit different. Notice I have USB socket in separate “case”. Two grey cables goes to the display unit, which one is I believe connected to the outside unit and second is to separate USB module.

Thanks to all the info in this thread i managed to make my own dongle. I’ve made it open source, check it out at Github.

Image

(Sorry, as a newcomer I cannot post images, and only 2 links)


Awesome dude…cheers!!

1 Like

Hi all!
I want to share my experience of dongle building. I used Wemos D1 mini and spent few days trying to make it work. Bad choice, here is information: https://www.element14.com/community/thread/77097/l/wemos-d1r1esp8266-uart-communication
Wemos D1 mini has only one fully-functional UART that is already occupied by USB-to-Serial onboard converter. So I had to use software UART:

uart:
  tx_pin: 5
  rx_pin: 4
  baud_rate: 9600

It works finally.


Logic level shifter: 5PCS 2 Channel /4 Channel IIC I2C Logic Level Converter Bi Directional Module 5V to 3.3V|Integrated Circuits| - AliExpress

8 Likes

@VitalyZ thanks so much for your help. I received my dongle, flashed with ESPHome and got my Midea U working with HA finally!

I’m in the US so I have Home Assistant set to Imperial units. Its a little funky with Fahrenheit because I assume the frontend is converting from everything from Celsius, but its working great.

For anyone out there using Fahrenheit and your display on the unit is stuck on Celsius: I was stuck for a while thinking I’d need to send a command or something from the dongle. It turns out you can switch the display on the device by holding the temperature up and down buttons for a few seconds to switch between °C and °F.

Can confirm that too. Did it with D1 mini and a converter with software UART.
Only thing to note is I had to create the yaml in esphome, upload it to the d1 mini, delete the yaml and recreate it and upload again.
If I didn’t do that, the D1 wouldn’t get a response. Don’t know why, but the double-flash did the trick.

1 Like

@Makis I changed the threads and marked you, so you get notified. :slight_smile:

What is wrong with your unit, something not working?

Since it now seems that the flashed drive works consistently and it’s only whether a particular a/c supports it or not, should we change the first post to a how-to for any newcomer to do it easy?
For eg. use a particular ESP and a particular ttl-uart (I’ve read 1 or 2 didn’t work) or order a readymade one from jlcpcb (or a member that stocks)
Flash it, remove the yaml from esphome, add it again and reflash it (it happened on 2 or 3 members here, me included).
What configuration options can be added for supported features.
I believe it would be a “clean” way for other members to directly go and do the job than searching through all the posts.
And for the supported models, it already has another post which you already referenced.

I have been maintaining the first topic, updating the contents, removing incorrect/outdated info etc…
But I agree i still have to update the parameters….
so…it will be done :+1:t4:

[edit: Done :yum:)

2 Likes

with suipport of additiona sensors Any Support for Midea A/C? - #442 by sergge

s-l500

1 Like

Is “dudanov:midea-climate-support” still the correct string to be put on esp_version that references this doc (with autoconfiguration enabled)

esphome-docs/midea_ac.rst at 2219171d8ea9f52239cf460b1ca90ac2bc923ce9 · dudanov/esphome-docs · GitHub ?

Because when I put that on the esp_version field, the addon doesn’t even start.

No, it isn’t. :slight_smile: This is fully integrated in ESPHome, no need for specific versions anymore. :slight_smile:

Where did you get that? In the first post it is already changed. Could you please point to this, so someone can change it? Thanks. :slight_smile:

Right now you just need to setup ESPHome (standard version) and use the Midea climate component, see here in the ESPHome documentation.

Oh, it’s just that sice this link:

is mentioned on the first post, and since it has more options than the ones present on esphome (like autoconfig, the ability to disable heat mode on units that don’t utilize them or the use of the IR_TSOP on dudanov’s midea dongle), I thought that the esphome documentation was old or not related to this thread. Because I am currently using the config mentiones on esphome, but I wanted to add those extra features.

By the way, you can add this midea unit to the supported list:

Manufacturer: Midea
Model ID: MAS12C1BFH
Year: 2018
Market: MX

!

Done! :slight_smile:

What you’re experiencing here, is that the link you posted is the development branch of Dudanov. He is the code owner of the ESPHome-Midea-Climate-Component. That means, what you see there, is what you get with one of the next releases from ESPHome (standard version).

Stick with the ESPHome version and just wait until these changes come up in ESPHome. If you want to be ahead, use the ESPHome-dev-branch, not Dudanovs. It would be a nightmare to support all these different versions. :wink:

Dudanov is kind enough to provide some special versions for specific problems or use cases that have come up, that would be a reason to use one these specific versions from his repository. Use these if Dudanov asks you to do so for testing purposes. :slight_smile: Otherwise, as I said, I highly recommend to stick with the ESPHome standard or dev branches/versions.

1 Like

Hallo, I,m trying to integrate a Carrier 42qhg009d8s who mounts a 16022000020169 logic board, shared by some other supported ACs, but I’m having some troubles generating the ESPhome configuration file below

esphome:
  name: midea-disimpegno
  platform: ESP8266
  board: d1_mini

# Enable logging
logger:
  baud_rate: 0

captive_portal:
# Enable Home Assistant API
api:

ota:
  password: "flying"

wifi:
  ssid: "foo"
  password: "bar"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Midea-Disimpegno"
    password: ""


# UART settings for Midea dongle (required)
uart:
  tx_pin: 1
  rx_pin: 3
  baud_rate: 9600
  
# Optional (if you want modify settings)
midea_dongle:
  strength_icon: true 

# Main settings
climate:
  - platform: midea_ac
    name: Condizionatore Disimpegno    # Use a unique name.
    beeper: true                # Beep on commands.
    visual:                     # Optional. Example of visual settings override.
    autoconf: true              # Autoconfigure most options.
      min_temperature: 16 °C    # min: 16b
      max_temperature: 30 °C    # max: 30
      temperature_step: 0.5 °C  # min: 0.5
    outdoor_temperature:  # Optional. Create outdoor unit temperature sensor (may display incorrect values after long inactivity).
      name: Temperatura Unità Esterna
    power_usage:                # Optional. Power usage sensor (only for devices that support this feature).
      name: Consumo Condizionatore Disimpegno 
    humidity_setpoint:          # Optional. Indoor humidity sensor (only for devices that support this feature).
      name: Umidità Condizionatore Disimpegno


because

    autoconf: true              # Autoconfigure most options.

causes this error/warning

INFO Reading configuration /config/esphome/midea-disimpegno.yaml...
Failed config

climate.midea_ac: [source /config/esphome/midea-disimpegno.yaml:39]
  platform: midea_ac
  name: condizionatore disimpegno
  beeper: True
  visual: 
    min_temperature: 16 °C
    max_temperature: 30 °C
    temperature_step: 0.5 °C
  
  [autoconf] is an invalid option for [climate.midea_ac]. Please check the indentation.
  autoconf: True [source /config/esphome/midea-disimpegno.yaml:46]
  outdoor_temperature: 
    name: Temperatura Unità esterna
  power_usage: 
    name: Consumo Condizionatore Disimpegno
  humidity_setpoint: 
    name: Umidità condizionatore Disimpegno

preventing the building.

Also removing

    autoconf: true              # Autoconfigure most options.

and adding

    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.

also causates and error

INFO Reading configuration /config/esphome/midea-disimpegno.yaml...
Failed config

climate.midea_ac: [source /config/esphome/midea-disimpegno.yaml:39]
  platform: midea_ac
  name: condizionatore disimpegno
  beeper: True
  visual: 
    min_temperature: 16 °C
    max_temperature: 30 °C
    temperature_step: 0.5 °C
  
  [supported_modes] is an invalid option for [climate.midea_ac]. Please check the indentation.
  supported_modes:  [source /config/esphome/midea-disimpegno.yaml:47]
    - FAN_ONLY
    - HEAT_COOL
    - COOL
    - HEAT
    - DRY
  custom_fan_modes: 
    - SILENT
    - TURBO
  
  [supported_presets] is an invalid option for [climate.midea_ac]. Did you mean [custom_presets]?
  supported_presets:  [source /config/esphome/midea-disimpegno.yaml:56]
    - ECO
    - BOOST
    - SLEEP
  custom_presets: 
    - FREEZE_PROTECTION
  
  [supported_swing_modes] is an invalid option for [climate.midea_ac]. Please check the indentation.
  supported_swing_modes:  [source /config/esphome/midea-disimpegno.yaml:62]
    - VERTICAL
    - HORIZONTAL
    - BOTH
  outdoor_temperature: 
    name: Temperatura Unità esterna
  power_usage: 
    name: Consumo Condizionatore Disimpegno
  humidity_setpoint: 
    name: Umidità condizionatore Disimpegno

I’m sure that I’m drowning in an inch of water, but I hope you can forgive me and helping to get out of the puddle :smile: