GreeAC-DummyServer
GreeAC-DummyServer copied to clipboard
Multiple gree domains
Hi there @emtek-at, thanks for this tool. I'm having a lot of disconnection issues on my multiple gree units and I'm expirementing with your solution. So far it seems to works great! However, by inspecting the queries of my DNS server, it seems that my AC's are querying multiple gree domains, namely the following as far as I can collect:
me.dis.gree.comme02.as.gree.commegrih.gree.comme04.as.gree.commqtt-me.gree.com
So, mainly, *.as.gree.com and *.dis.gree.com are frequently queried. I have my DNS server rewrite both to the dummy server, however I'd like to ask what's the proper DOMAIN_NAME that I should have for the dummy server in this case, if it matters at all?
Hello, I think you have much newer devices than I do. Unfortunately, I can’t tell you what purpose these domains serve. My setup looks as follows:
Docker Compose for the dummy server:
greeac-dummyserver:
image: emtek/greeac-dummyserver:latest
container_name: greeac-dummyserver
restart: always
ports:
- "5000:5000"
environment:
DOMAIN_NAME: "gree.emtek.local"
EXTERNAL_IP: "172.22.29.1"
It’s also important that you configure the DNS name on the devices using the ConfigTool. The DNS name you set must be the same as the “DOMAIN_NAME” and must resolve to the IP address set in EXTERNAL_IP. You can find the ConfigTool here: https://github.com/emtek-at/GreeAC-ConfigTool
Hi again, thanks for the reply.
So I follow your setup, and ran the ConfigTool. First query confirmed that the AC is using me.dis.gree.com, then I sent it the new domain name to match yours (just for simplicity), and it returned error parsing JSON. However, after querying it again, seems like the AC is using the new domain name indeed:
Device Name: 1e46fef7
Device Remotehost: me.dis.gree.com
-------------------------
1 - query Device
2 - set Device Name
3 - set Device Remotehost
9 - exit
3
new Device Remotehost: gree.home.local
Unhandled Exception: Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Path '', line 0, position 0.
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
at ConfigTool.Program.sendCommandPack(JObject pack, String key) in C:\Users\Ahmed\Desktop\gree\GreeAC-ConfigTool\Program.cs:line 107
at ConfigTool.Program.Main(String[] args) in C:\Users\Ahmed\Desktop\gree\GreeAC-ConfigTool\Program.cs:line 98
PS C:\Users\Ahmed\Desktop\gree\GreeAC-ConfigTool>
PS C:\Users\Ahmed\Desktop\gree\GreeAC-ConfigTool> dotnet .\out\ConfigTool.dll
AC Device IP or 'exit': 192.168.1.113
-------------------------
1 - query Device
2 - set Device Name
3 - set Device Remotehost
9 - exit
1
Device Name: 1e46fef7
Device Remotehost: gree.home.local
However as I'm encountering frequent (very frequent) disconnection of the AC wifi from my network, so I'm still waiting for it to respond while writing this. I have configured my DNS Server dnsmasq to forward gree.home.local to my dummyserver 192.168.1.2, and I'll see if the dummyserver receives any requests.
Meanwhile, while I'm waiting for the AC to get back online, I'd like to ask if there's a way to reset the AC's WiFi and manually connect it to my home network without using the Gree+ app? That could hopefully solve the disconnection issues..
P.S. To confirm my DNS setup is actually working, I curl'ed curl http://gree.home.local:5000 and the dummy server actually showed an output:
pi@homelab:~$ docker logs -f crazy_driscoll
GreeAC DummyServer Started
Domainname for AC Devices: gree.home.local
IP Address for AC Devices: 192.168.1.2
Handle Error: Unexpected character encountered while parsing value: G. Path '', line 0, position 0.
Handle Error: Unexpected character encountered while parsing value: G. Path '', line 0, position 0.
Connection shutdown
Connection shutdown
so I believe everything is setup correctly, just waiting for the AC to get connected and actually start sending requests to the dummyserver.
Ok so I forgot to cut power to the AC. I did power cycle it and I started getting output on the dummyserver.
################################################## 2025-06-12 18:14:32
{"t":"dis","mac":"f4911e46fef7"}
Request: Discover
Response: {"cid":"","i":1,"pack":"x4RFzPtCQysrXixiFlagjp/9rYlUmJc8f7FQ9mtErKkAuJ5iafqfs+tj+vfKwo+W2BTKDf5LrHsSsyGDMbM9Slf7Pl/l+81ZvLdhruafq1T472fFKBM1bMQPA5M9NdeKGLH1i2q6DEMSsvhzjAISLIGSNrDgrLeQV7hgPzQPjQ7gbUS+W7KGUpYGC+AwRpjnI3c/S8ikRXESjofbo+Zci6+Grde66ci1d+DSC9zQ46C4WXVyPz10d65It4sRjUaSRlmvvaFNgRC3/hFDLoNB+w==","t":"pack","tcid":"f4911e46fef7","uid":0}
Connection shutdown
################################################## 2025-06-12 18:14:35
{"t":"pack","i":1,"uid":0,"cid":"","tcid":"asvr","pack":"142l0RFJD81ckcG+73oe5oS/Togb6GKFlPvKSZzG/dwjead2sq6tTSleJsJ2F9jt8pkCo+IYqBoqlMhIRkgl5A=="}
Request: devLogin
Response: {"t":"pack","i":1,"tcid":"","cid":"","uid":0,"pack":"+Hw1S9DJaoIpDH0k8NqbuC7Z9antTA4yEadUhsUPfNKzvTpnRzGko4Y6vOV+atKBnYt7j+6h4iaS/SvCMDoaf+guN0EbKx0yRLPQUMUx5vE="}
################################################## 2025-06-12 18:14:35
{"t":"tm","uid":0,"cid":"f4911e46fef7"}
Request: Time
Response: {"t":"tm","time":"2025-06-1218:14:35"}
################################################## 2025-06-12 18:14:35
{"t":"hb","uid":0,"cid":"f4911e46fef7"}
Request: Heartbeat
Response: {"t":"hbok"}
Handle Error: Unable to read data from the transport connection: Connection timed out.
Connection shutdown
################################################## 2025-06-12 18:17:06
{"t":"hb","uid":0,"cid":"f4911e46fef7"}
Request: Heartbeat
Response: {"t":"hbok"}
However the AC keeps disconnecting from my network. Could it be related to the Connection shutdown in the output above?
Is your Wifi set to only 2.4Ghz, or is it in dual mode? The older models like mine had also connection issues with 5Ghz Wifi. You can also checkout the repo from https://codeberg.org/joserebelo/gree-dummy-tls-server. There is a Dummy Server for models which also talk TLS.
Yes, I configured different WiFi bands with different ssid names just for this reason. I'll try that out, thanks for sharing.
Also, are you aware of any tool that can allow me to connect the AC to my network without using the Gree+ app?