Haier AC integration

I’ve been able to get Haier AC fan into HomeAssistant using HomeBridge and HomeKit Controller integration, without any extra Android devices.

Here’s my setup:

  1. Installed HomeBridge via Docker (location irrelevant, but in my case I’m running Hass Supervised on Debian, used Portainer to install it on the same VM)
  2. In HomeBridge UI went to Plugins page and installed homebridge-haier-ac plugin. Currently version v0.2.1 is installed if that will matter some day.
  3. Configured as per instructions on github page haier-ac-remote/packages/homebridge-haier-ac at master · bstuff/haier-ac-remote · GitHub basically just editing json
  4. In Hass went to Integrations page and added HomeKit Controller, it found HomeBridge
  5. It asked for PIN which is available on first page of HomeBridge
  6. It discovered my AC and now exists as an entity in Hass

The only issue I have atm is that I can only control 1 of my 2 ACs, I started discussion of that issue here: HomeKit Controller and HomeBridge - weird device detection bug?

1 Like

How about installing multiple Homebridge instances?

I’m about to install 4 Haier Flairs and integrate them in HA!

I think it’d be a lot easier on so many levels if plugin author added that literally 1 line change to the code :slight_smile:

I’ve also started working on python version of the remote control. I’ve managed to translate base command functions, connect to the AC and send binary data to it, but I think I’m still missing something. Or maybe there’s some error in generated bytecode.

The point is that code is there, all we need to do is just translate it from JS (TypeScript to be precise) to Python and then wrap it into Hass integration. If there’s someone who knows TypeScript better than me around and interested in Haier integration, we could maybe chat and figure it out together.

2 Likes

I would really love to have this integration in HA. You are doing a great job! Unfortunately I don’t know any JS, so can’t help you with that.

Hope this wil be available soon!

I’ve checked the code lately, but couldn’t find the part when it connects to the AC. A year ago I’ve tried to make it work to connect to it, but couldn’t get it to work.

Did you find the part where it connects? ** Ahh, already found it **
haier-ac-remote/HaierAC.ts at master · bstuff/haier-ac-remote (github.com)

Also mailed back to geappliances.com, and just got a reply that they don’t monitor this email anymore…

Well, as I mentioned I started working on Python version.

I’ve uploaded what I have so far, and you can read about in what state it is here: GitHub - Nixellion/hass-haier-ac: Home Assistant Haier AC Custom integration

I’m not sure where to go from here or how to check if bytecode is correct. Ideally we need someone who can find a way to run original code in full and see what kind of bytecode it produces and compare it to Python’s output to see if they match. Or maybe tell me how I can do that. I’m not good with TypeScript or JS (a bit better with JS and have a friend who knows it better than me, but that’s of no help at the moment), especially making code like that run for testing purposes.

Or maybe someone who can just spot a mistake right away, that should work as well of course :slight_smile:

1 Like

I’ve checked everything, and as far as I can rewrote it in C#, already had 80%. But I cannot get anything out of it :frowning:

Also the orignal developer bstuff didn’t reply on any of the issues. I cannot believe it works for you. Do you also have the “KZW-W002” Wi-Fi stick?

I did not say it works for me. I mean his original plugin for Homebridge does work. But my translation to Python does not. All I managed to do, apparently, is break some kind of command queue or whatnot :smiley: So all I managed to do is establish a socket connection to AC (that’s the easy part) and then send “something” to it that mostly seems to resemble what Homebridge plugin does, but it’s missing something.

I’ll check the stick tomorrow.

Yes, I did mean the Homebridge, so we know it SHOULD work. So hopefully we have the same Wi-Fi stick and can get it to work… Will await your reply :slight_smile:

Well, this is all I have on the stick:

image

That and a MAC

Hmm, I see that this is a completely different thing:
https://www.yoycart.com/Product/594203655074/

KZW-W002:
Haier WiFi module usb voor Airco smart controle KZW-W002 | CVkoopjes.nl

They might be somewhat compatible. But unfortunately I’m getting nothing.

Not sure where you’re looking at, but mine looks nothing like the first link you posted, it looks exactly like the KZW-W002

I’ve search for “V98533” and found that, but I see that is used in more places at Haier.

Looks like mine is V98527
image

That’s more like it. Could be different revisions of the same thing.

If you AC use el KZW, you can use my project to replace with a Esphome

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

Hi Michael.
I’m trying to add my Haier AC conditioner (dual split) with your guide.
In home bridge I set and find one split , but when I try to send a command (from home bridge or homekit) it return an error:

[10/9/2022, 5:31:59 PM] Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
[10/9/2022, 5:31:59 PM] Got SIGTERM, shutting down Homebridge…
[10/9/2022, 5:31:59 PM] [Homebridge UI] [HapClient] [192.168.1.204:51401 (0E:87:D0:4C:C6:49)] Failed to set value for AC Notte.
[10/9/2022, 5:32:03 PM] Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
[10/9/2022, 5:32:05 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[10/9/2022, 5:32:10 PM] [HB Supervisor] Restarting Homebridge…
[10/9/2022, 5:32:10 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution

The configuration homebridge is this:

{
“bridge”: {
“name”: “Homebridge C649”,
“username”: “–:–:–:–:–:–”,
“port”: xxxxx,
“pin”: “xxx-xx-xxx”,
“advertiser”: “ciao”,
“bind”: [
“br0”
]
},
“accessories”: [
{
“accessory”: “HaierAC”,
“ip”: “192.168.1.65”,
“mac”: “------------”,
“name”: “AC Notte”,
“treatAutoHeatAs”: “fan”
}
],
“platforms”: [
{
“name”: “Config”,
“port”: xxxx,
“platform”: “config”
}
]
}

Can you help me to find where I’m wrong?
Thank in advance.

Having the same issue, have you solved it ?

No one answered me with any solution, until now…

Thank you!!!
It is working. I didn’t believe that this can work but it is working. There is no any special settings. Everything as you described, Providing IP and MAC address in Homebridge is sufficient to start this working. Homebridge is automatically discovered by HA. Adding secret code, restarting HA and it working!
For me doesn’t work HEAT mode, but AUTO mode is working so it can be also used for heating.
I have Haier Tundra AC which is not supposed by HOn app so I couldn’t use such integration. Previously I used Broadlink remote and it worked, but direct control of AC is for sure better.

This clearly appears to be a third party support thread, not a Feature Request.
Thread will be moved to third party topic.