Open ilya-draigor opened 4 months ago
I did some checks.
This can be supported, by adding subList function.
When sending {"t": "scan"}
request i got:
{"t":"dev","bc":"","catalog":"gree","series":"gree","model":"gree","lock":0,"vender":"1","mid":"60","name":"GR-Gcloud_60_0a_5ba3_EC","ver":"V3.2.M","mac":"9424b8fd5ba3","subCnt":6}
"subCnt":6 is number of indoor units.
Then sending request to get a list of units:
{"cid":"app","i":0,"pack":"Lmtc+jPqo5okmScSkppBww==","t":"subList","tcid":"9424b8fd5ba3","uid":0}
(pack with empty payload), "t":"subList" is the point.
The responce will be:
{"t":"subList","i":0,"c":6,"r":200,"list":[{"mac":"09c4a41d000000","mid":"6049"},{"mac":"352ea01d000000","mid":"6092"},{"mac":"655ea31d000000","mid":"6049"},{"mac":"0741a01d000000","mid":"6092"},{"mac":"21eda91c000000","mid":"604c"}]}
(Here i have something strange, i have 6 units, but list contain only 5, on phone app i see all 6 units)
And now if i send regular payload, but in "mac" i put internal unit mac adress, it works,
{"cols":["Pow"],"mac":"21eda91c000000","t":"status"}
i successfully got stats, powered on and off, changed temperature.
Hope this can help to update the integration.
Hello @ilya-draigor ,
I have the same issue, also trying to get my VRF unit running. I'm able to reproduce everything above, in my case I get subCnt: 3 as there are 3 internal units. I'm trying to get the list of mac adresses with the "t":"subList", but not getting a response.
Can you clarify what you mean with: 'pack with empty payload'? Do you mean: pack = {"cols":[],"mac":"9424b8f55784","t":"status"}, so an empty cols array? or do you mean pack = {} or something else?
I tried all of the above, but not getting the response with the individual mac adresses. The pack needs to be encrypted with the specific encryption key from my device, not the generic encryption key, correct?
OK, never mind, I found the solution. I found I had to put the master MAC adress in the request and the subunit MAC adress in the pack. I had used both subunit MAC adresses in the request and the pack.
Exploring this further now :-)
Hi @ilya-draigor,
I managed to get data and control my VRF unit with the above information. I also i successfully got stats, powered on and off, changed temperature, etc...
However, the only thing that I still cannot achieve is to get the list of units from the request. I got the mac adresses using the Gree app itself (the mac adresses are also listed there). However, for this integration to work, I would need to be able to retrieve them using the subList function as well.
So again, could you clarify what you mean with: 'pack with empty payload'? How is your request exactly structured to achieve the list of units? I tried the following:
pack = f'{{"mac":"9424b8f55784","t":"status"}}'
pack_encrypted = encrypt(pack, <my encryption code>)
request = '{"cid":"app","i":0,"pack":"%s","t":"subList","tcid":"9424b8f55784","uid":0}' \
% (pack_encrypted)
But I get no response. I tried many variations on the above, but nothing works.
Thanks for your help.
hope this will help
def GetUnitsList(mac_addr,ip_addr,port,timeout,encryption_version):
GENERIC_GREE_DEVICE_KEY = "a3K8Bx%2r8Y7#xDh"
json = '{"mac":"' + str(mac_addr) + '"}'
pack = EncryptPack(GENERIC_GREE_DEVICE_KEY,json)
jsonPayloadToSend = '{"cid": "app","i": 1,"pack": "' + pack + '","t":"subList","tcid":"' + str(mac_addr) + '","uid": 0}'
data = SendPack(jsonPayloadToSend,ip_addr,port,timeout,encryption_version)
pack = DecryptPack(GENERIC_GREE_DEVICE_KEY,data,encryption_version)
units_list = simplejson.loads(pack)
return units_list
hope this will help
by the way, i already wrote all init stuff (all you need in config is IP of the wifi module) all other data fetching automatically, my issue that i don't know how to create multiple devices in home assistant from single integration
GCloud wifi module connected to one of the VRF units All works with Gree+ android app, i can controll all 6 units
Core 2024.7.3 Supervisor 2024.06.2 Operating System 12.4 Frontend 20240710.0
Gree A/C integration version: 2.14.0
Gree Wifi module: v1.10 MID: 6000-v2.8
My config:
tryied with encryption_version: 1 and 2
Logs: