cmroche / greeclimate

Python package for controlling Gree based minisplit systems
GNU General Public License v3.0
44 stars 22 forks source link

Gree Climate not working with Gree device firmware v1.23 #96

Closed mstuczko closed 2 months ago

mstuczko commented 3 months ago

(based on issue https://github.com/home-assistant/core/issues/122076)

The problem

The device is constantly "unavailable" or appears briefly, however from Gree app device is up and running.

What version of Home Assistant Core has the issue?

2024.7.2

What was the last working version of Home Assistant Core?

2024.7.2

What type of installation are you running?

Home Assistant in Docker on Debian HA Core 2024.7.2 HA Supervisor 2024.06.2

Integration causing the issue

Gree Climate

Link to integration documentation on our website

No response

Diagnostics information

(based on my comment: https://github.com/home-assistant/core/issues/122076#issuecomment-2239273411) I have two devices, and one that got an upgrade from firmware v1.17(?) to v1.23 is no longer "cooperating" with integration. I see something changed. Debug below.

All was working with Gree firmware 1.17 Failed with Gree firmware 1.123

One of the comments in the linked Issues claims that encryption version 2 fixes the problem.

2024-07-19 15:47:48.988 DEBUG (MainThread) [greeclimate.network] Received packet from 192.168.2.240:
{
    "t": "pack",
    "i": 1,
    "uid": 0,
    "cid": "",
    "tcid": "",
    "pack": {
        "t": "dev",
        "cid": "***broken***",
        "bc": "00000000000000000000000000000000",
        "brand": "gree",
        "catalog": "gree",
        "mac": "***broken***",
        "mid": "10001",
        "model": "gree",
        "name": "",
        "lock": 0,
        "series": "gree",
        "vender": "1",
        "ver": "V2.0.0",
        "ModelType": "32792",
        "hid": "362001065279+U-WB05RT13V1.23.bin"
    }
}

2024-07-19 15:47:48.996 DEBUG (MainThread) [greeclimate.network] Received packet from 192.168.2.231:
{
    "t": "pack",
    "i": 1,
    "uid": 0,
    "cid": "***working***",
    "tcid": "",
    "pack": {
        "t": "dev",
        "cid": "***working***",
        "bc": "",
        "brand": "gree",
        "catalog": "gree",
        "mac": "***working***",
        "mid": "10001",
        "model": "gree",
        "name": "***working***",
        "series": "gree",
        "vender": "1",
        "ver": "V1.2.1",
        "lock": 0
    }
}

2024-07-19 15:47:58.817 WARNING (MainThread) [homeassistant.components.gree.coordinator] Device is unavailable: gree-***broken*** (Device: ***broken***@ 192.168.2.240:7000 (mac: ***broken***))
solazs commented 3 months ago

One of the comments in the linked Issues claims that encryption version 2 fixes the problem.

This refers to a custom integration available through HACS, where they wrote their own API connector implementation. Gree changed up the API after v1.21, the integration refers to this change as encryption 2

https://github.com/RobHofmann/HomeAssistant-GreeClimateComponent/blob/9bbfe64b50dc0c2f4576a552530a96c7042d6372/custom_components/gree/climate.py#L402

solazs commented 3 months ago

Support for the new encryption type is being worked on: https://github.com/cmroche/greeclimate/pull/92

cmroche commented 3 months ago

Finishing up testing, thanks for the patience everyone.

cmroche commented 2 months ago

Changes are merged, should be in 2024.9 HA release.

solazs commented 2 months ago

I think it made it into HA version 2024.8:

https://www.home-assistant.io/changelogs/core-2024.8

Update greeclimate to 2.1.0 (@cmroche - #123210)