tomikaa87 / gree-remote Goto Github PK
View Code? Open in Web Editor NEWSimple remote control utility for Gree Smart air conditioners
License: GNU General Public License v3.0
Simple remote control utility for Gree Smart air conditioners
License: GNU General Public License v3.0
Hi, recently we've had some Sinclair AC units installed at our house.
They also support some form of control over WiFi. I'd like to integrate them into OpenHab, but I'm not nearly experienced enough to make my own binding. So I'd like to ask, would it be possible to add support for this Sinclair unit?
I can provide any info you may need (as long as it doesn't require disassembling the AC).
I already tried the python script you made but it doesn't find it (I ran python gree.py scan -b 255.255.255.0
).
Before you dismiss this... I have a few reasons to believe your code might need very little modification to work with this brand.
When enabled using the AC remote, it makes a WiFi hotspot with a random name and the password 12345678
. Connecting to it allows to use their app called WiFi Smart. This works only as long as the user is connected to the AC's WiFi. The app has an option to make an online account and I assume that would allow the AC to connect to your home WiFi network and be controlled even over the internet (I haven't tried that because I would prefer not to create such an account.)
I connected to the AC's WiFi using one laptop, bridged it to its Ethernet, connected another laptop and made a WiFi hotspot. I then connected my phone and could control the AC while capturing the packets exchanged between the phone and the AC on the second laptop.
voila
The phone constantly sends UDP packets to port 7000, address 255.255.255.0.
The features are almost identical.
Hi,
i have existing AC device which i want to use on another WIFI network,
the new WIFI has different IP range
i was able to reset the WIFI settings in the device using the remote control, and was able to command it to connect with the new network(using simple hyper terminal), that's works fine, i can ping it on the new network, it answer to {"t": "scan"} , so far all good.
i tried to send commands using the know unique password I have used so far, he's not answering ,
it not responding to binding command with the default AES password key either.
seem that he kind of stuck with the previous binding, any one seen something like that before?
tnx
Moti.
Hello,
I can successfully register my AC with the "guest wifi" of a FritzBox, for example:
ssid: "Guest", pw: "1234ABCD"
But I am not able to register my AC with either the main wifi or the guest wifi with a significant longer password (30-40 characters). The response is always
resp={'t': 'ret', 'r': 200, 'mac': 'mac1234'}
The wifi AP of the AC shuts down and comes back up after a few moments.
Are there any restrictions? Or any ideas? I do not want to change my wifi password to a shorter one (this could weaken security and also I am too lazy).
Kind regards,
Daniel
Hi
I’m trying to use a Python version on linux. I try to discover my AC in the network but it returns nothing.
python3 gree.py -b 192.168.2.255 search
Searching for devices using broadcast address: 192.168.2.255
Search finished, found 0 device(s)
I used tcpdump in my network. It seem that it produces correct request as described in documentation but my AC does not answer.
I captured also communication between my AC and some server (I guess in China) which happens when I’m controlling my AC from Android app. The messages looks also as you describe in the documentation. However, it uses TCP (not UDP) and uses port 64065 at AC side.
I tried also port scanning in my network and played with ARPs. AC replies to ARP. But seems not to have open ports at all.
Tried also to modify a bit gree.py to use actual MAC and IP of my device (instead of broadcast). Also nothing.
My AC communicates with Android app without any problem.
Do you have any idea of what I’m doing wrong?
It's only support my KFR-35GW ,which firmware version is V3.31,doesn't work for KFR-26GW,which firmware version is V2
Hey,
I have recently setup a gree air conditioning system and wanted to combine it with some android skills of my own.
I've checked out your code and and ran it only to have no devices and no response on the discover method.
Could you please provide me with a few simple steps on how to setup the connection between the app and the device?
I believe there is something silly and simple escaping my reasoning :)
Remarkable job gathering all this information under this repository!
Kind regards,
Hello All,
I am having a bunch of esp8266 room thermostats in my flat.
I wuld also like to make them controlling my airconditionig system.
I did a quick try on this already, but to be honest, I am not experienced enough on encrypting.
Are you able to help me doing this?
Thank you very much in advance!
All the best,
Gábor
I've found few extra statuses which can be requested (changed?):
SlpMod: 0,
AllErr: 0,
host: 'eu.dis.gree.com',
name: 'Livingroom conditioner '
Those statuses were found in SQLite DB of EWPE Smart iOS APP.
Data form "deviceTable" table:
Where can I find the list of params that my AC provides, and an explanation what each parameter does?
A thousand thanks for this, I love this CLI utility. I will buy You a beer if I ever meet You.
Hi! Thank you for the your documentation that is very useful and well explained. I'm trying to interface the gree system via Python but have some issue probably in the requests.
The discover works perfectly and I receive the answers from all splitter but I'm not able to bind any of the five devices.
So, the question is, reading the documentation you wrote about MAC Address that I should use in the tcid and mac fields but when I try the discover I receive different values for these fields.
So, which one I've to use?
The answer on discover in my case is:
Received from ('192.168.0.81', 7000): {"t":"pack","i":1,"uid":0,"cid":"f4911e6fcbdf","tcid":"dc26211e39c8","pack":"LP24Ek0OaYogxs3iQLjL4FxcFMarR4aGOyo8RK7I2p6Ma9lM2RqI/KytvJ32IsGSZXrOr+MakVzzXHbghPeyijnWMzaLQaaw1aFXlE9k71L0cMm8bsr/y4FkxumpRg1tKs/34xhBuMSxXfNfvEgS5yy17SnLfjPrNMTsp5oXbJ1zMQoS41XpnORSG7+GfavhnKYbt0iIDsdp8/ftXlA9HjiRRKlroAV17fdfFvf6AtK80gq9HxK8Loa8WXVjgZcP4Vf5MjKxa60Xt5J1oI+lsxUuXTHkgunLg76WWGy+euo="}
Decoding the pack I have:
{"t":"dev","cid":"f4911e6fcbdf","bc":"000000000000000000000000000000","brand":"gree","catalog":"gree","mac":"f4911e6fcbdf","mid":"10001","model":"gree","name":"1e6fcbdf","series":"gree","vender":"1","ver":"V1.2.1","lock":0}
So we have these values:
cid: f4911e6fcbdf
mac: f4911e6fcbdf
tcid: dc26211e39c8
The question is, which one and in which field I've to use to do a right request?
In any combination I try I didn't get an answer...
Thank you!
Hi there!
I'm using this MQTT Bridge to control my AC (through nodered btw, but that has nothing to do with the error)
https://github.com/stas-demydiuk/ewpe-smart-mqtt
Since this morning, I cannot use the mqtt bridge, due to this error that it gives in the terminal when I run "npm start" in the ewpe-smart-mqtt::
(node:3635) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit
What should I do?
I tried to search for how and where should I set it to infinty (emitter.setMaxListeners(0)), but I have no idea which file should I edit.
Also I read that this message is not strictly generated because it runs out of places for listeners, it could also indicate some sort of code error.
I've read somewhere that the code might not release listeners, when connection lost, so when it reconnects the mqtt, it just adds another listener...so it might be a "not-perfect-wifi" connection between the AC and the router, therefore the mqtt, so it always creates a new listener, and that fills up quickly...
Can you help me here?
Just for information :) I went through the wifi capture, got the base packet json and from there google got me to your project. Both of my AC-s are talking to me nicely now :) Thanks!
Hi,
So, as mentioned here already, I used this great GitHub with it's info to build from scratch my PLC code,
my code does :
--> connecting to WIFI
--> get's the unique key
--> send operation commands,
--> ask for current status
and I'm polling status from the AC units every ~5 sec, i have in my home 4 AC units.
I've seen that sometimes, at the moment not sure exactly why , the AC unit not respond to status request, but it does do any command I'll ask ,so it's not general communication problem.
My units are having version V1.1.13, they are 5 years old. and I'm wonder if it worth trying upgrade their FW.
Any one has any experience with such behavior?
cheers!
The values for SwingLfRig are
Partial swing doesn't seem to be supported
Figured out on Cooper&Hunter AC by setting swing via "Wifi smart" iOS app and then reading AC status via Gree protocol.
Hi @tomikaa87 , @alexiade ,
Below is the JSON procedure for Get & Set the clock on device. Would be nice if you update the documentation on README.md .
Procedure works for me (i am using a simple python script to control the air-cooler, will publish it later)
##
## get time
##
* send
{"cid":"app","i":0,"pack":"<encrypted_pack>","t":"pack","tcid":"f4911e343545","uid":0}
pack = {"cols":["time"],"mac":"f4911e343545","t":"status"}
* receive
{"t":"pack","i":0,"uid":0,"cid":"f4911e343545","tcid":"","pack":"<encrypted_pack>"}
pack = {"t":"dat","mac":"f4911e343545","r":200,"cols":["time"],"dat":["2018-05-11 19:42:01"]}
##
## set time
##
* send
{"cid":"app","i":0,"pack":"<encrypted_pack>","t":"pack","tcid":"f4911e343545","uid":0}
pack = {"opt":["time"],"p":["2018-05-11 19:29:38"],"sub":"f4911e343545","t":"cmd"}
* receive
{"t":"pack","i":0,"uid":0,"cid":"f4911e343545","tcid":"","pack":"<encrypted_pack>"}
pack = {"t":"res","mac":"f4911e343545","r":200,"opt":["time"],"p":["2018-05-11 19:29:38"],"val":["2018-05-11 19:29:38"]}
I have a Gree U-crown installed: https://www.gree.nl/nl/12-producten/split/33-u-crown
After the {"t": "scan"} I get a incorrect formatted response like:
Received packet of size 347
From 192.168.0.12, port 7000
Packet contents:
0-->t 74
1-->� 0
2-->p 70
3-->a 61
4-->c 63
5-->k 6B
6-->� 0
7-->i 69
8-->� 0
9-->1 31
10-->� 0
11-->u 75
12-->i 69
13-->d 64
Position, char value en hex number.
I am using the software on an arduino mega.
My computer can not run QT (Ubuntu 14.04).
Can you please give me a hint?
With kind regards
Ron Groen
The Netherlands.
As far as I can see, the initial AP authentication phase which requires ad-hoc WiFi connection between the smart phone app and the AC hasn't been implemented yet.
I know packet sniffing on switched networks with already connected ACs is not so difficult but what about this kind of ad-hoc connection? Have you any ideas? ...maybe any progress?
Hi! Please if someone can help me. Maybe I'm I'm on wrong address but I don't know anymore who can answer my.
I have gree ac GEH18AA-K6DNA1F/O
GEH18AA-K6DNA1F/I and I didn't never get update. It's terrible how work's. I have still V1.00 and If I try to make update I get information that no Server firmware version... Does someone same problem?
I don't know if you are interested in this but I've created a basic rest API in .NET using your code. If you want to I can share that for others.
It would be very useful, as I am controling my airconditioner automatically.
Quit anoying.
Anyone have tried to do this already?
Regards,
Gábor
Hello,
I have programmed a dummy server to which the devices can connect, so you can block internet traffic in your firewall. There is also a Config Tool to set the new remote host in the Device.
https://github.com/emtek-at/GreeAC-DummyServer
https://github.com/emtek-at/GreeAC-ConfigTool
I bought a new Gree AC, it can controlled by gree's APP, and I used the udp try to controll myself. it can be discovered but cannot bind. my old gree AC can be discovered and bind success. so the problem is the new one changed the GenericKey.
Do you have way to get or hack the new generic key? please, I really want to get it. My 5 gree ACs, only the last one cannot controll myself.
Hi, I read on github the possibility to update the unit to firmware V4 (currently I have firmware 3.72). How can I do? I have the Gree+ app on Android and my account is set to Europe. Thank you so much for your valuable contribution.
Hello all,
many thanks for this great info ! i followed the instructions & open source and developed everything from scratch- AES128 encrypt & Decrypt, BASE64 encrypt, (the BASE64 decrypt was part of exiting lib) on a TwinCAT3.1 PLC.
i was able to "search" and "bind' and even got response from the AC unit with it's special key,
now, I'm trying to read AC unit statuses, but got zero response,
i think the status cmd i'm sending is wrong,
i used an online tool to double check the "Pack", from some reason i'm not sure why (yet) it's different than what my TwinCAT code is generating, but i send "status cmd" with both Packs ,and AC not responding to any of them.
the only thing cross my mind: is there any meaning for spacing? which i might used differently
here is how my Json looks like:
{"cols":["Pow","Mod","SetTem","WdSpd","Air","Blo","Health","SwhSlp","Lig","SwingLfRig","SwUpDn","Quiet","Tur","StHt","TemUn","HeatCoolType","TemRec","SvSt"],"mac":"f4911e312b48","t": "status"}
2nd thing that cross my mind : does status cmd is encrypted with the generic key or the unique key ?
tnx! Moti
Hi,
Do you have information about how the registration of the AC happens on the network?
I mean, when I set the WiFi access for the device on EWPE application.
Regards,
Grunci
Hi,
I want to use your code for remote control my gree ac, I need to auto set temperature on ac at some time using cron on my linux server...is it easy possible with "gree-remote" code?
Also I must note that my server is not on same network as AC!
If it possible with gree-remote code on linux server please somebody write how I can easy do that, please step by step...
Thanks.
Hi,
First, thanks for your great initiative!
When using gree.py to discover my Gree devices (the search command) it first successfully decrypt my Cooper & Hunder's returned pack JSON field. Still, then it returns The length of the provided data is not a multiple of the block length
exception while attempting to decrypt the pack field returned by the second Gree Soyal device (might be a newer model!!). I've tried to apply padding, using Python's PKCS7(128).padder()
, it doesn't crash anymore but the decrypted data seems garbage and not a valid JSON.
Are the new Gree models make use of other generic keys? Can you, please provide some guidance, on how to investigate further?
Thanks!
I want to implement myself. when I send a udp message to the greeAC 's ip:7000, how I get the response? my send IP's port 7000?
Hi guys,
I used your repo to read how to do the binding and stuff.. I created a rest API. I'm using this to create applets on IFTTT mostly for google assistant :)
I'll document it later and add your repository as source of inspiration if that's fine for you.
repo: https://github.com/alexmuntean/gree-airconditioner-rest
It's a spring boot project. if you wanna see it just mvn clean install
and java -jar target/....jar" and you'll see the REST API in
localhost:8080/powerOn
localhost:8080/powerOff
localhost:8080/temperature?temperature=16`
Thanks for your contribution and research and patience :)
Thanks,
Alex
Prevent using the internal temp sensor and fead in an external one. Is it possible?
Is there a property might be? Same as I feel over infra?
It looks like some ACs report current room temperature with the TemSen
property. The reported value has +40°C
offset. Would this be possible to integrate into your programs?
I should also add that my Sinclair AC with firmware 3.7
didn't report the temperature until I "updated" to 2.5
. Before that it just reported 0.
Hello, I need help reading value of TemSen
I have a Gree Device (branded NordCel) with firmware revision 3.1.
TemUn returns 0 (should mean Celsius), but TemSen returns 118.
What could that possibly mean? Even after subtracting -40, it is not a reasonable value.
...or just mac?
I'm trying to run gree.py on Windows 11 using python 3.10 but no luck, I'm getting ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
all the time, no matter what I do.
Anyone succeeded on windows?
$ .\python.exe C:\workspace\home-assistant\gree.py -b 192.168.55.255 search
Searching for devices using broadcast address: 192.168.55.255
Search finished, found 1 device(s)
Binding device: 192.168.55.18 (c6a4XXXX, ID: 502cc6aXXXXX)
Bind to 502cc6aXXXXX succeeded, key = Pq9St2Vw5YzXXXXX
$ .\python.exe C:\workspace\home-assistant\gree.py --verbose -c 192.168.55.32 -i 502cc6aXXXXX -k Pq9St2Vw5YzXXXXX get Pow
Getting parameters: Pow
send_data: ip=192.168.55.32, port=7000, data=b'{"cid":"app","i":0,"pack":"3LbLoQxLG6Ulufx/18NHB9khXFXA2SxQBCKZI3tL2+9iihDQaZQfQ3o42gZa95Z8MOIuRn73jYAffH44aaJ+dQ==","t":"pack","tcid":"502cc6aXXXXX","uid":0}'
Traceback (most recent call last):
File "C:\workspace\home-assistant\gree.py", line 251, in <module>
get_param()
File "C:\workspace\home-assistant\gree.py", line 164, in get_param
result = send_data(args.client, 7000, bytes(request, encoding='utf-8'))
File "C:\workspace\home-assistant\gree.py", line 37, in send_data
return s.recv(1024)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
$ .\python.exe -V
Python 3.10.7
$ .\Scripts\pip.exe install pyopenssl
Requirement already satisfied: pyopenssl in c:\uses\python310\lib\site-packages (23.1.1)
Requirement already satisfied: cryptography<41,>=38.0.0 in c:\uses\python310\lib\site-packages (from pyopenssl) (38.0.1)
Requirement already satisfied: cffi>=1.12 in c:\uses\python310\lib\site-packages (from cryptography<41,>=38.0.0->pyopenssl) (1.15.1)
Requirement already satisfied: pycparser in c:\uses\python310\lib\site-packages (from cffi>=1.12->cryptography<41,>=38.0.0->pyopenssl) (2.21)
Hey!
I've got myself a few months back a heat pump from Sinclair (model: smh-100irb and smh-60irb) and it didn't work out of the box with the gree-remote or any other gree-variant (HomeAssistant plugin or ewpe-smart-mqtt) so I've started digging. Here is the complete flow I was able to dig out from the EWPE Smart app with Wireshark (the heat pump is there as "ATW HP").
All the pack data is decrypted for easier reading.
the initial discovery of the device via UDP broadcast
send:
{
"t": "scan"
}
received data: (decoded with key "a3K8Bx%2r8Y7#xDh")
{
"t":"pack",
"i":1,
"uid":0,
"cid":"<MAC>",
"tcid":"app",
"pack":"{
"t":"dev",
"cid":"<MAC>",
"bc":"gree",
"brand":"gree",
"catalog":"gree",
"mac":"<MAC>",
"mid":"9300",
"model":"gree",
"name":"",
"series":"gree",
"vender":"1",
"ver":"V5.0.0.0",
"lock":0
}"
}
send: (encoded with key "a3K8Bx%2r8Y7#xDh")
{
"cid": "app",
"i": 1,
"pack": "{
"mac": "<MAC>",
"t": "bind",
"uid": 0
}",
"t": "pack",
"tcid": "<MAC>",
"uid": 0
}
received data: (decoded with key "a3K8Bx%2r8Y7#xDh")
{
"t":"pack",
"i":1,
"uid":0,
"cid":"<MAC>",
"tcid":"app",
"pack":"{
"t":"bindok",
"mac":"<MAC>",
"key":"<KEY>",
"r":200
}"
}
got key "KEY"
Now I was able to read the status and temperature of the heat pump.
This part took me the longest as I had to figure out the new object names.
send: (encoded with key "KEY")
{
"pack":"{
"t":"status",
"mac":"<MAC>",
"cols":[
"AllInWatTemHi",
"AllInWatTemLo",
"AllOutWatTemHi",
"AllOutWatTemLo",
"HepOutWatTemHi",
"HepOutWatTemLo",
"WatBoxTemHi",
"WatBoxTemLo",
"RmoHomTemHi",
"RmoHomTemLo",
"WatBoxElcHeRunSta",
"SyAnFroRunSta",
"ElcHe1RunSta",
"ElcHe2RunSta",
"AnFrzzRunSta",
"TemUn",
"AllErr"
]
}",
"i":0,
"cid":"app",
"uid":0,
"tcid":"<MAC>",
"t":"pack"
}
received data: (decoded with key "KEY")
{
"t":"pack",
"i":0,
"uid":0,
"cid":"<MAC>",
"tcid":"app",
"pack":"{
"t":"dat",
"r":200,
"mac":"<MAC>",
"cols":[
"AllInWatTemHi",
"AllInWatTemLo",
"AllOutWatTemHi",
"AllOutWatTemLo",
"HepOutWatTemHi",
"HepOutWatTemLo",
"WatBoxTemHi",
"WatBoxTemLo",
"RmoHomTemHi",
"RmoHomTemLo",
"WatBoxElcHeRunSta",
"SyAnFroRunSta",
"ElcHe1RunSta",
"ElcHe2RunSta",
"AnFrzzRunSta",
"TemUn",
"AllErr"
],
"dat":[
132,
4,
132,
2,
70,
0,
100,
0,
70,
0,
0,
0,
0,
0,
0,
0,
0
]
}"
}
input water temp: (dat[0]-100)+dat[1]*0.1 = 32.4
output water temp: (dat[2]-100)+dat[3]*0.1 = 32.2
same goes for other variables that have two parts wih Hi-Lo ending
(HepOutWatTem shows -30 because i dont have it configured)
send: (encoded with key "KEY")
{
"pack":"{
"t":"status",
"mac":"<MAC>",
"cols":[
"Pow",
"Mod",
"CoWatOutTemSet",
"HeWatOutTemSet",
"WatBoxTemSet",
"TemUn",
"TemRec",
"AllErr",
"host",
"name",
"ColHtWter",
"HetHtWter",
"LefHom",
"TemRecB",
"RomHomTemExt",
"CoHomTemSet",
"HeHomTemSet"
]
}"
"i":0,
"cid":"app",
"uid":2179292,
"tcid":"<MAC>",
"t":"pack"
}
received data: (decoded with key "KEY")
{
"t":"pack",
"i":0,
"uid":2179292,
"cid":"<MAC>",
"tcid":"app",
"pack":"{
"t":"dat",
"r":200,
"mac":"<MAC>",
"cols":[
"Pow",
"Mod",
"CoWatOutTemSet",
"HeWatOutTemSet",
"WatBoxTemSet",
"TemUn",
"TemRec",
"AllErr",
"host",
"name",
"ColHtWter",
"HetHtWter",
"LefHom",
"TemRecB",
"RomHomTemExt",
"CoHomTemSet",
"HeHomTemSet"],
"dat":[
1,
1,
18,
35,
50,
0,
0,
0,
"eu.dis.gree.com",
"",
0,
0,
0,
0,
0,
24,
20
]
}"
}
it would be nice if you could integrate this into the gree-remote. In the end, I would love it to work with Home assistant.
Is there any way I can issue a command that resets the wifi configuration?
When setting up, I didn't realize some devices in the wifi list are not mine, so I have some devices connecting to my WiFi AP. I can control some unknown AC's that are not in my house. They accept commands, and I can confirm that they to turn on/off, etc.
I've tried to send them
{"psw": "00000000","ssid": "00000000","t": "wlan"}
but of course they won't accept it since they're not in setup mode anymore.
I rather not change my SSID and password, as there are too many IoT devices connected to it, some have the pass cooked into the firmware, etc, so I really hope I can just reset them remotely. I could also probably blacklist their MAC address, but again, they'd keep trying to connect indefinitely I think.
There's also the go around my neighbourhood asking about their ACs, or look for GREE external units, then explain them how to reset, etc option but hopefully it doesn't have to come to that.
Hi all!
I have this Gree AC (actually Nordcel in my country) in a country house for keeping 8 degrees in the house during the winter time.
I did set up Pi3 with temperature sensors (DHT22) to see if the device is actually working (and it seems from the temperature, that it does) and I also have access over the internet to my Wifi router.
The problem is that after some period Gree AC disconnects itself from Wifi network.
Does anyone of you have an idea how could I reconnect Gree back to the network? Daily automatic restarts somehow? Some sort of timer function? How does the remote control work?
Of course EWPE Smart nor Wifi Smart can see the device.
Hopefully I can jump in and help develop some sort of managing software (web based?) for Gree devices in summer, when I have physical access to the device.
Thank you everybody for your work and help!
Hi,
I'm trying to get this to work with a Gree+ model (Innova Racker), but I get timeouts when trying to get the unit key:
pi@pi4:~/projects/gree-remote/PythonCLI $ python3 gree.py search -b 192.168.1.255
Searching for devices using broadcast address: 192.168.1.255
Search finished, found 1 device(s)
Binding device: 192.168.1.23 (Sypialnia, ID: f4911ec262a3)
Traceback (most recent call last):
File "gree.py", line 189, in
search_devices()
File "gree.py", line 103, in search_devices
bind_device(r)
File "gree.py", line 113, in bind_device
result = send_data(search_result.ip, 7000, bytes(request, encoding='utf-8'))
File "gree.py", line 29, in send_data
return s.recv(1024)
socket.timeout: timed out
What could cause this? Newer master key or unsupported protocol version?
Would appreciate any help.
Thanks
I want to write a server that can replace the current server. I saw that the server address can be changed, so I was wondering if I can replace the server completely. My goal is to write my own Android app+server and control my AC from everywhere in the world. Does someone know how the AC communicate with the remote Gree server? thanks!
Hello.
Thank you for reverse engineering Gree protocol.
I'm using it in app for smart home controller Homey.
But I have a question.
Do you have any information about "lock" flag in the scan response package?
Any ideas what does it mean when lock=1
?
{
"t": "dev",
"cid": "<MAC address>",
"bc": "gree",
"brand": "gree",
"catalog": "gree",
"mac": "<MAC address>",
"mid": "10001",
"model": "gree",
"name": "<friendly name of the unit>",
"series": "gree",
"vender": "1",
"ver": "V1.1.13",
"lock": 0 // <----- THIS
}
Thanks
A unit branded as "Inventor" reports Indoor and Outdoor temperature in the Android application (Invmate II). How would it be possible to determine the name of the outdoor sensor? Using the python cli the unit was detected and the value of the TemSen sensor is 41. The Android app reports the indoor temperature as 19 degrees Celsius.
I found that my Toyotomi dehumidifier uses the Gree protocol. I used gree.py to get the device key, then decrypted info from "Ewpe Smart" application that Toyotomi suggests to use.
Those are the fields:
{"cols":["Pow","Dmod","Dwet","WdSpd","DwatFul","Lig","SwUpDn","Health","Quiet","PM2P5","airQlt","DwatSen","ChildLock","AppTimer","AllErr","ModelType","Dfltr"],"mac":"502cc626d560","t":"status"}
and a response:
{"t":"dat","mac":"502cc626d560","r":200,"cols":["Pow","Dmod","Dwet","WdSpd","DwatFul","Lig","SwUpDn","Health","Quiet","PM2P5","airQlt","DwatSen","ChildLock","AppTimer","AllErr","ModelType","Dfltr"],"dat":[1,2,5,0,0,1,1,1,2,1,1,51,0,0,0,0,0]}
DwatSen is the humidity sensor (51 meaning 51% humidity). The target value set is in increments of 5% from 30 to 80, I will figure out all the values in the next days.
What else is needed to support my device?
Just to mention:
"Tur" value sets Turbo mode of the AC. It IS available in HEAT mode(not as specified in readme.md), and the device is controlling automatically the fan speed. Probably the same in in other modes.
And you can set the friendly name of the device, with "name" tag of a cmd request.
My devices answering on a "cmd" request with invalid values. Not as stated in readme.md: the device is not answering. The device will not answer only if the request is malformed or not correctly encrypted.
Hi, i used wireshark and connected/install a new AC but i can`t find the AES Key.
What am I doing wrong?
Hi,
How can one send multiple commands in one request? Like the gree apps scenes-feature. One press can turn on the device, set a specific mode and temp.
Just an interesting question,
Thanks
Hey, I have a Gree Smart AC as well and if I can guess you are mimicking the Gree Smart app. Can you share some details how does it work? I was trying to reverse engineer it, but I had no luck.
I tried:
I emailed them for docs, no reply.
Do you have a documentation or did I miss something?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.