Midea branded AC’s with ESPhome (no cloud)

I finally got my dongle, but I realized my AC unit’s USB port has a “keyed” edge which prevents the ESP unit from going in. I would have to cut the plastic on either end to make it fit. Did you have to do anything special to yours? Mine is a Senville AC

Yes I had this issue as well, I just used a very small chisel to mimic the notch and kind of forced it in… not an elegant solution but it works.

1 Like

The XYE connections are for communication between the (internal) heatpump unit and the remote controller. The H1 and H2 ports are used to connect your ESPhome board. See also my page with info about the connection and a config for the modbus registers: GitHub - Mosibi/Midea-heat-pump-ESPHome

I just guessed commands starting with 0xC0. There is a bunch of undocumented commands (and responses) it seems. Would be great to map it out properly.

You my friend are a genius! You solved my 3 year old problem with 1 picture.

edit: on a whim, I unplugged it and plugged it back in and it’s working now. I did try killing power before and that didn’t work. I think it was not plugged in all of the way…

Brand: MRCOOL
Model ID: DIY-24-HP-WMAH-230C25
Year: 2022
Market: US

It is not working currently. My esp is getting power from the mini-split and is connecting to my home assistant server. But, it’s not able to communicate with the mini-split. The ESPHome log for the device looks like the following in an infinite loop:

21:25:49	[D]	[ApplianceBase:139]	

Response timeout...

21:25:49	[D]	[ApplianceBase:154]	

Destroying the request...

21:25:49	[D]	[AirConditioner:178]	

Enqueuing a GET_STATUS(0x41) request...

21:25:49	[D]	[ApplianceBase:173]	

Enqueuing the request...

21:25:49	[D]	[ApplianceBase:075]	

Getting and sending a request from the queue...

21:25:50	[D]	[ApplianceBase:162]	

TX: AA 21 AC 8D 00 00 00 00 00 03 41 81 00 FF 03 FF 00 02 00 00 00 00 00 00 00 00 00 00 00 00 03 E9 42 B0 

21:25:51	[D]	[ApplianceBase:139]	

Response timeout...

21:25:51	[D]	[ApplianceBase:146]	

Sending request again. Attempts left: 2...

21:25:51	[D]	[ApplianceBase:162]	

TX: AA 21 AC 8D 00 00 00 00 00 03 41 81 00 FF 03 FF 00 02 00 00 00 00 00 00 00 00 00 00 00 00 03 E9 42 B0 

21:25:53	[D]	[ApplianceBase:139]	

Response timeout...

21:25:53	[D]	[ApplianceBase:146]	

Sending request again. Attempts left: 1...

21:25:53	[D]	[ApplianceBase:162]	

TX: AA 21 AC 8D 00 00 00 00 00 03 41 81 00 FF 03 FF 00 02 00 00 00 00 00 00 00 00 00 00 00 00 03 E9 42 B0 

21:25:55	[D]	[ApplianceBase:139]	

Response timeout...

21:25:55	[D]	[ApplianceBase:154]	

Destroying the request...

21:25:55	[D]	[AirConditioner:178]	

Enqueuing a GET_STATUS(0x41) request...

21:25:55	[D]	[ApplianceBase:173]	

Enqueuing the request...

21:25:55	[D]	[ApplianceBase:075]	

Getting and sending a request from the queue...

21:25:56	[D]	[ApplianceBase:162]	

TX: AA 21 AC 8D 00 00 00 00 00 03 41 81 00 FF 03 FF 00 02 00 00 00 00 00 00 00 00 00 00 00 00 03 EA A0 51 

21:25:57	[D]	[ApplianceBase:139]	

Response timeout...

21:25:57	[D]	[ApplianceBase:146]	

Sending request again. Attempts left: 2...

21:25:57	[D]	[ApplianceBase:162]	

TX: AA 21 AC 8D 00 00 00 00 00 03 41 81 00 FF 03 FF 00 02 00 00 00 00 00 00 00 00 00 00 00 00 03 EA A0 51 

21:25:58	[D]	[AirConditioner:132]	

Enqueuing a GET_POWERUSAGE(0x41) request...

21:25:58	[D]	[ApplianceBase:173]	

Enqueuing the request...

The yaml configuration looks like this:

esphome:
  name: garage-mini-split
  platform: ESP8266
  board: esp12e

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Garage-Mini-Split"
    password: "REDACTED"

captive_portal:

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:
  encryption:
    key: "REDACTED"

ota:
  password: "REDACTED"

uart:
  tx_pin: 1
  rx_pin: 3
  baud_rate: 9600
  
  
climate:
  - platform: midea
    name: Garage Mini Split     # Use a unique name.
    period: 1s                  # Optional
    timeout: 2s                 # Optional
    num_attempts: 3             # Optional
    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: 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
    outdoor_temperature:        # Optional. Outdoor temperature sensor (may display incorrect values after long inactivity).
      name: Temp
    power_usage:                # Optional. Power usage sensor (only for devices that support this feature).
      name: Power
    humidity_setpoint:          # Optional. Indoor humidity sensor (only for devices that support this feature).
      name: Humidity


web_server:
  port: 80

I have a feeling that since it’s a new model then the confirmed to work ones on this list; they might have blocked this or something… Another thing that may be of note, is that I used the dongle that came with it at first. So, maybe it received a firmware update if it would have even worked in the first place.

What kind of connector you use?
If seen several cases where the connection is just bad (or the converter, or esp module)

  • is it possible to hardwire it (f.e. soldering)
  • did you try with another converter?
  • can you try another esp module?

If you are replying to me then I solved it by making sure the USB was in all of the way. It was plugged in enough to get power but not the data pins. It’s working now! :slight_smile:

1 Like

@Trevo525 Right, wasn’t sure as the ‘edited’ was on top…good job!!

Hi,

I have connected the svenar heatpump controller and have the values in HA. Great!

But is it possible to share your home assistant config, the dashboard etc.?

Thanks,
Jan

1 Like

Hi Jan,

I don’t have a dashboard with only the information from the heatpump, I have it combined with information from the Shelly devices that we use to monitor the power usage of the internal and external unit.

I can of course sent you that dashboard, but then you will have a lot of stuff that does not work. If I have time this weekend, I can create a clean one, with only the heatpump metrics.

Hi,

The stuff that doesnt work i can strip out, don’t want you spend your weekend doing stuff you already done :wink:

Thanks,
Jan

I created a (very) stripped down version of my current dashboard, with only the sensors from the heatpump on it. You can find the dashboard, but also 2 automations I use, on https://github.com/Mosibi/Midea-heat-pump-ESPHome/tree/master/homeassistant

For comparison, this is my current complete dashboard

2 Likes

Thanks a lot!, and nice work on the out of the box working module for the heatpump!

Jan

1 Like

Hello,

I have a Qlima S34252 (Midea unit), with the attached PCB board. The wiring diagram also refer to WiFi controller(optional), but I can not see any pinout or connectors on the board for this(see picture attatched of the LED/IR Display Board.

Is there a way I can replace the PCB board, to get WiFi stick so I can control it through home assistant?

I don’t know if adding the pcb would do the trick.
According earlier posts, the unit must be wifi prepared.

Hello, I am reading the data via modbus (esphome) with an esp8266. It is a Kosner Heatpump, it is identical to Midea. I am trying to change the data of the ninth curve. and with two of them I have problems. T1SetH1 and T1SetH2 are correct values and can be changed, however the entities T4H1 and T4H2 appear to have incorrect values and are outside the configured range and changing.

  # Register: 267
  - platform: modbus_controller
    modbus_controller_id: "${devicename}"
    name: "${entity_prefix} T4H1"
    id: "${devicename}_t4h1"
    register_type: holding
    address: 0x10b
    value_type: S_WORD
    unit_of_measurement: "°C"
    entity_category: config
    min_value: -25
    max_value: 35
  # Register: 268
  - platform: modbus_controller
    modbus_controller_id: "${devicename}"
    name: "${entity_prefix} T4H2"
    id: "${devicename}_t4h2"
    register_type: holding
    address: 0x10c
    value_type: S_WORD
    unit_of_measurement: "°C"
    entity_category: config
    min_value: -25
    max_value: 35

Can you check which value is set in the menu/display on the controller self?

yes, this values in menu/display is correct. T4H1: -5 and T4H2: 7

And to understand the issue, in HA you saw the good value for both settings and after changing both, you get the high values? And still the heatpump shows the right values ?