Midea branded AC’s with ESPhome (no cloud)

That is absolutely awesome! Can’t believe I missed that. Thank you for pointing me in the right direction.

Thanks for answer; are you selling the boards? Regards Achim

I plan to. Do you need a board within weeks or do you have a bit more time? :grinning_face_with_smiling_eyes:

@aceindy Have you seen this? Do we need a wire connecting the ESPHome device to the AC IR sensor?

@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:

remote_transmitter:
  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
sensor:
  - platform: homeassistant
    name: Remote tempertature Sensor
    entity_id: sensor.masterbedroom_temperature   # Sensor from HASS
    internal: true
    filters:
      - throttle: 10s
      - heartbeat: 2min             # Maximum interval between updates.
      - debounce: 1s
    on_value:
      midea_ac.follow_me:
        temperature: !lambda "return x;"
        beeper: false

and yes, it should stay ’ return x’

@SJensen721

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
yaml
logs
??

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

here is my yaml

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


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

esp8266:
  board: esp01_1m

# Disable logging over UART (required)
logger:
  baud_rate: 0

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

climate:
  - 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:
    supported_modes:    
      - FAN_ONLY
      - HEAT_COOL
      - COOL
      - HEAT
      - DRY
    custom_fan_modes:
      - 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.
      - FREEZE_PROTECTION
    supported_swing_modes:
      - VERTICAL
      - HORIZONTAL
      - 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:

uart:
  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.

1 Like