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

Congratulations!

Coincidentally the D1 minis that I ordered for my Hayer AC’s will be arriving tomorrow. I am preparing for installation and now see your announcement.

Do you know when this will be processed? In other words, which procedure should I follow, is there.an easy way for me to tell whether your component is live with them or not?

Hi @Treesinmygarden,
I don’t know for sure how it will go. I do not know if it will be included in the next 2023.6.0 or one of the following releases. 2023.6.0 most likely will be released this week or beginning of next week. But 2 first betas have already been produced so not sure if they will include new features.
Haier component code in the official repository and code in the main branch of my repository will be the same. The exact same configuration will work the same way. The only thing that would be different is that the external_components section should be removed from the configuration.

@Treesinmygarden
Today ESPhome released beta 5 for the 2023.6.0 release and my component was not included (which is logical not to include big changes if you already preparing release) so it will delay the release for my hair component till the next release. So most likely +1 month of waiting. Of course, it is up to you but I would say don’t wait, use an external component, you can easily switch once it will be released.

1 Like

Does anybody have an original firmware for esp32-for-haier board? I need unsecured version of firmware (no encryption enabled version of board)

Why do you need it? I have a full flash image for my board but it will not work on another one because there are different certificates for different boards. Also, it is not that easy to flash unencrypted version of firmware to an encrypted board. There is a special procedure: Flash Encryption - ESP32 - — ESP-IDF Programming Guide latest documentation and it can be done only 3 times per chip. Never tried it before so can’t say if it works or not.

I installed the ESPHome add-on in Home Assistant and added the new device (Wemo D1 mini) using a USB cable. After this I soldered a cut USB cable to the Wemo and plugged it into my Haier. The Wemo shows up as “online” in the ESPHome Dashboard. So far so good.

But how do I now add the Haier functionality to the Wemo? What is the next step?

I am new to this in general, sorry foor the noob question.

So I assume you have secrets entered for your device (because you see it online). So please edit the config for your device and use this basic configuration:

esphome:
  name: haier

esp8266:
  board: d1_mini

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

external_components:
  - source: github://esphome/esphome@dev
    components: [ haier ]

api:

ota:

uart:
  - id: ac_port
    baud_rate: 9600
# Use real pins for your device
    tx_pin: 1
    rx_pin: 3

logger:
  level: DEBUG
  hardware_uart: UART1

web_server:

climate:
  - platform: haier
    id: haier_climate
# If hOn protocol will not work try smartAir2
    protocol: hOn
    name: Haier AC
    uart_id: ac_port

It is just the most basic thing. Feel free to change all things you need (like device name or PINS for UART port).

hmm I had already experimented with this but I guess I am missing something. How do I get the Wemo to represent itself as an AC control in Home Assistant? I guess normal behavior would be to add it to the dashboard from configuration but in the screenshot below I only have “firmware” there. Did I miss a step?

i recently purchased a GE window air conditioner with wifi controlled by their SmartHQ phone app. As GE units are manufactured by Haier, what is the likelihood I might find an ESP8266 or ESPE32 module inside? It would be great if the newer GE AC units are 100% compatible.

Let’s move step by step. The problem is that I am using a home assistant in a docker container and not with hass OS so not sure how to do it from there. But you should be able to see ESPHome dashboard:


You should click “Edit” and then see the config edit window:

Then you should paste the config that I provided, change it for your situation, and press “Install” in the right upper corner. After that, you should get firmware compiled and installed.

1 Like

We can try to help you to figure it out but I don’t think anybody here has experience with this model or SmartHQ. It looks like SmartHQ is not available for my region so I can’t even check it. You will need to find yourself where the Wi-Fi module is. How to connect to serial port etc. The only thing we can help you is with the configuration for the ESP module.

It appears Home Assistant found the window AC after I connected it to the wifi. Used a HomeKit password and it’s in HA now!

1 Like

I completely missed the “install” step after editing and saving the config :weary:

It seems to be working now! Thank you very much for taking the time to help me with this. It is very much appreciated.

image

1 Like

I want to try to replace original board with custom. But i need unencrypted version of hON firmware for flashing. I have an original board ( 2 boards 2021/12/11 manufacture date) , but my firmware is encrypted.

@Treesinmygarden
No problem, just don’t forget there is more than present in this simple config, there is a couple of switches, additional settings, an external temp sensor, etc. Just check the sample config in my GitHub repo, let me know if you will have questions.

It will not work. First thing - you will need exactly the same hardware with the same resources. Second - every board has unique certificates, so you will also need to set the same MAC address (or maybe some other way of unique ID like EFUSE_BLK3 no idea). In my case when I accidentally restored the wrong flash image to the board I couldn’t;t make it work with the hOn app.

1 Like

Certificate for decryption? If image is unencrypted, why we need a certtificate?

Certificate for secure communication with Haier backend.

Looking in to that right now. I see the different yamls on your github (beeper, display, etc). Am I to copy paste the code from inside these files to the one configuration file that I already have?

I also notice you have the .haier-hon-base.yaml that includes all these switches, but this file is already called upon by the git integration in the main Yaml as far as I understand?

Not sure how to proceed

I would say just take .haier-hon-base.yaml as an example, if you see something like

switch:
  - <<: !include configs/switch/display.yaml
  - <<: !include configs/switch/beeper.yaml

Just replace every line with include with file content:

switch:
  - platform: template
    id: ${device_id}_display_switch
    name: ${device_name} display
    icon: mdi:led-on
    entity_category: config
    restore_state: yes
    lambda: |-
      return id(${device_id}).get_display_state();
    turn_on_action:
      climate.haier.display_on: ${device_id}
    turn_off_action:
      climate.haier.display_off: ${device_id}
  - platform: template
    id: ${device_id}_beeper_switch
    entity_category: config
    name: ${device_name} beeper
    icon: mdi:volume-high
    restore_state: yes
    lambda: |-
      return id(${device_id}).get_beeper_state();
    turn_on_action:
      climate.haier.beeper_on: ${device_id}
    turn_off_action:
      climate.haier.beeper_off: ${device_id}

And so on. But of course, it depends on what you want. Maybe some features you don’t need (or don’t want)

1 Like

Hi @paveldn,
first of all, thank you for your amazing work!
I have the “Smartair2” version and all seems to work well except for the fact that (in my opinion) the internal temperature sensor of my Haier isn’t well calibrated, it’s always 2°C above the real temp. So i was thinking if it’s possible to use the temperature sensor of my Tado thermostat (or any other temp. sensor) as “current temperature” for the Haier.