ESP Haier: Haier Air Conditioner + ESP Home + Wemos D1 mini

I’m not an HVAC expert, but according to this nicely written manual I found for some multi-split unit, I think these two sensors are:

Outdoor In Air Temperature = Compressor Suction Temperature
Outdoor Out Air Temperature = Compressor Discharge Temperature

79°C on discharge while heating seems right.

2 Likes

Hi @evlo Can you provide logs for every action? Including setting away with the remote. I need 15-20 seconds of logs before action and 15-20 after.

Hi all!

I’m very grateful for all the work you guys have put into this integration as it helped me to get my Haiers into HomeAssistant even though an official integration still lacks within the HomeAssistant ecosystem.

Unfortunately, the whole experience wasn’t without some serious hours of troubleshooting as I didn’t get to a working setup without a fight. So I thought I’d document this for anyone who might experience a similar situation.

Original Setup:

  • 2x Haier Tundra 2.5 kW Airco units (IR Remotes)
  • 2x KZW-W002 WiFi adapter (Work with SmartAir2 App, NOT with the Hon App)

New Setup

  • 2x ESP-12 D1 Mini NodeMcu Lua Wifi (ESP8266)
  • 2x old USB-A cables
  • ESPHome + HomeAssistant

Process

  • Took an old USB-A cable and cut it as described in the OP
  • Soldered the wires according to the wiring scheme
  • Installed UART drivers on my laptop to detect the serial ESP device via it’s onboard microUSB-port (COM10)
  • Created a .yaml file with the Haier SmartAir2 protocol configuration
  • Newly created dongle was recognized by ESPHome
  • Config.yaml was validated and installed on the ESP-12 D1 mini
  • The new dongle, while still powered by my laptop was able to connect to my Wifi and showed it used the smartair2 protocol and captured traffic

At this point I thought I got it all working in one go, but boy was I wrong.

Once I installed the dongle in the Haier unit it powered on and was discovered by ESPHome. However, it showed timeouts in the log and the entities were not showing any data in HomeAssistant. When I clicked a button in the HVAC card in HA, it did show the action in the ESPHome log, but showed an error sending the request to the Haier.

I started to read up on potential issues and tried to strip the configuration to its bare minimum, even re-soldered the wires to make sure everything was correct. I don’t know how many time I re-flashed the configuration to the ESP-12 D1 Mini, but it was a lot!

Long story short…
As my units only worked with the SmartAir2 app, I only focussed on this protocol for the configuration, assuming the Hon protocol would not work.
Turned out I was wrong again, as this caused the issue all along.

  • Thanks to the post of @Chris.tian, I decided to give the Hon protocol a try
  • I’ve reset my ESP-12 D1 mini to its original state and changed the configuration to suit the Hon protocol instead of the SmartAir2 protocol, and got success!

Lesson learned:

  • Even though you always used the SmartAir2 app with your Haier Unit, it doesn’t mean it can ONLY work with the SmartAir2 protocol.

I hope this helps others who struggle with getting their older Haier units to work. I know it would have saved me at least a few hours of irritation and troubleshooting.

This is my working Haier-Hon-configuration.yaml content:

esphome:
  name: aircokantoor
  friendly_name: "Airco Kantoor"
  name_add_mac_suffix: false
  min_version: 2024.6.0
  project:
    name: esphome.web
    version: dev

esp8266:
  board: esp01_1m

# Enable logging
logger:
  level: DEBUG
  baud_rate: 0

# Enable Home Assistant API
api:
  password: "thisisanicepassword"

# Allow Over-The-Air updates
ota:
- platform: esphome

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

captive_portal:

dashboard_import:
  package_import_url: github://esphome/example-configs/esphome-web/esp8266.yaml@main
  import_full_config: true

# To have a "next url" for improv serial
web_server:

uart:
  baud_rate: 9600
  tx_pin: 1
  rx_pin: 3
  id: ac_port

climate:
  - platform: haier
    id: haier_kantoor
    protocol: hon
    name: Airco Kantoor
    uart_id: ac_port
    wifi_signal: true   # Optional, default true, enables WiFI signal transmission from ESP to AC
    visual:                     # Optional, you can use it to limit min and max temperatures in UI (not working for remote!)
      min_temperature: 16 °C
      max_temperature: 30 °C
      temperature_step: 
        target_temperature: 1
        current_temperature: 0.5
    supported_modes:            # Optional, can be used to disable some modes if you don't need them
      - 'OFF'                     # always available
      - HEAT_COOL                 # always available
      - COOL
      - HEAT
      - DRY
      - FAN_ONLY
    supported_swing_modes:      # Optional, can be used to disable some swing modes if your AC does not support it
      - 'OFF'
      - VERTICAL
      - HORIZONTAL
      - BOTH
    supported_presets:          # Optional, can be used to disable some presets if your AC does not support it
      - BOOST
      - SLEEP

sensor:
  - platform: haier
    haier_id: haier_kantoor
    power:
      name: Airco Kantoor Power

binary_sensor:
  - platform: haier
    haier_id: haier_kantoor
    indoor_fan_status:
      name: Airco Kantoor Indoor Fan Status
    compressor_status:
      name: Airco Kantoor Compressor Status
    defrost_status:
      name: Airco Kantoor Defrost Status
3 Likes

I have tried repeatedly to find a solution for the installation, but this problem keeps appearing.

Validate esphaier.yaml :x:
INFO ESPHome 2024.12.4
INFO Reading configuration /config/esphome/esphaier.yaml…
ERROR Error while reading config: Invalid YAML syntax:

while parsing a block collection
in “/config/esphome/esphaier.yaml”, line 31, column 3
expected , but found ‘?’
in “/config/esphome/esphaier.yaml”, line 54, column 3

Hi @Trtr1010 ,

Can you please show your yaml file (without passwords and keys) please?

Hi paneled

this is my yaml
I don’t know if what I did is correct or not, but it’s not working for me

esphome:
  name: esphaier
  friendly_name: ESPHaier

esp8266:
  board: esp01_1m


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

ota:
  - platform: *********
    password: "*********"

wifi:
  ssid: "**********"
  password: "*********"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "*********"
    password: "*********"

captive_portal:

# Define UART settings
uart:
  - id: ac_port
    tx_pin: GPIO1
    rx_pin: GPIO3
    baud_rate: 9600

# Example configuration entry
climate:
  - platform: haier
    id: haier_ac
    protocol: hon
    name: Haier AC
    uart_id: ac_port
    wifi_signal: true
    display: true
    visual:
      min_temperature: 16 °C
      max_temperature: 30 °C
      temperature_step: 1 °C
    supported_modes:
      - 'OFF'
      - HEAT_COOL
      - COOL
      - HEAT
      - DRY
      - FAN_ONLY
    supported_swing_modes:
      - 'OFF'
      - VERTICAL
      - HORIZONTAL
      - BOTH
    supported_presets:
      - AWAY
      - BOOST
      - SLEEP
    on_alarm_start:
      then:
        - logger.log:
            level: WARN
            format: "Alarm activated. Code: %d. Message: \"%s\""
            args: [ code, message ]
    on_alarm_end:
      then:
        - logger.log:
            level: INFO
            format: "Alarm deactivated. Code: %d. Message: \"%s\""
            args: [ code, message ]
    on_status_message:
      then:
        - logger.log:
            level: INFO
            format: "New status message received, size=%d, subcmd=%02X%02X"
            args: [ 'data_size', 'data[0]', 'data[1]' ]

# Example configuration entry
sensor:
  - platform: haier
    haier_id: haier_ac
    outdoor_temperature:
      name: Haier outdoor temperature
    humidity:
      name: Haier Indoor Humidity
    compressor_current:
      name: Haier Compressor Current
    compressor_frequency:
      name: Haier Compressor Frequency
    expansion_valve_open_degree:
      name: Haier Expansion Valve Open Degree
    indoor_coil_temperature:
      name: Haier Indoor Coil Temperature
    outdoor_coil_temperature:
      name: Haier Outdoor Coil Temperature
    outdoor_defrost_temperature:
      name: Haier Outdoor Defrost Temperature
    outdoor_in_air_temperature:
      name: Haier Outdoor In Air Temperature
    outdoor_out_air_temperature:
      name: Haier Outdoor Out Air Temperature
    power:
      name: Haier Power

@Trtr1010
From your previous message, I got an impression that you can’t compile your config. But in this one it looks like you successfully compiled FW but it is not working. Can you provide me ESPhome logs from your device? I need 20-30 seconds of logs.

Thank you for the response
In fact, I have reached an advanced stage of preparation and then the matter worked for me, but I have a question
My AC on the smartair2 protocol, can I use the outdoor temperature sensor?
And what are the commands that can be used in this protocol?
Can I change the protocol to hOn?
Thanks

@Trtr1010
Glad it worked for you.

Unfortunately no. External sensor is not supported by SmartAir2 protocol.

Didn’t get your question. What commands do you need?

No. Internal block support only one protocol. If you use wrong protocol, internal block will not understand it.