Midea branded AC’s with ESPhome (no cloud)

@nvschilleman Hey Noel, can you send a picture of where the IR sensor is located on your device? Is it on the main control board? I’m also using the Sergey Dudanov dongle and am trying to get the Follow_Me function working with a remote sensor.

It might also help to see where/how the wire connects to the SLWF-PRO (Dudanov dongle).

It seems the ’ name’ is missing…otherwise this compiles fine:

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

# Sensors. sensor.masterbedroom_temperature
  - platform: homeassistant
    name: Remote tempertature Sensor
    entity_id: sensor.masterbedroom_temperature   # Sensor from HASS
    internal: true
      - throttle: 10s
      - heartbeat: 2min             # Maximum interval between updates.
      - debounce: 1s
        temperature: !lambda "return x;"
        beeper: false

and yes, it should stay ’ return x’


Regarding IR, you have 2 options:
either you use a real IR led, or you use a wire connected to the pin of the IR sensor
Hence 2 choices for config

  • 50% for IR LED
  • 100% for direct connect to TSOP IR

also mentioned on github how to wire it up:

Yeah… I also appear not to have gotten Sergey’s UNI Dongle. I got the SmartLight.me dongle. I don’t think Sergey’s Dongle is available anymore. I went to the Tindie shop but it looks like it’s not working anymore.

@dudanov Do you sell your dongle anymore?

@aceindy Hey man, so I’m a bit slow - but I finally was able to get a few things working that I wasn’t able to. Sorry about the learning curve.

But… I was thinking, I read a bit on the ESPHome Thermostat platform under climate (Thermostat Climate Controller — ESPHome) and was thinking, couldn’t we use this for our “follow me” sensor? In other words, we add a thermostat platform section to the climate, below midea climate, and do a bunch of calls to the midea_ac device to make it function as expected… but once done, we could set any remote sensor to be the remote sensor for the thermostat, right?

This - I believe - is amazing. I think this is going to do almost exactly what I was looking for with the follow_me stuff. The “native” follow_me functions (or even the native temperature control rules) from my mini split are technically still active, but frankly, they blow… so having this is amazing.

Now, I guess the only thing I really need is a UI for the set temperature and the variables.

But yeah, my remote zigbee sensor is working great as my “follow_me” thing and I didn’t have to solder anything to my dongle.

Great work @netsplit64

@aceindy Not sure if you’ve seen this, but it’s working for me.

Hello all,
I have successfully installed this on an ESP01 and plugged it into a Dimstal AC SMND12. Unfortunately the wifi does not seem to be active. There is no communication between the AC and ESP. Can someone tell me how to activate wifi without buying an original wifi usb stick?

Is it a midea branded AC?

Tried swapping tx/rx?

Yes, I think the AC is identical in construction to Midea. I have read in various places.
I think now I know where the problem lies. I had thought with the adapter, with which I have flashed the ESP01, I could also operate it on the AC. But in the meantime I had read your text again and found that I need a different adapter for operation.

I think you can (as any ESP module will work, as long as they can run ESPHome), but you will need to check your configuration of GPIO’s; they might be on another pin :wink:

i only have an 4 ch level converter. how do i wire that?

I’ve started setting this up and have setup my configuration as the example shown above, my model is listed here, however I’m not getting any communication. All values show n/a and no commands are successfully sent. SET_STATUS(0x40) request failed…

we need some more info than that…
esp type

@aceindy my apologies, I’m using esp8266, specifically this

here is my yaml

# Configuration entry
  node_name: lennoxhvac # Use a unique name.
  node_id: lennox_ac    # Use a unique id.
  friendly_node_name: "Lennox AC"

  name: ${node_name}
  comment: ${friendly_node_name}

  board: esp01_1m

# Disable logging over UART (required)
  baud_rate: 0

# Define UART pinout 
  tx_pin: 1
  rx_pin: 3
  baud_rate: 9600

  - platform: midea
    id: ${node_id}_my_climate   # Use a unique id
    name: ${node_name}          # Use a unique name

# Optional settings overrides.
    period:  2s                        # Optional
    timeout: 4s                       # Optional
    num_attempts: 3              # Optional
    visual:                              # Optional
      min_temperature: 60 °F    # min: 60
      max_temperature: 95 °F    # max: 95
      temperature_step: 0.5 °F  # min: 0.5
    autoconf: true                # Optional

# All capabilities in the section below are detected when autoconf = true:
      - FAN_ONLY
      - HEAT_COOL
      - COOL
      - HEAT
      - DRY
      - SILENT
      - TURBO
    supported_presets:  # All capabilities in this section detected by autoconf.
      - ECO
      - BOOST
      - SLEEP
    custom_presets:     # All capabilities in this section detected by autoconf.
      - VERTICAL
      - BOTH
    outdoor_temperature:  # Optional. Create outdoor unit temperature sensor (may display incorrect values after long inactivity).
      name: "Temp"
    power_usage:          # Optional. Create power usage sensor (only for devices that support this feature).
      name: "Power"
    humidity_setpoint:    # Optional. Create indoor humidity sensor.
      name: "Humidity"
|17:03:43|[D]|[ApplianceBase:139]|Response timeout...|
| --- | --- | --- | --- |
|17:03:43|[D]|[ApplianceBase:146]|Sending request again. Attempts left: 2...|
|17:03:43|[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 22 A8 11|
|17:03:44|[D]|[ApplianceBase:139]|Response timeout...|
|17:03:44|[D]|[ApplianceBase:146]|Sending request again. Attempts left: 1...|
|17:03:44|[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 22 A8 11|
|17:03:46|[D]|[ApplianceBase:139]|Response timeout...|
|17:03:46|[D]|[ApplianceBase:154]|Destroying the request...|
|17:03:46|[D]|[AirConditioner:178]|Enqueuing a GET_STATUS(0x41) request...|
|17:03:46|[D]|[ApplianceBase:173]|Enqueuing the request...|
|17:03:46|[D]|[ApplianceBase:075]|Getting and sending a request from the queue...|
|17:03:46|[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 23 F6 C2|

Did you try changing the TX and RX pins? That is normally the first step, if somethings not working. :slight_smile:

Just do it in your code:

  tx_pin: 3
  rx_pin: 1
  baud_rate: 9600

@paddy0174 i did start trying that but the configuration failed to save over wireless, will try again connected directly to it.

Yeah, that’s a known problem with these “small” chips, they don’t have enough memory to get the running and the new firmware on the device at the same time.

There is kind of a workaround, but it’s messy and you have to be aware, what you’re doing.

  • Copy the YAML you have into an editor and just to be sure, make a backup of the file also.
  • Turn off the A/C
  • Delete all the file content but the bare minimum you need to work with the device, eg. WIFI and OTA must stay enabled.
  • Flash this mini image via OTA to the device.
  • Go back to the dashboard and coyp back the safed content from the editor.
  • Make changes or whatever is needed, eg. change the pins.
  • Flash the image back to the ESP over OTA.

This way you’re circumventing, that you use a lot of space on the device before you flash the real firmware. :slight_smile: But as I said, do it at your own risk and don’t complain, if you won’t have any backups. :laughing:

Or better just connect it to your computer, in the end it saves a lot of trouble. It is more of a workaround for people who can’t reach the device very good inside the A/C.

same issue with tx_pin: 3 and rx_pin 1

@shimonenator perhaps you could share your yaml file for Model: MWMC009S4-1P / MWMC012S4-1P

Well, at least we know you do have transmit…, but apparently the AC doesn’t receive it (as it doesn’t reply). This could be because tx/rx are swapped (which you tried), but could also be a faulty board or just a bad connection (or even wrong gpio config??)
You happen to have another board you can try??

I don’t have another, just the one.