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

I have connected it correctly, I think. Look at attached picture.
Looks like something wrong with firmware for my Haier AS25NHPHRA :frowning:

Hi, If you already checked the TX and RX are connected ok (TX -----> RX and RX <---------- TX) then the next thing I would do is to sniff the protocol between Wifi Module and the Haier Unit.

Once you’ve got it soldered all you have to do is take 2 ftdi cables (serial <-> usb) and connect the each one of the rx of the cable to the wifi module.
On your laptop then you’ll be able to see the communication between wifi module and the haier unit

WifiModule sniffer

I hope it helps.

Let me know if you have any doubt.

Hi,
@albetaCOM , How can we communicate in a non-forum? Mail or Telegram?

Yes.
Do you have any issue with the repo? You can create an issue to the repo aswell.

You have a fork of the repository, it is not possible to create an issue there. Find me in telegram @instalator

Thanks @albetaCOM

I’ve prepared an USB extension cable, cut it, soldered pins to it. Hopefully it will also work this way. Now (still) waiting for the FTDI. :innocent:


@albetaCOM

We have followed your configuration (except removing the comment in front of the baudrate).
The Haier aircon can be used to set the temperature and use the cool or auto function, however we do not get the current temp and the off mode does not work.

In the log files of the wemos, there is only a POLL command shown. To exclude any wiring issues we used a second wemos and same result here, so in our opinion we wired correctly and because the temp can be set the unit is functional.

Any thoughts on the OFF mode and current setpoint? We tried the old Haier.h but nothing works there so the unit must be on latest firmware.

Hi @ceriel,

I’ve been doing some changes in order to work with the AC modes. As in the Haier there are more modes than the ESPHome climate components what I’ve done is when selecting Auto mode in the climate component it will put the Haier in Fan mode so the mode available are:

  • Heat
  • Cool
  • Fan

Also, when doing the changes I broke something related to turning on the unit, but it is working now. Can you test it with the last commit?

I also update the yaml file to be the same it is working with my devices.

Let me know if the last version works with your unit.

@albetaCOM,

Thanks! Somehow the transmit works, but the receive does not.

[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][climate:010]: 'Haier' - Settinge
[D][climate:014]:   Mode: COOLe
[D][Control:235]: Control calle
[D][Control:241]: *call.get_mode() = 2e
[D][Control:245]: POWERING ON THE A/Ce
[D][Haier:345]: Message sent:  255 255 12 64 0 0 0 0 0 1 93 1 0 0 171 125 58  - CRC: AB - CRC16: 7D3Ae
[D][Haier:345]: Message sent:  255 255 20 64 0 0 0 0 0 1 96 1 0 8 37 0 2 3 0 6 0 12 250 36 160  - CRC: FA - CRC16: 24A0e
[D][Control:306]: COOL MODE SENT!!!!!e
[D][climate:172]: 'Haier' - Sending state:e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][climate:010]: 'Haier' - Settinge
[D][climate:014]:   Mode: COOLe
[D][Control:235]: Control calle
[D][Control:241]: *call.get_mode() = 2e
[D][Control:245]: POWERING ON THE A/Ce
[D][Haier:345]: Message sent:  255 255 12 64 0 0 0 0 0 1 93 1 0 0 171 125 58  - CRC: AB - CRC16: 7D3Ae
[D][Haier:345]: Message sent:  255 255 20 64 0 0 0 0 0 1 96 1 0 8 37 0 2 3 0 6 0 12 250 36 160  - CRC: FA - CRC16: 24A0e
[D][Control:306]: COOL MODE SENT!!!!!e
[D][climate:172]: 'Haier' - Sending state:e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][climate:010]: 'Haier' - Settinge
[D][climate:014]:   Mode: OFFe
[D][Control:235]: Control calle
[D][Control:241]: *call.get_mode() = 0e
[D][Haier:345]: Message sent:  255 255 12 64 0 0 0 0 0 1 93 1 0 0 171 125 58  - CRC: AB - CRC16: 7D3Ae
[D][Control:267]: No need to update mode OFF (0)e
[D][climate:172]: 'Haier' - Sending state:e
[D][climate:175]:   Mode: OFFe
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][climate:010]: 'Haier' - Settinge
[D][climate:014]:   Mode: OFFe
[D][Control:235]: Control calle
[D][Control:241]: *call.get_mode() = 0e
[D][Haier:345]: Message sent:  255 255 12 64 0 0 0 0 0 1 93 1 0 0 171 125 58  - CRC: AB - CRC16: 7D3Ae
[D][Control:267]: No need to update mode OFF (0)e
[D][climate:172]: 'Haier' - Sending state:e
[D][climate:175]:   Mode: OFFe
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e
[D][Haier:157]: POLL:  255 255 10 64 0 0 0 0 0 1 77 1 153 179 180 e

We are using a wemos d1 and have soldered it correctly (we think… :slight_smile:).
Any idea what to check?

@albetaCOM, tried different modules and edited the code but the read does not work. Got my own Haiers today and I can operate them but the current mode and temp is not read. Any idea what i did wrong?

Hi @ceriel, sorry I didn’t answer before, I was on vacations, technology free :sweat_smile:

So, it seems you are able to send commands correctly but not receive anything from the Haier unit. This is weird because it means the TX and RX line are correct.

The USB is just a connector, right? Like the one on the picture:

I show you my diagram in case it can helps in any way.
Untitled Diagram

Tech free vacations are the best :slight_smile:

I used a cable (USB > micro-usb), that should work right?

Hi @ceriel, you mean you just cut the micro-usb part and soldered to the WeMo, right?

If that is the case it should work. Just check the Rx wemo cable part… It seems you are able to tx but not to Rx.

A post was split to a new topic: Help decode protocol of Ciat split system unit with OSK-102 wifi module

I’m sorry for the stupid question, but how\with what do I flash files from github as a firmware on d1 mini? I’ve never worked with esps before

You need use ESPHome https://esphome.io/

1 Like

Thanks!

Well, been trying for about a week on and off now, and can’t quite figure it out so far. I mean I got to the point where firmware is uploaded. Then I get this error:

Traceback (most recent call last):
  File "c:\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python38\Scripts\esphome.exe\__main__.py", line 9, in <module>
  File "c:\python38\lib\site-packages\esphome\__main__.py", line 554, in main
    return run_esphome(sys.argv)
  File "c:\python38\lib\site-packages\esphome\__main__.py", line 541, in run_esphome
    rc = POST_CONFIG_ACTIONS[args.command](args, config)
  File "c:\python38\lib\site-packages\esphome\__main__.py", line 324, in command_run
    return show_logs(config, args, port)
  File "c:\python38\lib\site-packages\esphome\__main__.py", line 202, in show_logs
    run_miniterm(config, port)
  File "c:\python38\lib\site-packages\esphome\__main__.py", line 89, in run_miniterm
    with serial.Serial(port, baudrate=baud_rate) as ser:
  File "c:\python38\lib\site-packages\serial\serialwin32.py", line 31, in __init__
    super(Serial, self).__init__(*args, **kwargs)
  File "c:\python38\lib\site-packages\serial\serialutil.py", line 240, in __init__
    self.open()
  File "c:\python38\lib\site-packages\serial\serialwin32.py", line 78, in open
    self._reconfigure_port()
  File "c:\python38\lib\site-packages\serial\serialwin32.py", line 220, in _reconfigure_port
    raise SerialException(
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)

Not sure if it’s relevant or not.

But after this or after unplugging\plugging micro usb it does not connect to wifi. At least I don’t see it in the devices or arp lists on my router. Is it supposed to connect to wifi without being connected to Haier AC? Or is it normal that it does not connect yet? I just did not want to proceed to soldering before I’m successful with this first step.

Here’s my current config. I did try original one without alterations (well, wifi ssid and password obviously), tried commenting out baud rate line, and finally tried to make new config with wizard and copy some stuff over =(

esphome:
  name: haier_room2
  platform: ESP8266
  board: d1_mini
  includes:
    - Haier.h

wifi:
  ssid: "ssid"
  password: "pass"
  manual_ip:
    static_ip: 192.168.1.60
    gateway: 192.168.1.1
    subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Haier Room2 Fallback Hotspot"
    password: "pass"

captive_portal:

# Enable logging
logger:
  level: DEBUG
  baud_rate: 0 #Important. You can't use serial port
  
# Enable Home Assistant API
api:

ota:

climate:
  - platform: custom
    lambda: |-
      auto haier = new Haier();
      App.register_component(haier);
      return {haier};
    climates:
      - name: "Haier"

Hi same problem here. I Tried with protocol of miguel,albeta and v2 albeta.it doesn’t works.
No receive data from ac.
I tried to chance usb cable and invert tx/rx with no luck.
Any help will be appreciated
Thanks

We have two Haier AD25S2SS1FA 's. These units do’nt have an USB port. Haier sells the KZW-W001 as Wifi option. Is this solution also possible for this unit?

On the motherboard there are different connections, see also https://airco.wasco.nl/wp-content/uploads/2020/07/Haier-Technisch-Handboek-2020-EN.pdf

I wrote a suggestion for better home automation integrations to Haier customer support. They redirected me to official GE Appliances site and encouraged to share my ideas. I have already created topic:
https://cocreate.firstbuild.com/u/scrapid/idea/m95ckcru2bzgumi3gjgfzuxr9
I think they follow topics popularity, likes, comments. So let’s request simple changes from Haier if you miss some features