Clone https://github.com/tomikaa87/gree-remote
Install lib:
pip install --user cryptography
To discover ip, device id and key, run this command (use your own network's broadcast ip, check eg ifconfig
):
$ cd PythonCLI
$ python 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: [ip] (1e7a87ae, ID: [device-id])
Bind to [device-id] succeeded, key = [key]
Command reference: https://github.com/tomikaa87/gree-remote#reading-status-of-a-device
Use ip
, device-id
and key
from above.
Get current set temperature:
$ python gree.py get SetTem -c [ip] -i [device-id] -k [key]
Getting parameters: SetTem
SetTem = 17
Get current sensor reading:
$ python gree.py get TemSen -c ...
Getting parameters: TemSen
TemSen = 59
(this value is offset by 40 to avoid negative, so eg 59 = 19 degrees)
Set temperature
$ python gree.py set SetTem=17 -c ...
Setting parameters: SetTem=17
{"opt":["SetTem"],"p":[17],"t":"cmd"}