Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiFi registration helper & fake heartbeat server #131

Open
markv9401 opened this issue Sep 21, 2022 · 6 comments
Open

WiFi registration helper & fake heartbeat server #131

markv9401 opened this issue Sep 21, 2022 · 6 comments

Comments

@markv9401
Copy link

Is your feature request related to a problem? Please describe.
For me, a 2022 series Syen AC owner, it is a problem. Without a heartbeat server the HVAC unit will eventually 'reset' itself and lose the app / HA.

Describe the solution you'd like
Based on existing solutions, repositories and some WireSharking I've hacked together my own solution that does not require letting the HVAC unit connect to the actual WAN internet at all, ever.

Additional context
Do you think it'd be feasible to try and merge a fake heartbeat server into this integration? I don't believe it should be too difficult and it could be useful not having to run it separately. Please take a look at it ( https://github.com/markv9401/Fake-Gree-server ) and if you think it could be useful, I'd happily try to merge it into the server in a PR. Thanks!

@maciejtarmas
Copy link

While that would be in fact useful, your solution doesn't work for my 3 Cooper & Hunter units (basically another Gree brand). Emtek's does.

I don't know what the code actually does, but I noticed that you're exposing port 1812, when most known Gree variants connect to port 5000. Changing the port in your implementation doesn't do anything in my case though.

This might need more investigation.

As to WiFi registration, I wouldn't bother. You can spin up the fake heartbeat server, block all outgoing WAN traffic from the unit, reset it and try to register with the app again. The app will tell you that it failed (because it can't talk to China at this point, obviously), but the AC unit will keep the WiFi credentials that you entered.

@markv9401
Copy link
Author

Sure thing, I don't mind, just thought it could be useful.
Port 1812 explanation: During the initial registration process (when you reset WiFi and first log in to Gree servers) it uses an apparently burnt-in domain and port, 1812. The response to this requests contains the servers used in further requests, including the port. That usually (exclusively?) ends up being port 5000. But it works just fine, the HVAC unit will work with whatever port it receives in the response. So by trying to include registration and changing the port to 1812, you essentially need a single port not 2 of them.

@rapi3
Copy link

rapi3 commented Mar 10, 2024

just to let you know how I solved, my Gree AC it is already initialized and connected to my wifi using android Gree app and I did not wanted to repeat the steps as I don't have the app installed on phone.

  • sniffed dns request used from Gree AC => eu.dis.gree.com
  • in dns server I override sniffed domain with local IP LAN computer that run python script.
  • made python script to run forever when computer boot - I do not use docker.
  • restarted HA and Gree AC.

Now HA integration it work without reinitialize Gree AC wifi using fake server

@Obscurax
Copy link

Obscurax commented Jul 1, 2024

I've tried this but it does not work with, Vaillant WiFi Adapter VAI8/5-i.
Note that this device is supported since encryption v2 is supported.

I've set up https://github.com/markv9401/Fake-Gree-server
Also tried https://github.com/emtek-at/GreeAC-DummyServer

A few minutes after traffic is blocked from the AC to outside the connection between the AC and HA is lost.
It'd be nice to find a way to block all home calling.

@jodewee
Copy link

jodewee commented Jul 1, 2024

e that this device is supported since encryption v2 is suppo

I have about the same (bulex vivair, but basically the same)
no need for fake gree server.
just add the v2 encryption method in the config.yaml

@Obscurax
Copy link

Obscurax commented Jul 1, 2024

e that this device is supported since encryption v2 is suppo

I have about the same (bulex vivair, but basically the same) no need for fake gree server. just add the v2 encryption method in the config.yaml

Sorry but this is not about the component not working. Which it does.
It's about blocking home calling from the AC to the Gree servers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants