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

Hi Everyone, Ive been working on this a little more and ended up rewriting a huge part of the current integration. I now have purify, self clean, steri clean, sleep, boost, quiet, display controls, and remote lock all working. Ive also worked to further the reverse engineering the communication messages.

Testing and feedback welcome. Timers and wifi light control are the main things i know are missing as of now.

4 Likes

Great work Ivo!

I did do some reverse engineering, although I couldnā€™t get it to work to send any changes back. But maybe you have something of my ā€˜bitmapā€™ here:

If not, no problem, checking for a minute canā€™t hurt.

I never used the integration you are working on, but might do in the future as i would like to do some automation with it, like drying when itā€™s > 80% relative humidity. Or using another temperature sensor not in the airco itself.

Interesting, I hadnt seen your project till now, I didnt realize it would be so easy to sniff it from the network side of things! Quick glance at things shows that the network packets in your project seem to start with the temperature at byte 92, and in the uart side of things in my project they seem to start at 12. But they look to be the same or very similar!

Try the self clean, lock, unit bits on yours, they should work. Look at the haier .h and try some bits to see if they work for you!

Are you sure that byte 104 is humidity (byte 24 for me)? I have that marked as unknown in mine, i was thinking it might be the outside temp or something.

Edit: Just tried misting some water around the ac while it was running to see if byte 24 will change, it did not. I see a value of about 70 decimal that goes to about 63 when running in heat mode (makes sense as the outside unit will get colder) with an outside temperature of about 0-5c.

It WAS easy until they killed it, or until the first firmware update was done because it lost the power.

Since then you first need some initialization or something before you can sniff anything. Connection will be killed when you donā€™t, or something.

Havenā€™t been able to make any working connection with it from my local LAN. It would be so nice if it would just work with the official adapter :grimacing:

Have you looked inside your dongle to see what chipset its using? If its esp based, reflashing it should be easy, no need to use the official firmware since we already know how to control all the functions, plus that keeps everything local instead of it pinging home to haiers home servers.

Hi all,

Further to my earlier post, Iā€™ve determined the cause of the lack of RX.

On Wemos 3.0 boards, the serial driver has an extremely powerful pull up resistor that the air-conditioner cannot overcome.

After testing with BSS138 the issue remained, but looking into things further I couldnt understand why the SN74 worked and resolved the issue while the BSS138 logic shifting did not.

All in all - to anyone else having problems, do NOT buy D1 3.0 boards - buy the older style modules with the soldered-on ESP module. They donā€™t suffer from this issue on their serial line.

I ordered and tested these older modules - worked perfectly and immediately with the BSS138 handling logic shifting.

@ceriel I suggest you try older boards if you did not already resolve your issues.

Cheers

1 Like

Now struggling with the same setup of wemos D1 mini v3.0 and BSS138-based shifter and the same symptomatic (no TX from AC). Whereā€™s the pull-up resistor you mentioned is located? Maybe we can replace it with the lower-valued resistor or add the pull-down on the hi voltage (AC) side to reduce the current needed to pull the line down?

@bearpawmaxim I personally didnā€™t look into it greatly, I researched around and found that it was part of the USB-Serial chip circuit on the board.

Namely I concluded it from this NodeMCU ESP8266 not respond AT - Everything ESP8266

There were other sites too with mentions of high pull.

I did try reply and find out transistor values as my electronics skills arenā€™t what they once were, but thereā€™s a schematic for a potential solution on that forum post. Only unknown is what transistors to try.

The software part. Have implemented the solution where the software uart (by esphome) is used on D6(RX) and D7(TX) pins but still canā€™t get the transmission from ACā€¦ Sniffed the communication, and saw that the Wemos sends a ā€˜POLLā€™ command and AC responds to that command with bytes, but that bytes is not arriving to Wemosā€¦

About hardware. I am using Sparkfun BSS138 level shifter on both RX and TX lines and canā€™t get the RX even when crossing the RX and TX lines with each other.
Also, have tried the divider on RX line like in the original Installator schematic https://blog.instalator.ru/wp-content/uploads/2016/07/db844688b6cc4090baa37009173340c8.jpg with no luck (and no RX :grinning: )ā€¦
The strange things is happening with this Wemos clone, so I decided to build the the iot-uni-dongle board https://github.com/dudanov/iot-uni-dongle

P.S.: a sniffer that was mentioned earlier in my post is built on ESP32 Nodemcu board with the same Sparkfun BSS138 level converter and is receiving data from BOTH RX AND TX lines successfullyā€¦

Hello, Iā€™m using zigbee for most of the ā€œsmart homeā€ things, and all the things I want to actually use. Unfortunately no luck so far with haiers ACs. Do you know if it is easy to modify the code from esp home to zigbee? Did anyone succeed with it in the past? Is this the thing DNIGEF ZigBee Conversion Serial Port TTL Uart Wireless PA Module CC2530+CC2591|Integrated Circuits| - AliExpress that I need?

Especially with currently rising electricity prices and as I use AC mainly as heat pump it would be nice to have some usable integrations, not what is in hOn or smartAir2 or in my case if some units use one app and others different, which makes it unusable really.ĀØ

Zigbee Configurable Firmware v2.5 ā€“ Zigbee Hobbyist. Rock Pi 4 SBC is this relevant?

I believe it wouldnā€™t be suitable for controlling an ac, i fear certain features would not be natively supported by zigbee and youd have to workaround to make it work. I believe ZHA has support for zigbee thermostats, but youd have to figure out workarounds for everything else the ac can do.

If you wanted to do that, youd need to make a ZigBee device that translates ZigBee commands to the custom serial commands the AC expects. I have not seen many examples of custom zigbee devices.

If you have a wifi network, why not use esphome?

Hello! I understand that you are the last enthusiast who brought this firmware to mind, please tell me, I can use it in my esp8266 (esp-01s) board?

Yes, i currently use it on an esp01 board, i took the stock pcb, tapped into the 3.3v, gnd, rx, and tx from it, and tied its en line to disable the factory esp32 on it, then i had just enough room to squeeze the esp01 in there with the factory pcb.

Do you have a telegram? I would like to get some advice from youā€¦

Hi everybody. I have 3 Haier Flexis that i currently integrated in my Home Assistant using 3 ir smart remote (rm4 mini). The remote are working great but i hate this solution due the missing feedback from the AC unit. Iā€™m trying to replace those using ESP Haier but unfortunatelly without any luck. I Tried both @MiguelAngelLV and @albertaCOM code using an ESP8266 D1 mini. I even tried using level shifters on both RX and TX without any luck. I keep seeing only POLL messages without any answer from the AC itself.
Any suggestion on what can i try next?

It helped me to run from all, only this https firmware: https://github.com/Oksion/esphaier, check itā€¦

@ivoh95 Any chance to add position settings? Currently I added esp32 to the original module, it works but the original app give only a preview of a state, I cannot control unit anymore using hon as itā€™s ā€œfightingā€ with the added esp module. It would be perfect to be able to set specific position rather than swing.

1 Like

@ivoh95 Iā€™m using your code on an esp01 connected to the original esp32 board. If I disable the original board (using the EN pin) I donā€™t receive any status message, if I leave the board enabled I can read the status but canā€™t control the AC. Any idea?

Yesterday I finally tried this, found wemos d1 in the drawer, unfortunately version with no antenna, installed python, esphome, did esphome run stuff from original post, data are correctly read from the AC.

1 Like

Iā€™ve tried multiple versions (ivoh95 and albetaCOM) with an ESP32-DevKitC V4 with Haier Tundra Plus, also switched RX and TX to test, but doesnā€™t receive any correct messages. Next step is trying to spy on the messages.

Or maybe it is because of single/multi core?