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
317 stars 105 forks source link

Sporadic beeps after configuring auto light and auto xfan input boolean. #212

Open szerencl opened 1 month ago

szerencl commented 1 month ago

Describe the bug I hear random beeps without me or any automation even touching the AC. It started happening after 2.14.1, it was working when it was configured as true or false instead of input_boolean (I skipped 2.14). I'm guessing the AC loses connection and when it reconnects the integration sends the auto xfan or light setting to it.

To Reproduce Steps to reproduce the behavior:

  1. Configure and turn on auto xfan and auto light
  2. Make AC reconnect to router (e.g.: restart wifi service in router)
  3. Wait for beep

Configuration

- platform: gree
  name: gree_guest
  host: <IP>
  port: <PORT>
  mac: <MAC>
  target_temp_step: 1
  lights: input_boolean.gree_guest_lights
  xfan: input_boolean.gree_guest_xfan
  health: input_boolean.gree_guest_health
  sleep: input_boolean.gree_guest_sleep
  powersave: input_boolean.gree_guest_powersave
  eightdegheat: input_boolean.gree_guest_eightdegheat
  auto_xfan: input_boolean.gree_guest_auto_xfan
  auto_light: input_boolean.gree_guest_auto_light

Expected behavior AC should not be randomly beeping. These settings could be sent with the first action instead of immediately after the connection is made.

Platform:

Logs

2024-09-03 21:02:09.713 INFO (SyncWorker_20) [custom_components.gree.climate] update()
2024-09-03 21:02:09.713 INFO (SyncWorker_20) [custom_components.gree.climate] Starting SyncState
2024-09-03 21:02:09.714 INFO (SyncWorker_20) [custom_components.gree.climate] Fetching(<IP>, <PORT>, ...
2024-09-03 21:02:09.715 INFO (SyncWorker_20) [custom_components.gree.climate] 3
2024-09-03 21:02:19.725 INFO (SyncWorker_20) [custom_components.gree.climate] Could not connect with device. 
2024-09-03 21:02:19.725 INFO (SyncWorker_20) [custom_components.gree.climate] Could not connect with device 3 times. Set it as offline.
2024-09-03 21:02:19.727 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-09-03 21:02:19.727 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2024-09-03 21:02:19.728 INFO (MainThread) [custom_components.gree.climate] hvac_modes(): [<HVACMode.AUTO: 'auto'>, <HVACMode.COOL: 'cool'>, <HVACMode.DRY: 'dry'>, <HVACMode.FAN_ONLY: 'fan_only'>, <HVACMode.HEAT: 'heat'>, <HVACMode.OFF: 'off'>]
2024-09-03 21:02:19.728 INFO (MainThread) [custom_components.gree.climate] min_temp(): 16
2024-09-03 21:02:19.728 INFO (MainThread) [custom_components.gree.climate] max_temp(): 30
2024-09-03 21:02:19.728 INFO (MainThread) [custom_components.gree.climate] target_temperature_step(): 1.0
2024-09-03 21:02:19.728 INFO (MainThread) [custom_components.gree.climate] fan_list(): ['Auto', 'Low', 'Medium-Low', 'Medium', 'Medium-High', 'High', 'Turbo', 'Quiet']
2024-09-03 21:02:19.728 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']
2024-09-03 21:02:19.728 INFO (MainThread) [custom_components.gree.climate] available(): Device is offline
2024-09-03 21:02:19.729 INFO (MainThread) [custom_components.gree.climate] name(): gree_guest
2024-09-03 21:02:19.729 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-09-03 21:02:39.606 INFO (MainThread) [custom_components.gree.climate] should_poll()
2024-09-03 21:02:39.769 INFO (SyncWorker_24) [custom_components.gree.climate] update()
2024-09-03 21:02:39.769 INFO (SyncWorker_24) [custom_components.gree.climate] Starting SyncState
2024-09-03 21:02:39.770 INFO (SyncWorker_24) [custom_components.gree.climate] Fetching(<IP>, <PORT>, ...
2024-09-03 21:02:39.771 INFO (SyncWorker_24) [custom_components.gree.climate] 3
2024-09-03 21:02:39.778 INFO (SyncWorker_38) [custom_components.gree.climate] Done sending state to HVAC: {'t': 'res', 'mac': '<MAC>', 'r': 200, 'opt': ['Pow', 'Mod', 'SetTem', 'WdSpd', 'Air', 'Blo', 'Health', 'SwhSlp', 'Lig', 'SwingLfRig', 'SwUpDn', 'Quiet', 'Tur', 'StHt', 'TemUn', 'HeatCoolType', 'TemRec', 'SvSt', 'SlpMod'], 'p': [0, 1, 25, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0], 'val': [0, 1, 25, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0]}
2024-09-03 21:02:39.778 INFO (SyncWorker_38) [custom_components.gree.climate] HA target temp set according to HVAC state to: 25
2024-09-03 21:02:39.778 INFO (SyncWorker_38) [custom_components.gree.climate] HA lights option set according to HVAC state to: off
2024-09-03 21:02:39.779 INFO (SyncWorker_38) [custom_components.gree.climate] HA xfan option set according to HVAC state to: on
2024-09-03 21:02:39.779 INFO (SyncWorker_38) [custom_components.gree.climate] HA health option set according to HVAC state to: off
2024-09-03 21:02:39.779 INFO (SyncWorker_38) [custom_components.gree.climate] HA powersave option set according to HVAC state to: off
2024-09-03 21:02:39.779 INFO (SyncWorker_38) [custom_components.gree.climate] HA sleep option set according to HVAC state to: off
2024-09-03 21:02:39.779 INFO (SyncWorker_38) [custom_components.gree.climate] HA 8℃ heat option set according to HVAC state to: off
2024-09-03 21:02:39.779 INFO (SyncWorker_38) [custom_components.gree.climate] HA air option set according to HVAC state to: off
2024-09-03 21:02:39.779 INFO (SyncWorker_38) [custom_components.gree.climate] HA operation mode set according to HVAC state to: off
2024-09-03 21:02:39.779 INFO (SyncWorker_38) [custom_components.gree.climate] HA swing mode set according to HVAC state to: Fixed in the upmost position
2024-09-03 21:02:39.780 INFO (SyncWorker_38) [custom_components.gree.climate] HA fan mode set according to HVAC state to: Auto
2024-09-03 21:02:39.780 INFO (SyncWorker_38) [custom_components.gree.climate] HA current temperature set with device built-in temperature sensor state : 29.0
2024-09-03 21:02:39.780 INFO (SyncWorker_38) [custom_components.gree.climate] Finished SyncState
2024-09-03 21:02:39.804 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-09-03 21:02:39.804 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2024-09-03 21:02:39.804 INFO (MainThread) [custom_components.gree.climate] hvac_modes(): [<HVACMode.AUTO: 'auto'>, <HVACMode.COOL: 'cool'>, <HVACMode.DRY: 'dry'>, <HVACMode.FAN_ONLY: 'fan_only'>, <HVACMode.HEAT: 'heat'>, <HVACMode.OFF: 'off'>]
2024-09-03 21:02:39.804 INFO (MainThread) [custom_components.gree.climate] min_temp(): 16
2024-09-03 21:02:39.805 INFO (MainThread) [custom_components.gree.climate] max_temp(): 30
2024-09-03 21:02:39.805 INFO (MainThread) [custom_components.gree.climate] target_temperature_step(): 1.0
2024-09-03 21:02:39.805 INFO (MainThread) [custom_components.gree.climate] fan_list(): ['Auto', 'Low', 'Medium-Low', 'Medium', 'Medium-High', 'High', 'Turbo', 'Quiet']
2024-09-03 21:02:39.805 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']
2024-09-03 21:02:39.805 INFO (MainThread) [custom_components.gree.climate] available(): Device is online
2024-09-03 21:02:39.805 INFO (MainThread) [custom_components.gree.climate] hvac_mode(): off
2024-09-03 21:02:39.805 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-09-03 21:02:39.805 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2024-09-03 21:02:39.805 INFO (MainThread) [custom_components.gree.climate] current_temperature(): 30.0
2024-09-03 21:02:39.806 INFO (MainThread) [custom_components.gree.climate] target_temperature(): 24
2024-09-03 21:02:39.806 INFO (MainThread) [custom_components.gree.climate] fan_mode(): Auto
2024-09-03 21:02:39.806 INFO (MainThread) [custom_components.gree.climate] swing_mode(): Fixed in the upmost position
2024-09-03 21:02:39.806 INFO (MainThread) [custom_components.gree.climate] name(): gree_guest
2024-09-03 21:02:39.806 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
RobHofmann commented 1 month ago

I've got the same experience after rebooting HASS. So I guess it happens after a connection gets established.

RobHofmann commented 1 month ago

i hope @toughvj can help us out.