Clivet/Midea Heat Pump integration - ESPHome/Modbus/Dongle

Hi all! So today we’ve gotten installed our new heat pump and hot water heat-pump. Both are Clivet which I think is a Midea brand. Models are for the heat pump Edge Evo 14.2 and Swan -2 300.

Here in Italy you see these more often. I’m looking/have been looking for the best way to integrate both units into home assistant but doing some research I don’t seem to find something straightforward. I’m seeing USB WiFi dongles for Midea AC units but none of those mention the (more complicated) heat pump or warm water unit.

Both units have ModBus so I can probably tinker something together but I was wondering if someone has some experience with integrating these units.

Thanks

Did you see this pop up as you were posting? Anything help you in this 1000 message thread?
Midea branded AC’s with ESPhome (no cloud).

Thanks @Sir_Goodenough I did see that massive post but it talks only about AC/s. I might post something in the thread there though. Thanks!

I see that this controller will be useful: https://shop.svenar.nl/ to integrate to HA. I will try in my Midea heat pump clone (Mundoclima in Spain).

1 Like

@xi1n1xa that’s exactly the one I bought from Sven :slight_smile:

hi, I have a Swn2 190s and I’m in the same condition as you. I tried with the EW11 interface I can communicate but I receive incorrect data. I’m still looking for a solution.

hi @tatoviola i switched to a Modbus implementation using a waveshare module. It works better than the current Midea integration which contains bugs on the water heater module that I was not able to find a fix for.

If you solved it can you tell me how you did it? I’m struggling but I can’t solve it. Thank you

so i bought this: https://www.amazon.it/gp/product/B0BGHVRMPJ?ie=UTF8&linkCode=sl1&tag=rodmcbain-21&linkId=ce0a6886c72502d773ee9539e8ba2e83&language=en_GB&ref_=as_li_ss_tl&th=1

I added it to my network and then configured the modbus module in home assistant. I can send you the modbus.yaml file if you like.

I got the inspiration from this video: https://www.youtube.com/watch?v=Xuj2YFZ5zME

just thinking, what is wrong about the values in your screenshot?

can you send me your code? I receive wrong data. for each grade he scores 2 more points. I used the offset command to improve the values ​​but they are totally wrong.

Sure, here you go:

- name: waveshare1
  type: tcp
  host: 192.168.xxx.xxx
  port: 502
  delay: 2
  timeout: 5
  # binary_sensors:
  #   - name: water_heatpump_on_off
  #     input_type: holding
  #     address: 0
  #     slave: 1
  sensors:

    # The two most interesting values at the top
    - name: water_heatpump_target_temperature
      unique_id: f8c8a1a9-ef93-4764-a744-2aeeaa4ee2ce
      scan_interval: 30
      address: 2
      slave: 1
      offset: -15
      scale: 0.5
      
    - name: water_heatpump_current_temperature
      unique_id: f8c8a1a9-ef93-4764-a744-2aeeaa4ee2ca
      scan_interval: 30
      address: 113
      slave: 1
      offset: -15
      scale: 0.5

    
    #Possible values: hybrid, e-heating, holiday
    - name: water_heatpump_mode
      scan_interval: 10
      address: 100
      slave: 1
    - name: water_heatpump_temperature_top_of_tank
      scan_interval: 30
      address: 101
      slave: 1
      offset: -15
      scale: 0.5
    - name: water_heatpump_temperature_bottom_of_tank
      scan_interval: 30
      address: 102
      slave: 1
      offset: -15
      scale: 0.5
    - name: water_heatpump_condensor_temperature
      scan_interval: 30
      address: 103
      slave: 1
    - name: water_heatpump_outdoor_temperature
      scan_interval: 30
      address: 104
      slave: 1
    - name: water_heatpump_exhaust_gas_temperature
      scan_interval: 30
      address: 105
      slave: 1
    - name: water_heatpump_suction_temperature
      scan_interval: 30
      address: 106
      slave: 1
    - name: water_heatpump_load_output
      scan_interval: 30
      address: 109
      slave: 1
    - name: water_heatpump_max_temperature
      scan_interval: 30
      address: 111
      slave: 1
      unit_of_measurement: C
    - name: water_heatpump_min_temperature
      scan_interval: 30
      address: 112
      slave: 1
      unit_of_measurement: C

    - name: water_heatpump_water_remaining
      scan_interval: 30
      address: 114
      slave: 1
    - name: water_heatpump_aux_status
      scan_interval: 30
      address: 115
      slave: 1
    - name: water_heatpump_compressor_running_time
      scan_interval: 30
      address: 116
      slave: 1

  switches:
    - name: water_heatpump_on_off_toggle
      address: 0
      slave: 1
      write_type: holding
      verify:
        input_type: holding
        address: 0
  climates:
    - name: "water_heatpump_climate"
      address: 113
      slave: 1
      input_type: holding
      max_temp: 70
      min_temp: 30
      precision: 1
      target_temp_register: 2
      temp_step: 1
      temperature_unit: C
      hvac_onoff_register: 0
      write_registers: true
      offset: -15
      scale: 0.5

thanks for the code. I ordered the same modbus converter as you. I’ll try over the weekend.
What year is your Swan?

It’s brand new. I got the register info from the manual, maybe you can confirm yours is the same. I have a Swan 2 300.

with the converter you recommended it works great. Thank you! do you know how to create the command to activate and deactivate resistance mode?

It’s this line:

    - name: water_heatpump_mode
      scan_interval: 10
      address: 100
      slave: 1

You can also write to that register to set the mode. This is from the docs:

1 Setting mode 1:invalid ; 2:hybird 3: e-heater 4:vacation

So that would mean value 3.
I didn’t set this up yet so let me know when/if you worked it out.

I tried this tonight @tatoviola but it’s not address 100 as that’s just a read register but it should be register 1. Here’s a working button:

type: button
name: E-Heater
tap_action:
  action: call-service
  service: modbus.write_register
  service_data:
    hub: waveshare1
    slave: 1
    address: 1
    value: 3
hold_action:
  action: none
show_icon: true
show_name: true
entity: sensor.water_heatpump_mode

perfectly functional. Well done! thank you so much