Working on integration for Hisense AEH-W4A1 module

Tags: #<Tag:0x00007f77fb85fb68>

Hi all,

I developed a component for a wifi module manufactured by Hisense and used in many other AC brands.

Python library and HA component

It’s the AEH-W4A1, compatible with android apps manufactured by Smart Air Conditioner like Hi-Smart Life

My component uses local polling, so it is faster and more reliable than original app which is based on china servers polling. The serial protocol used (raw incapsulated in tcp data and sent directly to AC on port 8888) is called XMV and there are few sources about it, mainly on Github.

Other wifi modules like AEH-W4B1 and AEH-W4E1 use different applications, relying on other IOT cloud systems. Perhaps at the local interface level they could be compatible, responding to the same serial protocol, but it need someone trying to use my library with them.

I am in the final steps before submitting it for PR, but if someone can test it to improve code and logic could be very useful.

P.S. I am not a programmer and my level of English is very poor, so I ask you to turn a blind eye and help me in both!

1 Like

Ciao, mi pare di capire che sei Italiano, e questo mi facilita la domanda!
Ho 3 condizionatori Hisense con modulo AEH-W4B1.
Secondo te ci sta un modo per integrarli in Home Assistant? Non sono riuscito con la repo https://github.com/deiger/AirCon/ poiché non sono pratico con MQTT. Hai qualche suggerimento? Grazie!

Mi spiace ma il modulo AEH-W4B1 funziona in modo totalmente diverso e non ho mai avuto modo di metterci mano.
Se hai android puoi installare l’applicazione Packet Capture e catturare il traffico tra l’applicazione e i condizionatori quando sei in rete locale. Se mi invii il file di cattura (in formato txt, non pcap) posso cercare di capirne il funzionamento.

Please, you two, speak English.

I have an AC which I guess uses this module, I don’t have the module but I’d like to wire there my own microcontroller (ESP), etc. This info can be useful for me, will have to send it thru Google Translate though…

I can’t tell you anything about the physical layer, but I have identified the serial protocol used to send commands through the wifi module, called XM, and partially decoded it. Unluckily it’s hard to find any documentation about it; you can start from my library page pyaehw4a1.

Buy you can also buy a wifi module, connect a digital oscilloscope between the module and the conditioner, configure the module with its application and return the module after a few days :wink:

That’s impossible here in Argentina.

And
a) it’s quite expensive here
b) supplier doesn’t even guarantee its gonna work as expencted since my ac re-branded has a different brand.

Thanks, I’ll keep watching if anybody finds info on the serial protocol to ping me.

Hi Guys,

I own couple AEH-W4E1 modules and would like to participate in integration development.

Here some info I found:
Port 8888 not available.
The only opened port on module is tcp/80 which respond as web server but do show just empty page “Page not found” , with correct URL it might show some info or it’s port for local management protocol

I also tried to connect module directly to FTDI serial port,
Module started connected to wifi but I could decode any output.

If you have any ideas how to further use module for reverse engineering please give me a hint

I also tried to sniff traffic of official app, but it’s only polling cloud server on HTTPs. no local communication with modules.

If you have a router or AP capable of sniff traffic (e.g. Mikrotik, Ubiquiti, Cisco) you can capture traffic between the ACs and remote server (or official app, if any).

Otherwise you could make a MITM using a PC with two network cards, connected on one side to an AP dedicated to the air conditioners and on the other to the router. If you are lucky and the traffic is not encrypted - as in the AEH-W4A1 model - you should find out everything you need :wink:

Most likely the AEH-W4E1 module you own works in a more modern way than the AEH-W4A1, since the later model AEH-W4B1 already communicates with the servers via JSON.

I have ASUS router I don’t think it has internal capability to sniff traffic.
I used android apps to sniff traffic but it’s encrypted with HTTPS and Application checks own SSL certificate and blocks communication if sniffer use MITM technic to intercept HTTPs .

The only way to sniff it is decomplile app and replace certificate, but I never done it and don’t have time to master this :slight_smile:

My idea is to discover if traffic between ac and server is encrypted

hi are there any news about the project?
I also have AEH-W4A1 module and would like to integrate with Home Assistant, if it can be useful I can test. thank you

AEH-W4A1 integration is here since HA 103.0; lastest library bump is in HA 105.0 to improve single AC support and general stability.

Hello Alexei @Alt below python script and I have already tried it and it works wifi module AEH-W4E1

https://github.com/deiger/AirCon

maybe with Davide @Davide_Varricchio could help understand how it works and then create a home assistant module.