Midea branded AC’s with ESPhome (no cloud)

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

sorry for late reply… RS485 doesnt have exactly tx, rx there are 2 connectors on the control unit of my heatpump marked as H1 and H2 not sure for your AC after you’ve connected everything you can access different registers and then you have to figure out which value relates to what. also since there is no software available and basicly no documentation of a modbus mapping table this is kinda time consuming. I was successful for our heatpump, still have a lot of work to do but once it’s done i promise i’ll upload it to github here are some images what i extract and can do with it :stuck_out_tongue:


and pure extracted data

Also just FYI if anybody tries to connect to modbus don’t bother doing it through XYE connection as it’s not standard modbus i wasted few days trying to but realised i got corrupt data as start bit had shorter duration and because of that RS-485->RS-323->USB device was useless… would have to write a custom software serial for arduino… anyway there is a rotary switch inside main indoor unit that sets modbus adress of device and you can connect to it using H1 and H2 terminals on the control unit (display where you set everything) they are covered with an antistatic foil but clearly visible when removed image
this is the control unit i’m talking about

3 Likes

I need more information of that.
my A/C has XYE connection , can you help me with that?

check if you can find if it supports modbus and where to connect RS485 to… if it does not you cant connect to it using modbus will have to find another way… check this thread there is an usb device for A/C s

Hello.
This is my first post so please bear with us.
I have a question for StarKiller99 if you connect the pump with esphome modbus controller please help. I have installed the Midea heat pump and cannot connect. My esphome configuration and manufacturer modbus table.
Wires connected to the heat pump under H1 and H2, the indoor unit address is set to 0.
What am I doing wrong.

esphome:
  name: pompa-modbus

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:
  level: VERY_VERBOSE
#  baud_rate: 9600

# Enable Home Assistant API
api:

ota:
  password: !secret WI_FI_password

wifi:
  ssid: !secret WI_FI_ssid
  password: !secret WI_FI_password

# Optional manual IP
  manual_ip:
    static_ip: 192.168.100.170
    gateway: 192.168.100.1
    subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: !secret WI_FI_AP_ssid
    password: !secret WI_FI_password

captive_portal:
    
uart:
  id: mod_bus
  tx_pin: 16
  rx_pin: 17
  baud_rate: 9600
  stop_bits: 1

modbus:
#  flow_control_pin: 5
  send_wait_time: 500ms
  id: pompa_modbus

modbus_controller:
  - id: modbus_1
    ## the Modbus device addr
    address: 0x00
    modbus_id: pompa_modbus
#    command_throttle: 100ms
    setup_priority: -10
    update_interval: 10s

text_sensor:

  - platform: wifi_info
    ip_address:
      name: IP Address

  # Send Uptime in raw seconds
  - platform: template
    name: Uptime
    id: uptime_human
    icon: mdi:clock-start


sensor:  
  - platform: wifi_signal
    name: WiFi sygnał
    update_interval: 60s

  - platform: uptime
    name: Czas pracy
    id: uptime_sensor
    update_interval: 60s
    on_raw_value:
      then:
        - text_sensor.template.publish:
            id: uptime_human
            # Custom C++ code to generate the result
            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: modbus_controller
    id: modbus_T5
    name: "Temperatura ciepła woda"
    state_class: measurement
    register_type: holding
    address: 0x115
    unit_of_measurement: "°C"
    value_type: S_WORD
    accuracy_decimals: 1
#    skip_updates: 10
#    filters:
#      - multiply: 0.1
web_server:
  port: 80

hi i dont know tbh because i never used esphome for it, wrote my own software but is not finnsihed and cant share it yet. can you tell me which model is your heatpump. i am also using 115 adress for reciving DHW temp but i believe you wrote it down incorrectly as 115 is in decimal you need to use hexadecimal value which in this case would be 0x73 (just write 115 to hex in google) so max adress is 255(0xff) you went over that as adress 0x115 coresponds to 341

i just updated my comment. basicly try to use 0x73 adress because you have to use it in hexadecimal form 0x indicates hexadecimal and 0x73 = 115 in decimal

I installed a midea M-Thermal-8B1HB heat pump.
I tried to set the address to 0x73 but it still doesn’t work. What else can I change. Any ideas.

tried swaping the terminals? do you have GND connected? in screenshot you provided it says it did not recieve response…

I have updated and streamlined the example YAML a bit in the first post, hoping to make it more universal/user friendly.
I also added the fan setting to the web interface.

Hi,
I’ve got a problem: one of my AC unit is working with an esp01 board. I ordered an esp01s board and installed the esphome firmware with the same yaml as the original. If I power up the esp01s unit with a ch340g programmer it seems ok: I can open the page of the unit, and I can check the log.
If I change the working esp01 and esp01s boards on the AC unit, all goes wrong: nothing happens, only one short blue blink from the board, but thats all. No log, the device seems offline in esphome.
I created an other device, but the same result.

esphome:
  name: climate-upstairs
  platform: ESP8266
  board: esp01_1m

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

  ap:
    ssid: "UpstairsAC"
    password: !secret wifi_password

captive_portal:

logger:
  baud_rate: 0

api:

ota:

web_server:
  port: 80

uart:
  tx_pin: 1
  rx_pin: 3
  baud_rate: 9600

text_sensor:
  - platform: version
    name: Emeleti klíma ESPHome verzió
    
  - platform: wifi_info
    ip_address:
      name: Emeleti klíma IP
    ssid:
      name: Emeleti klíma SSID
    bssid:
      name: Emeleti klíma MAC

sensor:
  - platform: uptime
    name: Emeleti klíma uptime

  # WiFi Signal sensor.
  - platform: wifi_signal
    name: Emeleti klíma WiFi signal
    update_interval: 60s

# Main settings
climate:
  - platform: midea
    name: "Emeleti klíma"
    autoconf: true
    visual:
      min_temperature: 17 °C
      max_temperature: 30 °C
      temperature_step: 1 °C
    beeper: true
    outdoor_temperature:
      name: "Emeleti klíma kültéri egység hőmérséklet"

Any advice?
Thx:
P!

Can you try to measure the voltage?
I suspect the esp01s draws more current, and the powersupply doesn’t support it….

Ok, I will try, it takes a bit…
Let’s assume this is the cause of the error. What can be done?
(U will be right. I found a webpage, which says the esp01s needs 250mA, the esp01 needs 150mA.
FCK)

@petikeje You could use an external power supply (f.e.for an USB charger)
Don’t forget to use a common ground :wink: