Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to ac #174

Closed
ShiinaKin opened this issue Jun 16, 2024 · 21 comments
Closed

Unable to connect to ac #174

ShiinaKin opened this issue Jun 16, 2024 · 21 comments

Comments

@ShiinaKin
Copy link

Describe the bug

Setup of platform gree is taking longer than 60 seconds. Startup will proceed without waiting any longer.
I have tried to reset the WiFi of A/C and other methods in the issues.

Configuration

- platform: gree
  name: Badroom-AC
  host: 192.168.1.163
  port: 7000
  mac: 'e8:16:56:4f:fa:f0'
  target_temp_step: 1
  encryption_version: 2
  temp_sensor: sensor.ble_temperature_3
  lights: input_boolean.bedroom_ac_lights
  health: input_boolean.bedroom_ac_health
  sleep: input_boolean.bedroom_ac_sleep
  powersave: input_boolean.bedroom_ac_powersave

Platform:

  • OS: Ubuntu Docker HA 2024.6.2
  • Browser chrome126
  • Version 2.11.0

Additional context
It should be noted that, my firmware of A/C is v1.25, maybe they made some changes to the protocol.

Logs

2024-06-16 09:03:37.554 INFO (MainThread) [custom_components.gree.climate] Setting up Gree climate platform
2024-06-16 09:03:37.554 INFO (MainThread) [custom_components.gree.climate] Adding Gree climate device to hass
2024-06-16 09:03:37.554 INFO (MainThread) [custom_components.gree.climate] Initialize the GREE climate device
2024-06-16 09:03:37.555 INFO (MainThread) [custom_components.gree.climate] Retrieving HVAC encryption key
2024-06-16 09:03:37.578 INFO (MainThread) [custom_components.gree.climate] Fetching(192.168.1.163, 7000, 10, {"cid": "app","i": 1,"pack": "Jtod3XIt89K2vs2Bb39BUckg7tMAzgfkbQU3H+DJw/DAIDhZ2Qc4K46l9aCGHseEwf35XMKtIPQDq97Iev6J","t":"pack","tcid":"e816564ffaf0","uid": 0, "tag" : "bVOOJvDa6Gh7tX1aARVZAA=="})
2024-06-16 09:03:47.582 ERROR (MainThread) [homeassistant.components.climate] Setup of platform gree is taking longer than 60 seconds. Startup will proceed without waiting any longer.
@RobHofmann
Copy link
Owner

Did you also try the v1 encryption?

@ShiinaKin
Copy link
Author

Did you also try the v1 encryption?

This is indeed something I did not try, as the README say that v1.21 should use encryption version 2, and now it works fine, thanks for the reply.

Also hope to specify this in the README, that may help somebody like me.

A/C model is KFG-35GW(35549)FNhAc-B1(WIFI)

@Tempmail1234-pass
Copy link

Tempmail1234-pass commented Jun 18, 2024

@ShiinaKin It worked for you using the v1 encryption? can you send me the full climate.yaml and configuration.yaml files please?
Also do I need to first connect my A/C to gree+ app first and then run download the integration or do I need to reset my A/C wifi by powering off and pressing wifi and mode first?

@ShiinaKin
Copy link
Author

@ShiinaKin It worked for you using the v1 encryption? can you send me the full climate.yaml and configuration.yaml files please?

- platform: gree
  name: Badroom-AC
  host: 192.168.1.201
  port: 7000
  mac: 'e816564ffaf0'
  target_temp_step: 1
  encryption_version: 1
  uid: 0
  temp_sensor: sensor.ble_temperature_3
  xfan: input_boolean.bedroom_ac_xfan
  lights: input_boolean.bedroom_ac_lights
  health: input_boolean.bedroom_ac_health
  sleep: input_boolean.bedroom_ac_sleep
  powersave: input_boolean.bedroom_ac_powersave
  auto_xfan: true
  auto_light: false
  horizontal_swing: true

@ShiinaKin
Copy link
Author

@ShiinaKin It worked for you using the v1 encryption? can you send me the full climate.yaml and configuration.yaml files please? Also do I need to first connect my A/C to gree+ app first and then run download the integration or do I need to reset my A/C wifi by powering off and pressing wifi and mode first?

My steps:

  1. use gree+ and add a/c as my device, it will also let the a/c connect to your own wifi
  2. find the mac in the device info footer, and find it's ip by router management
  3. option: fixed the ip with mac by router management
  4. try to ping the ip of a/c, it will get resp if everything is ok
  5. edit climate.yaml & restart HA
  6. done

may helpful for u

@Tempmail1234-pass
Copy link

@ShiinaKin The A/C name in Gree+ app must be the same for the climate.yaml file?
Also the Mac adress should be separeted by '-' or ':', am I wrong?

@ShiinaKin
Copy link
Author

ShiinaKin commented Jun 18, 2024

@ShiinaKin The A/C name in Gree+ app must be the same for the climate.yaml file? Also the Mac adress should be separeted by '-' or ':', am I wrong?

don't need to be same, and as you see "tcid":"e816564ffaf0", the mac finally will be processing like this partten, but you also could try it, i can use it without split.

@Tempmail1234-pass
Copy link

@ShiinaKin Thanks.
I don't see any logs, is my configuration.yaml fine?

# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

logger:
  default: info
  logs:
    custom_components.gree: debug
    custom_components.gree.climate: debug
    

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
climate: !include climate.yaml

Do I only have to click?

Restart Home Assistant? This will interrupt all running automations and scripts.

@ShiinaKin
Copy link
Author

@ShiinaKin Thanks. I don't see any logs, is my configuration.yaml fine?

# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

logger:
  default: info
  logs:
    custom_components.gree: debug
    custom_components.gree.climate: debug
    

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
climate: !include climate.yaml

Do I only have to click?

Restart Home Assistant? This will interrupt all running automations and scripts.

seems good, use the fully restart, not just reload yaml.

and in my practice, the a/c will appear in the home page of HA, and be an entity, not a device

@Tempmail1234-pass
Copy link

Tempmail1234-pass commented Jun 18, 2024

@ShiinaKin
Not working (Unavailable entity), is it fine?

- platform: gree
  name: ac
  host: 192.168.0.165
  port: 7000
  mac: '9424b8b7cc08'
  target_temp_step: 1
  encryption_version: 1

@ShiinaKin
Copy link
Author

ShiinaKin commented Jun 18, 2024

@ShiinaKin Not working (Unavailable entity), is it fine?

- platform: gree
  name: ac
  host: 192.168.0.165
  port: 7000
  mac: '9424b8b7cc08'
  target_temp_step: 1
  encryption_version: 1

at lease you will see the failed log

try to ping 192.168.0.165, i dont know your network env detail, can't help more

@Tempmail1234-pass
Copy link

@ShiinaKin This is indeed the right IP and mac, see this tomikaa87/gree-remote#63 (comment)

@Tempmail1234-pass
Copy link

@ShiinaKin My bad, I looked for the logs in the wrong place, this is my log:

2024-06-19 11:43:10.909 INFO (MainThread) [homeassistant.components.climate] Setting up gree.climate
2024-06-19 11:43:10.909 INFO (MainThread) [custom_components.gree.climate] Setting up Gree climate platform
2024-06-19 11:43:10.909 INFO (MainThread) [custom_components.gree.climate] Adding Gree climate device to hass
2024-06-19 11:43:10.909 INFO (MainThread) [custom_components.gree.climate] Initialize the GREE climate device
2024-06-19 11:43:10.909 INFO (MainThread) [custom_components.gree.climate] name(): ac
2024-06-19 11:43:10.909 INFO (MainThread) [custom_components.gree.climate] name(): ac
2024-06-19 11:43:10.909 INFO (MainThread) [custom_components.gree.climate] supported_features(): 441
2024-06-19 11:43:10.909 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2024-06-19 11:43:10.909 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-06-19 11:43:10.909 INFO (MainThread) [custom_components.gree.climate] min_temp(): 16
2024-06-19 11:43:10.909 INFO (MainThread) [custom_components.gree.climate] max_temp(): 30
2024-06-19 11:43:10.909 INFO (MainThread) [custom_components.gree.climate] target_temperature_step(): 1.0
2024-06-19 11:43:10.910 INFO (MainThread) [custom_components.gree.climate] fan_list(): ['Auto', 'Low', 'Medium-Low', 'Medium', 'Medium-High', 'High', 'Turbo', 'Quiet']
2024-06-19 11:43:10.910 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-06-19 11:43:10.910 INFO (MainThread) [custom_components.gree.climate] supported_features(): 441
2024-06-19 11:43:10.910 INFO (MainThread) [custom_components.gree.climate] Gree climate device added to hass()
2024-06-19 11:43:10.910 INFO (MainThread) [custom_components.gree.climate] Retrieving HVAC encryption key
2024-06-19 11:43:10.912 INFO (MainThread) [custom_components.gree.climate] Fetching(192.168.0.165, 7000, 10, {"cid": "app","i": 1,"pack": "Jtod3XIt89Lqss6DOHEXAMwiuNsAzgfkbQU3H+DJn/zDIm9Xj1Y9Kdit9aCGHseEwf35XMKtIPQDq97Iev6J","t":"pack","tcid":"9424b8b7cc08","uid": 0, "tag" : "0O6hIyG+4TwGey8NFvt5uQ=="})
2024-06-19 11:43:10.928 INFO (MainThread) [custom_components.gree.climate] Starting SyncState
2024-06-19 11:43:10.928 INFO (MainThread) [custom_components.gree.climate] Could not connect with device.

I have the "tag" which is good, but it

Could not connect with device

What should I try? This is what I tried

- platform: gree
  name: ac
  host: 192.168.0.165
  port: 7000
  mac: '9424b8b7cc08'
  target_temp_step: 1
  encryption_version: 2

@jodewee
Copy link

jodewee commented Jun 19, 2024

@Tempmail1234-pass , do you use the release 2.11 or the latest (2.12)?

@Tempmail1234-pass
Copy link

@jodewee latest (2.12), why?

@jodewee
Copy link

jodewee commented Jun 19, 2024

@jodewee latest (2.12), why?

same issue over here since 2.12.
Uninstall it, and install the 2.11 version; that should work just fine

@jodewee
Copy link

jodewee commented Jun 19, 2024

@Tempmail1234-pass can you post or upload you full log?

@ShiinaKin
Copy link
Author

from the log, your problom has essentially different with me.

the HA connect to the a/c successfully, but cannot communicate with it, it more likely the protocol prob.

and after i see the commit for 2.12, it just support the horizontal swing and add some err retry & log

see:

@Tempmail1234-pass
Copy link

@jodewee I can't believe it!!! After countless days and hours of trying it finally worked🤩, I can't thank you enough!
THANK YOU SO MUCH!😀

@jodewee
Copy link

jodewee commented Jun 19, 2024

@RobHofmann & @toughvj ; clearly the 2.12 release breaks the integration for devices with the new encryption method.
If i can help with testing or implementing a possible fix next week, just let me know.

@RobHofmann
Copy link
Owner

Yeah. We need to wait for @toughvj here. Next week we'll do further investigations :).

For now stick to 2.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants