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

Hi @lokohck

It is the first time I see this board, it looks like some new things introduced in Haier’s world. According to documentation from the link you provided, it has ARM CPU so no way to flash it to the ESP home you will need to use some other ESP32 (or ESP8266, or RPI Pico W) board.

Have no idea, if it talks known protocol it should work if you will connect everything right. One of the most difficult things with Haiers is that they don’t send information until you explicitly ask. So there is no way to check if the connection works if you don’t know which protocol to use. If your AC is working with the smartAir2 app most likely it should use the smartAir2 protocol but we saw a couple of new devices that speak hOn but work with the smartAir2 app. So nothing is for sure, just trial and error.

Thank you so much. Yes I will use an ESP32, I already have it prepared to mount it. I’m just waiting for the JST 2.0 female connector to arrive. Tomorrow or the day after tomorrow I will inform you if it works. The air conditioning was installed in 2020 and is a ducted device, the model “ad71s2sm3fa”.

1 Like

Love the great work happening here! Quick q, I need to control the temperature inside several small grow mushroom grow rooms with +/- 2C accuracy. I was thinking of using a hair mrv-5 which is the vrf system with various indoor units and a single outdoor unit. A main indoor unit would provide a cold line to 16C and they would be connected to a recirculation system module containing a ducted smaller indoor unit above each grow room that would increase the temp a few degrees to up to 10C. I figured that the heat required to heat the grow rooms and incubator could be offset by the cooling produced by the main indoor unit for the cold line.

My question is, do you think that’s good idea? Would I be able to control them using HA? I’m finding conflicting information about the vrf system. I just need something that is energy efficient and reliable and able to be controlled from sensor data. :frowning: Anyone has experience with such a system?

with esp32-s3 and esp32-c3 based devkits you can use USB input (even usb-c) to directly pass UART - you just set uart as gpio 20 and 21 on S3 (on c3 it is 18 and 19) so no need for soldering. I have tested this and it really works.
maybe it can be easier for you, just an idea, you can ignore this if it is confusing

Hi @evlo, that’s an interesting idea. I’ve got this board to test it. But after uploading the firmware and plugging in a cable to the CH340k-COM USB port (see diagram below, the board has 2x USB), I cannot seem to get any connection to uart. I’ve used GPIO 20/21. Any suggestion how to get this working…?

I’m getting this no matter what I try:

use the other usb, the one with ch340k is usb-uart, not direct to esp32, i have used this connection with this board (although purple one c3 version successfully).

I thought yours is S3 because you use gpio 20 and 21, if it is ESP32-C3 use GPIO 18 and 19 (usb d+ and usb d- in the picture you have posted).

1 Like

I hope it is clear from @paveldn response, I do not have unit with MK-QTWIFI-08 neither MK-QTWIFI-05, I might have posted those when I was trying to find info about the protocol AC MCU uses to communicate with wifi chip.

I think you will be able to make it work, but maybe try hOn protocol first and if that does not work change config to smatAir2 protocol, that seems to be in line with latest findings.

BTW here is the link to the connector that is on the AC board side ESP Haier: Haier Air Conditioner + ESP Home + Wemos D1 mini - #486 by evlo Molex 5264

Maybe JST 2.0 in haier wifi board is male (even thought you stick the thing into it, it does have pins, not holes confusing)?

if it is ESP32-C3 use GPIO 18 and 19 (usb d+ and usb d- in the picture you have posted).

Yes that’s working now with a C3, plugged in the normal USB port. Had to switch tx and rx ports so indeed:

rx_pin: GPIO19
tx_pin: GPIO18

Thanks!

Good news!!!
It has worked with the build of the experimental branch.
I used the file esp32-haier-module.yaml, but I changed the mode to .haier-smartair2-base.yaml.

My AC has 6 fan modes instead of the default 4:

  1. Very low
  2. Low
  3. Medium
  4. High
  5. Very high
  6. Auto

Very low mode and very high mode cannot be selected, the rest work perfect.
Is there a possibility to include them?

In the Home Assistant interface there are two options that I don’t know what they are for:

  • Haier AC display: I suppose they are for the split air, to turn the screen on and off where the temperature is indicated. In my case it is a ducted AC, and I don’t see the logic in it. You have a wall screen, but this button does nothing. When it is on the switch stays on, when it is off, it can be turned on or off but it does not act on the screen.

  • Haier AC health mode. I don’t know what it´s for, on the wall screen when I press this button in Home Assistant, it doesn’t do anything.

In the LOGS I see that I get a TIMEOUT for the “F7” command although everything seems to be working, I don’t know if it’s a problem:

[22:57:28][D][haier.protocol:019]: Sending frame: type F7, data: 00 00 00 35
[22:57:28][W][haier.climate:198]: Answer timeout for command F7, phase WAITING_SIGNAL_LEVEL_ANSWER
[22:57:30][D][haier.protocol:019]: Sending frame: type 01, data: 4D 01
[22:57:30][D][haier.protocol:019]: Frame found: type 02, data: 6D 01 00 19 00 33 00 7F 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 09

If you need a log to be able to continue developing this great work, I’d be happy to provide it to you.

Thank you.
I wanted to continue using the cable that is plugged into the board and it is molex 5264 as you say. At the other end, the one that goes to the wifi module, is JST, but I was confused it was not 2.0, but 1.5.

And sorry, when I said JST Female, I got confused, it was JST male, 1.5.

1 Like

The only fan modes for smartAir2 I have is
FAN_HIGH = 0x00,
FAN_MID = 0x01,
FAN_LOW = 0x02,
FAN_AUTO = 0x03
Can you set these fan modes from IR remote? If you can I will need logs where you set those modes from IR (separate logs for each mode). Make sure you have at least Debug log level set.

If you don’t need it just remove this switch. All those configurations are just examples. You need to develop your own config but you can use those examples as a base.

https://www.haierhvac.eu/en/node/1809
AC will use the built-in UV lamp that will additionally clean the air.

Set send_wifi value to “false” it will suppress this command. It looks like ou AC doesn’t support it.

HI! I have the same machine as you, but very little knowledge of how and what to do! Could you help me so that I too succeed in this fantastic feat? What to buy and above all where? You would be very kind, thank you!

Sorry I deleted the old one.
If you already have the AC with a WIFI module, you only need an ESP32 and be able to connect the ESP32 to the cable that is connected to the black WIFI module or to the board, and do the @paveldn programming as I explained above.

Hi @paveldn. I’ve been doing more testing but haven’t gotten much progress.

I raised the log level to “VERY_VERBOSE”.

I don’t have a remote, I have a wall remote, I guess for that matter it’s the same.

I have detected several things:

  • When I change to any “supported” mode the change is reflected in green with the new data, but when I choose either VERY LOW or VERY HIGH, those changes are not seen in the LOG.

  • I have also realized that if I put a temperature that has 0.5 degrees in the wall control, it always detects the one immediately below it, for example if I put 23.5 it detects it as 23. If I put 21.5 as twenty-one …

  • I don’t see any changes when I change send_wifi: “true” to send_wifi: “false”. The same timeout keeps coming out.

  • On the other hand, I cannot remove the display switch and the health_mode switch, if I remove both it gives an error, I always have to put one of the two. The error it gives when compiling is the following:

Hi @lokohck,

Ok, let’s go step by step. Can you send me your configuration? Just base file not my include configs. Of course remove all secret things like passwords, IP addresses, and API keys if you have them. I will prepare the config for you without the display switch and with the disabled F7 command. If you don’t want a health mode switch let me know I will remove it too. Send your config to my email [email protected]

As for 0.5 degrees, I will need logs. You are the first one who is asking this for smartAir2. Just set cooling mode, set, for example, 20 degrees (can be any other integer value), wait 15 seconds, and put 20.5, wait 15 seconds, put 21 - wait 15 seconds. Send me logs of this.

For VERY LOW and VERY HIGH if there are no changes in logs most likely this feature is available only for remote and not for a serial protocol (ESP device).

And so, I got all the necessary components. I dismantled the air conditioner, took out the board and made sure that my JAX ACN 14HE as Haier HSU.
I connected the wemos and the control worked according to the smartAir2 protocol.
I am very happy, but I want more functionality (turn off the buzzer, get the temperature, etc.). I tried the hOn protocol, it did not work, error:

[23:46:31][D][haier.protocol:019]: Sending frame: type 61, data: 00 07
[23:46:31][D][haier.protocol:019]: Frame found: type 03, data: 00 00
[23:46:31][W][haier.protocol:013]: Answer handler error, msg=61, answ=03, err=7

Does this mean that the model does not support the hOn protocol?

I saw in the display module the icon of the wifi without the LED status on board. Later I will put a wemos there and set up the display of the wifi status.

Thanks for the help, it remains to set up automation and enjoy the coolness =)

If for hOn protocol for request 61 you got answer 03 most likely you need to use smartAir2 protocol. Try it.

smartAir2 works, wanted hOn for more functionality. But, as it turned out, after adding the air conditioner to the HA (ESP web interface doesn’t have everything), all the necessary functions appeared. The documentation misled me, or I misunderstood it.

It is not about what protocol we want to use but about what protocol is supported by AC, and usually it is one or another, Anyway glad it worked.

I have great news my pull request was approved by ESPHome maintainers and my component will be the official Haier component for ESPHome. So there will be no need to use an external component to get Haier ac support.

4 Likes