Inventor/Gree encryption key GreeClimateComponent

Hi all,

a new user here and HA looks really great.

I followed the guide how to setup the “GreeClimateComponent”. I have Inventor AC Premium.
When the gree climate want to start, looks like it will connect to the AC, but there appears issue with encryption key, or am I reading this error message wrong:

2021-01-01 17:52:57 INFO (MainThread) [custom_components.gree.climate] Setting up Gree climate platform
2021-01-01 17:52:57 INFO (MainThread) [custom_components.gree.climate] Adding Gree climate device to hass
2021-01-01 17:52:57 INFO (MainThread) [custom_components.gree.climate] Initialize the GREE climate device
2021-01-01 17:52:57 INFO (MainThread) [custom_components.gree.climate] Retrieving HVAC encryption key
2021-01-01 17:52:57 INFO (MainThread) [custom_components.gree.climate] Fetching(192.168.1.148, 7000, 10, {"cid": "app","i": 1,"pack": "q/VPHnRedyT97uUG+KyUaG9XPrJrVTISet0WaX/TCZej9mrs/0p7GUTdWxmNaBUt","t":"pack","tcid":"502dbb4481e3","uid": 0})
2021-01-01 17:53:07 ERROR (MainThread) [homeassistant.components.climate] Error while setting up gree platform for climate
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.8/asyncio/coroutines.py", line 124, in coro
res = func(*args, **kw)
File "/config/custom_components/gree/climate.py", line 118, in async_setup_platform
GreeClimate(hass, name, ip_addr, port, mac_addr, timeout, target_temp_step, temp_sensor_entity_id, lights_entity_id, xfan_entity_id, health_entity_id, powersave_entity_id, sleep_entity_id, eightdegheat_entity_id, air_entity_id, hvac_modes, fan_modes, swing_modes, encryption_key, uid)
File "/config/custom_components/gree/climate.py", line 165, in __init__
self._encryption_key = self.GetDeviceKey().encode("utf8")
File "/config/custom_components/gree/climate.py", line 247, in GetDeviceKey
return self.FetchResult(cipher, self._ip_addr, self._port, self._timeout, jsonPayloadToSend)['key']
File "/config/custom_components/gree/climate.py", line 230, in FetchResult
data, addr = clientSock.recvfrom(64000)
socket.timeout: timed out

please do you know where or how to get the key from the AC?

Thank you.

Hi, did you solved it?
I have the same issue

@jodewee - Hi, i switched to Midea Aircon integration

1 Like

can you give me the url of the add-on?

@jodewee hi, as final solution im using this: Midea LAN

Ok thanks, whitch parameters do you use? Port for gree is default 7000 i think?

@jodewee i have Inventor AC, and it was found automatically… but the AC had to be running, so i set it to FAN mode, and then it was discovered