Describe the bug
Homeassistant can't setup gree component
Configuration
-
platform: gree
name: C&H AC1
host: 192.168.1.182
port: 7000
mac: 98:29:A6:F8:74:B7
#min_temp: 16
#max_temp: 30
#target_temp: 21
target_temp_step: 1
-
platform: gree
name: C&H AC2
host: 192.168.1.192
port: 7000
mac: F4:91:1E:64:2E:5C
#min_temp: 16
#max_temp: 30
#target_temp: 21
target_temp_step: 1
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
2019-06-14 22:37:12 INFO (MainThread) [custom_components.gree.climate] Setting up Gree climate platform
2019-06-14 22:37:12 INFO (MainThread) [custom_components.gree.climate] Adding Gree climate device to hass
2019-06-14 22:37:12 INFO (MainThread) [custom_components.gree.climate] Initialize the GREE climate device
2019-06-14 22:37:12 INFO (MainThread) [custom_components.gree.climate] Retrieving HVAC encryption key
2019-06-14 22:37:12 INFO (MainThread) [custom_components.gree.climate] Fetching(192.168.1.192, 7000, 10, {"cid": "app","i": 1,"pack": "EmFry4kFAsXrxMJi4m1xeW7GLOpEAXIjgdobYmkZL+aj9mrs/0p7GUTdWxmNaBUt","t":"pack","tcid":"f4911e642e5c","uid": 0})
2019-06-14 22:37:12 INFO (MainThread) [custom_components.gree.climate] Fetched device encrytion key: b'Vw1Yz4Bc7Ef0Hi3K'
2019-06-14 22:37:12 INFO (MainThread) [custom_components.gree.climate] Setting up Gree climate platform
2019-06-14 22:37:12 INFO (MainThread) [custom_components.gree.climate] Adding Gree climate device to hass
2019-06-14 22:37:12 INFO (MainThread) [custom_components.gree.climate] Initialize the GREE climate device
2019-06-14 22:37:12 INFO (MainThread) [custom_components.gree.climate] Retrieving HVAC encryption key
2019-06-14 22:37:12 INFO (MainThread) [custom_components.gree.climate] Fetching(192.168.1.182, 7000, 10, {"cid": "app","i": 1,"pack": "ypbAvOtLlYGIvQEo3/f7IP6adwz+SiCj34Ff1CGDwsaj9mrs/0p7GUTdWxmNaBUt","t":"pack","tcid":"9829a6f874b7","uid": 0})
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] name(): C&H AC2
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Gree climate device added to hass()
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Starting SyncState
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Fetching(192.168.1.192, 7000, 10, {"cid":"app","i":0,"pack":"88M0XfZ8V7j4QjzeOg8L+xCBiLhEg0plrijJF27A62Ny30vdXSnnxfrckfNdsNEMok0VZ4p9um2JKXypDzaKhZq+tAIIvoKEt7gK0t3/Gzjj8Mda+7a6FfFdkpn8hKHu9gCbJK0LNpIA+lwXyaN/A791vrI/WueEWeFTxcr2G+z5hO9JBUdzgxvBjWyRrjauL1b7YgX+jIPFiHJzB+3nPyXb+PWdvmw3T0yhMPxNUYVx5hSdfho/fWK2ExiagpoO/txeTGl2OcLqMIr4eh4Mnta+Meb9tT/6iREiUJRFxrA=","t":"pack","tcid":"f4911e642e5c","uid":0})
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting acOptions with retrieved HVAC values
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting Pow: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting Mod: 1
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting SetTem: 23
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting WdSpd: 1
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting Air: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting Blo: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting Health: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting SwhSlp: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting Lig: 1
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting SwingLfRig: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting SwUpDn: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting Quiet: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting Tur: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting StHt: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting TemUn: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting HeatCoolType: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting TemRec: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Setting SvSt: 0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Done setting acOptions
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] HA target temp set according to HVAC state to: 23
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] HA lights option set according to HVAC state to: on
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] HA xfan option set according to HVAC state to: off
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] HA powersave option set according to HVAC state to: off
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] HA sleep option set according to HVAC state to: off
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] HA operation mode set according to HVAC state to: off
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] HA On/Off set according to HVAC state to: off
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] HA swing mode set according to HVAC state to: Default
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] HA fan mode set according to HVAC state to: Low
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] Finished SyncState
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] state(): off
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] current_temperature(): None
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] min_temp(): 16
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] max_temp(): 30
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] target_temperature(): 23
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] supported_features(): 4801
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] target_temperature_step(): 1.0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] target_temperature_step(): 1.0
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] current_fan_mode(): Low
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] fan_list(): ['auto', 'Low', 'Medium-Low', 'Medium', 'Medium-High', 'High', 'Turbo', 'Quiet']
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] fan_list(): ['auto', 'Low', 'Medium-Low', 'Medium', 'Medium-High', 'High', 'Turbo', 'Quiet']
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] current_operation(): off
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] operation_list(): ['auto', 'cool', 'dry', 'fan_only', 'heat', 'off']
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] operation_list(): ['auto', 'cool', 'dry', 'fan_only', 'heat', 'off']
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] current_swing_mode(): Default
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] swing_list(): ['Default', 'Swing in full range', 'Fixed in the upmost position', 'Fixed in the middle-up position', 'Fixed in the middle position', 'Fixed in the middle-low position', 'Fixed in the lowest position', 'Swing in the downmost region', 'Swing in the middle-low region', 'Swing in the middle region', 'Swing in the middle-up region', 'Swing in the upmost region']
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] swing_list(): ['Default', 'Swing in full range', 'Fixed in the upmost position', 'Fixed in the middle-up position', 'Fixed in the middle position', 'Fixed in the middle-low position', 'Fixed in the lowest position', 'Swing in the downmost region', 'Swing in the middle-low region', 'Swing in the middle region', 'Swing in the middle-up region', 'Swing in the upmost region']
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] name(): C&H AC2
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] supported_features(): 4801
2019-06-14 22:37:22 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform gree
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/asyncio/coroutines.py", line 120, in coro
res = func(*args, **kw)
File "/config/custom_components/gree/climate.py", line 104, 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, powersave_entity_id, sleep_entity_id, operation_mode_list, fan_mode_list, swing_mode_list, encryption_key, uid)
File "/config/custom_components/gree/climate.py", line 146, in init
self._encryption_key = self.GetDeviceKey().encode("utf8")
File "/config/custom_components/gree/climate.py", line 213, in GetDeviceKey
return self.FetchResult(cipher, self._ip_addr, self._port, self._timeout, jsonPayloadToSend)['key']
File "/config/custom_components/gree/climate.py", line 196, in FetchResult
data, addr = clientSock.recvfrom(64000)
socket.timeout: timed out
2019-06-14 22:37:22 INFO (MainThread) [custom_components.gree.climate] should_poll()
Platform:
- OS: Hassio vmdk
- Chrome
- 0.94.1
Additional context
Hi there, would be very appreciate if you take a look into log above, not so much info regarding this component. Seems it starts connecting but then fails for some reason. Thanks in advance