RobHofmann / HomeAssistant-GreeClimateComponent

Custom Gree climate component written in Python3 for Home Assistant. Controls AC's supporting the Gree protocol.
GNU General Public License v3.0
321 stars 107 forks source link

cannot control AC from HA #79

Closed lancusfpv closed 4 years ago

lancusfpv commented 4 years ago

I am having issue to control the Gree AC from HA. There is no error in the /config/home-assistan.log and I don't really understand why the AC does not work from HA. In lovelace UI the Climate controller interface presented properly. I have the same result with uid:0 or without specifying uid.

My setup: climate:

Here is the log from /config/home-assistant.log

2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] set_hvac_mode(): cool 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Starting SyncState 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Fetching(192.168.20.217, 7000, 10, {"cid":"app","i":0,"pack":"6LasdfUcYr4hmHnV32fNv240aHdxLcp/fFBt1k/8Dd1A1Rgs/OVhL5EZpGV5E2n9oMtx+8uHMk0/LWP5FJI7BOr4is+KDNIIZzaKdd+ImaZLn39YlGV8lLhXDHuqGfRzxEb3B5+WoAEQNRGQPVlmeOQV4Ui87oc6fUJTeHeiqk15bngeY+mzwTR1+Hy71jJ1VWk3jS1sFwrRlMAT1JRXbI3uriWB97jBnqKUGlQVBWCKiEn89f6AyBozVXMoK7CZQhLFGIq1dAaPP0MlFfPChHHCjWWWbQEPRoyU3m00dwwvA=","t":"pack","tcid":"XXXXXXXXXXXXXXXXXXXXXX","uid":0}) 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting acOptions with retrieved HVAC values 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting Pow: 1 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting Mod: 1 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting SetTem: 20 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting WdSpd: 5 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting Air: 0 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting Blo: 0 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting Health: 1 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting SwhSlp: 0 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting Lig: 1 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting SwingLfRig: 0 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting SwUpDn: 0 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting Quiet: 0 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting Tur: 0 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting StHt: 0 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting TemUn: 0 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting HeatCoolType: 0 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting TemRec: 0 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting SvSt: 0 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Setting SlpMod: 0 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Done setting acOptions 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Overwriting acOptions with new settings 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Overwriting Mod: 1 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Overwriting Pow: 1 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Done overwriting acOptions 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Start sending state to HVAC 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Done sending state to HVAC: {'t': 'res', 'mac': 'XXXXXXXXXXXXXXXXXXXXXX', 'r': 200, 'opt': ['Pow', 'Mod', 'SetTem', 'WdSpd', 'Air', 'Blo', 'Health', 'SwhSlp', 'Lig', 'SwingLfRig', 'SwUpDn', 'Quiet', 'Tur', 'StHt', 'TemUn', 'HeatCoolType', 'TemRec', 'SvSt', 'SlpMod'], 'p': [1, 1, 20, 5, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'val': [1, 1, 20, 5, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]} 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] HA target temp set according to HVAC state to: 20 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] HA lights option set according to HVAC state to: on 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] HA xfan option set according to HVAC state to: off 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] HA health option set according to HVAC state to: on 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] HA powersave option set according to HVAC state to: off 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] HA sleep option set according to HVAC state to: off 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] HA 8℃ heat option set according to HVAC state to: off 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] HA operation mode set according to HVAC state to: cool 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] HA swing mode set according to HVAC state to: Default 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] HA fan mode set according to HVAC state to: high 2020-08-11 17:28:42 INFO (SyncWorker_0) [custom_components.gree.climate] Finished SyncState 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] supported_features(): 41 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] hvac_modes(): ['auto', 'cool', 'dry', 'fan_only', 'heat', 'off'] 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] min_temp(): 16 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] max_temp(): 30 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] target_temperature_step(): 1.0 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] target_temperature_step(): 1.0 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] fan_list(): ['Auto', 'low', 'Medium-Low', 'medium', 'Medium-High', 'high', 'Turbo', 'Quiet'] 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] swing_modes(): ['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'] 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] hvac_mode(): cool 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] supported_features(): 41 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] current_temperature(): 27.7 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] target_temperature(): 20 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] fan_mode(): high 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] swing_mode(): Default 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] name(): Bedroom AC 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] supported_features(): 41 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] should_poll() 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] update() 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Starting SyncState 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Fetching(192.168.20.217, 7000, 10, {"cid":"app","i":0,"pack":"6LasdfUcYr4hmHnV32fNv240aHdxLcp/fFBt1k/8Dd1A1Rgs/OVhL5EZpGV5E2n9oMtx+8uHMk0/LWP5FJI7BOr4is+KDNIIZzaKdd+ImaZLn39YlGV8lLhXDHuqGfRzxEb3B5+WoAEQNRGQPVlmeOQV4Ui87oc6fUJTeHeiqk15bngeY+mzwTR1+Hy71jJ1VWk3jS1sFwrRlMAT1JRXbI3uriWB97jBnqKUGlQVBWCKiEn89f6AyBozVXMoK7CZQhLFGIq1dAaPP0MlFfPChHHCjWWWbQEPRoyU3m00dwwvA=","t":"pack","tcid":"XXXXXXXXXXXXXXXXXXXXXX","uid":0}) 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting acOptions with retrieved HVAC values 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting Pow: 1 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting Mod: 1 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting SetTem: 20 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting WdSpd: 5 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting Air: 0 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting Blo: 0 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting Health: 1 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting SwhSlp: 0 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting Lig: 1 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting SwingLfRig: 0 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting SwUpDn: 0 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting Quiet: 0 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting Tur: 0 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting StHt: 0 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting TemUn: 0 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting HeatCoolType: 0 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting TemRec: 0 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting SvSt: 0 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Setting SlpMod: 0 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Done setting acOptions 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] HA target temp set according to HVAC state to: 20 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] HA lights option set according to HVAC state to: on 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] HA xfan option set according to HVAC state to: off 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] HA health option set according to HVAC state to: on 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] HA powersave option set according to HVAC state to: off 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] HA sleep option set according to HVAC state to: off 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] HA 8℃ heat option set according to HVAC state to: off 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] HA operation mode set according to HVAC state to: cool 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] HA swing mode set according to HVAC state to: Default 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] HA fan mode set according to HVAC state to: high 2020-08-11 17:28:42 INFO (SyncWorker_5) [custom_components.gree.climate] Finished SyncState 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] supported_features(): 41 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] hvac_modes(): ['auto', 'cool', 'dry', 'fan_only', 'heat', 'off'] 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] min_temp(): 16 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] max_temp(): 30 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] target_temperature_step(): 1.0 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] target_temperature_step(): 1.0 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] fan_list(): ['Auto', 'low', 'Medium-Low', 'medium', 'Medium-High', 'high', 'Turbo', 'Quiet'] 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] swing_modes(): ['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'] 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] hvac_mode(): cool 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] supported_features(): 41 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] current_temperature(): 27.7 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] target_temperature(): 20 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] fan_mode(): high 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] swing_mode(): Default 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] name(): Bedroom AC 2020-08-11 17:28:42 INFO (MainThread) [custom_components.gree.climate] supported_features(): 41

Please advise what am I doing wrong.

lancusfpv commented 4 years ago

solved. There were a type in the config... :)