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

Unavailable Gree AC devices #109230

Closed
GeorgePatsias opened this issue Jan 31, 2024 · 120 comments
Closed

Unavailable Gree AC devices #109230

GeorgePatsias opened this issue Jan 31, 2024 · 120 comments

Comments

@GeorgePatsias
Copy link

The problem

Eveything was working fine, but suddently all the Gree AC devices went unavailable one day (4-5 days now).
My air-condition units have IP and are online and I can controll them with the Gree App fine.

In the Home Assistant they show unavailable, even reloading the intergration, delete and reinstall, reboot, reset AC, delete AC from app and add them again.

What version of Home Assistant Core has the issue?

core-2024.1.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Gree AC model GWH09AGA-K6DNA1A/I

Link to integration documentation on our website

https://www.home-assistant.io/integrations/gree/

Diagnostics information

home-assistant_gree_2024-01-31T17-09-45.153Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @cmroche, mind taking a look at this issue as it has been labeled with an integration (gree) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of gree can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign gree Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


gree documentation
gree source
(message by IssueLinks)

@Csontikka
Copy link

Csontikka commented Feb 1, 2024

Hello!
I am experiencing the same issue with my GREE air conditioners. Reviewing the logs of my automations, it is evident that the error occurred right after the core-2024.1.6 update and has persisted since then. Despite restarting Home Assistant and the entire system, the issue remains unresolved.

(ping for the climates work well, GREE app works well and I haven't experienced such an issue until this update.

@JongsmaSimon
Copy link

Same problem here. Constantly ‘unavailable’..

@reyo
Copy link

reyo commented Feb 8, 2024

I'm getting "not binding" error in the log, the latest HA update broke Gree HACS component also.

@tslashd
Copy link

tslashd commented Feb 12, 2024

Gree device is Unavailable after the latest 2024.2.1 Core update.
Device is available in Gree mobile app and is also responsive

Anyone found any fixes for this yet? 🤔

Power Cycle fixed it 🤷

@aalmarshad
Copy link

Still not solved even after power cycle. The Ac is showing in the Gree+ app and connected but HA does not see it

@lozano312
Copy link

Still not solved even after power cycle. The Ac is showing in the Gree+ app and connected but HA does not see it

Same issue here. Gree app conected and work good. But in home assistant dont found dispositives. I update HA and wifi gree

@lozano312
Copy link

Power Cycle

Dont work for me. Reset wifi of AC, reset AC, reset HA. Same issue.

@MikeInMaine
Copy link

same here.. North America

@aalmarshad
Copy link

It looks like a general problem with the integration.

@MikeInMaine
Copy link

Mine is working again. I reregistered the minisplit in the app after power cycling it at the breaker. One possible factor for mine is that I use the app to register it but I've never been able to get the app to actually connect to it. HA is working again though.

@aalmarshad
Copy link

aalmarshad commented Feb 21, 2024

Mine is working again. I reregistered the minisplit in the app after power cycling it at the breaker. One possible factor for mine is that I use the app to register it but I've never been able to get the app to actually connect to it. HA is working again though.

How many AC do you have? I have two and I got one working fine but the other one doesn't work!

@tslashd
Copy link

tslashd commented Feb 21, 2024

I cannot pinpoint exactly where the issue lies but I will give some more information about my AC unit:
It is currently running on v3.76 (Europe) as I have been unable to update to v3.77 through the app ever since the update came out, the update screen just spins around as if it is updating but even after 15 minutes of the screen being on (not sleeping or anything as they have described in order to update your unit). Have sent a couple of Feedback messages to them about this but to no avail, still unable to update the firmware on it which supposedly fixes some Known Wi-Fi module issues

I can recommend for the people having issues with the HA integration to check the version on your AC and try to update it, then see if the Unavailable issue persists.

Hope this can help some of the people with this issue.

It would be really funny if the Known Wi-Fi module issues is what actually is "blocking" me from updating the firmware. 😄

@lozano312
Copy link

I cannot pinpoint exactly where the issue lies but I will give some more information about my AC unit: It is currently running on v3.76 (Europe) as I have been unable to update to v3.77 through the app ever since the update came out, the update screen just spins around as if it is updating but even after 15 minutes of the screen being on (not sleeping or anything as they have described in order to update your unit). Have sent a couple of Feedback messages to them about this but to no avail, still unable to update the firmware on it which supposedly fixes some Known Wi-Fi module issues

I can recommend for the people having issues with the HA integration to check the version on your AC and try to update it, then see if the Unavailable issue persists.

Hope this can help some of the people with this issue.

It would be really funny if the Known Wi-Fi module issues is what actually is "blocking" me from updating the firmware. 😄

I could update and same issue. Dont work for me. Europe version. Ewpe smart app.

@Csontikka
Copy link

I'm experiencing the same issue with the update that you've described; my devices won't update to 3.77 either (currently running on 3.76, on various types of air conditioners). I've tried using different applications (gree and ewpe smart), changed regional settings, device resets, etc., but nothing has yielded any results. Please, if you receive any substantial response from Gree support, share it with us too!

@MikeInMaine
Copy link

MikeInMaine commented Feb 21, 2024 via email

@chal086
Copy link

chal086 commented Feb 23, 2024

I have two Dehumidifiers and also no connection to HA, app works fine. I also have tried on both to update this mysterious 3.77 firmware but no luck.

@mjkvaak
Copy link

mjkvaak commented Feb 26, 2024

I suddenly experienced this a few days ago. Tried reconnecting the AC to wifi, but it didn't help. I rechecked the climate.yaml that the IP and the MAC addresses were correct and also tried restarting the docker, but those didn't fix it either. What turned out to fix this was to enter the MAC address with no "-" and ":" and in all-small letters; e.g. AB:CD:12:34... becomes abcd1234.... This was inspired by this answer.

@lozano312
Copy link

lozano312 commented Mar 23, 2024

No solution for that?
Cant edit climate.yaml because havent this document

@bajor-attila-orgware
Copy link

Same here. 3 AC on wifi. 2 accessible, 1 unavailable.
HA Core 2023.11.2

@Siwus90
Copy link

Siwus90 commented Mar 25, 2024

Same here 2 unavalible.

 Rejestrator:` homeassistant.components.gree.bridge
Źródło: helpers/update_coordinator.py:350
integracja: Gree Climate (dokumentacja, Problemy)
Pierwsze zdarzenie: 20:21:11 (10 zdarzenia)
Ostatnio zalogowany: 20:30:31

Error fetching gree-xxxx data: Device gree-xxxx is unavailable
Error fetching gree-xxxx data: Device gree-xxxx is unavailable

@MikeInMaine
Copy link

MikeInMaine commented Mar 25, 2024 via email

@Siwus90
Copy link

Siwus90 commented Mar 25, 2024

I've had it go offline once since I posted here last. Rebooting via the breaker for the unit fixed it. Mike

On Mon, Mar 25, 2024 at 3:33 PM Siwus90 @.> wrote: Same here 2 unavalible. Rejestrator: homeassistant.components.gree.bridge Źródło: helpers/update_coordinator.py:350 integracja: Gree Climate (dokumentacja, Problemy) Pierwsze zdarzenie: 20:21:11 (10 zdarzenia) Ostatnio zalogowany: 20:30:31 Error fetching gree-xxxx data: Device gree-xxxx is unavailable Error fetching gree-xxxx data: Device gree-xxxx is unavailable — Reply to this email directly, view it on GitHub <#109230 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAU7PAVMJNAZ76WVQEEO6LY2B3ZVAVCNFSM6AAAAABCTNZ4LCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJYG43DCMZRHA . You are receiving this because you commented.Message ID: @.>

Thank you, it worked!

@lozano312
Copy link

I've had it go offline once since I posted here last. Rebooting via the breaker for the unit fixed it. Mike

On Mon, Mar 25, 2024 at 3:33 PM Siwus90 @.> wrote: Same here 2 unavalible. Rejestrator: homeassistant.components.gree.bridge Źródło: helpers/update_coordinator.py:350 integracja: Gree Climate (dokumentacja, Problemy) Pierwsze zdarzenie: 20:21:11 (10 zdarzenia) Ostatnio zalogowany: 20:30:31 Error fetching gree-xxxx data: Device gree-xxxx is unavailable Error fetching gree-xxxx data: Device gree-xxxx is unavailable — Reply to this email directly, view it on GitHub <#109230 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAU7PAVMJNAZ76WVQEEO6LY2B3ZVAVCNFSM6AAAAABCTNZ4LCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJYG43DCMZRHA . You are receiving this because you commented.Message ID: _@**.**_>

Thank you, it worked!

How do that? I reset wifi of unit and not work. I power off general breaker and not work

@Siwus90
Copy link

Siwus90 commented Mar 25, 2024

How do that? I reset wifi of unit and not work. I power off general breaker and not work

Wait 30 seconds after turning off general breaker.

@lozano312
Copy link

How do that? I reset wifi of unit and not work. I power off general breaker and not work

Wait 30 seconds after turning off general breaker.

Not work. No devices

@omarkhali
Copy link

I have the same problem here. My Gree integration get unavailable randomly.
Core 2024.4.3

@KiralyCraft
Copy link

People with problems, can you check the "Firmware update" version of your AC units? I've been researching this for a while, and it seems verion V1.21 broke something. GREE is also very careful about us not being able to extract the encryption keys used by it with the devices.

The gree.db database file on EWPE Smart 1.18.6.5 is now encrypted (!!)

You can get this information from the GREE app (or from EWPE Smart). It looks like this:

image

@KiralyCraft
Copy link

KiralyCraft commented May 23, 2024

Haha! This is GOLDEN! It means that versions 1.2X simply use another key for binding. You see there, you have V1.21 yet you've successfully bound to the device.

Do you happen to have Home Assistant? Would you mind testing a patched custom integration?

EDIT: I have a patched version of "greeclimate" ready to go, using direct IP discovery, in "custom_components" format. I can send it over to spare you some trouble.

@zhouska
Copy link

zhouska commented May 23, 2024

Haha! This is GOLDEN! It means that versions 1.2X simply use another key for binding. You see there, you have V1.21 yet you've successfully bound to the device.

Do you happen to have Home Assistant? Would you mind testing a patched custom integration?

ha, nice one, shoot away...

@KiralyCraft
Copy link

KiralyCraft commented May 23, 2024

ha, nice one, shoot away...

Here it is. You need to change the IPs in __init__.py with the ones of your AC, this is just a dirty patch I've pulled out of my HA installation. I added the key in bridge.py
gree_patched.zip

Place this in your custom_components and reload HA. I didn't bother to make it user-friendly with the static IPs since I only use it myself.

@zhouska
Copy link

zhouska commented May 23, 2024

ha, nice one, shoot away...

Here it is. You need to change the IPs in __init__.py with the ones of your AC, this is just a dirty patch I've pulled out of my HA installation. I added the key in bridge.py gree_patched.zip

Place this in your custom_components and reload HA. I didn't bother to make it user-friendly with the static IPs since I only use it myself.

Thanks. What code/project is this based on? Just making sure I see the context as I think I got here from this issue: RobHofmann/HomeAssistant-GreeClimateComponent#145

@KiralyCraft
Copy link

KiralyCraft commented May 23, 2024

It's based on the original GREE integration, which is based on: https://github.com/cmroche/greeclimate/
The upstream is here: https://github.com/home-assistant/core/tree/dev/homeassistant/components/gree

I extracted the upstream and tried to turn it into a custom component (on a best-effort basis, haha)

@pini72
Copy link

pini72 commented May 23, 2024

ha, nice one, shoot away...

Here it is. You need to change the IPs in __init__.py with the ones of your AC, this is just a dirty patch I've pulled out of my HA installation. I added the key in bridge.py gree_patched.zip

Place this in your custom_components and reload HA. I didn't bother to make it user-friendly with the static IPs since I only use it myself.

I tried, still the same, not working
צילום מסך 2024-05-23 ב-17 55 25
צילום מסך 2024-05-23 ב-17 54 12

@KiralyCraft
Copy link

KiralyCraft commented May 23, 2024

Hmm, it looks like despite forcing this key it doesn't work. The message we've seen with "Bound to device" is a direct result of forcing the key, and not an actual completion result. Nevertheless, it looks exactly the same for me when I wan gree.py --discovery --bind. Well, it was worth a shot though, thanks for testing this route, now we know. We know for certain that 1.53 uses that key, however. It's neither the first time that the key is seen in the wild: tomikaa87/gree-remote#52 (comment)

@zhouska
Copy link

zhouska commented May 24, 2024

Hmm, it looks like despite forcing this key it doesn't work. The message we've seen with "Bound to device" is a direct result of forcing the key, and not an actual completion result. Nevertheless, it looks exactly the same for me when I wan gree.py --discovery --bind. Well, it was worth a shot though, thanks for testing this route, now we know. We know for certain that 1.53 uses that key, however. It's neither the first time that the key is seen in the wild: tomikaa87/gree-remote#52 (comment)

Ok, I can confirm the custom_components thing doesn't work for me either.

However, I'm able to spoof the DNS response with a simple python cgi script inside nginx docker image and point to the original test server with 1.53 firmware:

root@xxx:~# curl tmpgrih.gree.com/wifiModule/Lastversion?firmwareCode=362001065279 {"CreateDate": "2024-05-11 00:48:21", "commProtVer": "V3.0.0", "desc": "\u51fa\u53e3\u6280\u672f\u90e8\u7518\u9e4f\u6d4b\u8bd5", "forcedUpgrade": 0, "r": 200, "url": "http://test.grih.gree.com/wifiModule/image/19145/787332", "ver": "1.53"} root@edge640:~#

and the nginx sees this:

nginx | 192.168.1.2 - - [24/May/2024:12:08:19 +0000] "GET /wifiModule/Lastversion?firmwareCode=362001065279 HTTP/1.1" 200 251 "-" "curl/7.88.1"

But it seem tmpgrih.gree.com has more roles to play as I can't login into the application now with spoofed DNS entry for tmpgrih.gree.com. Seems like one would need some sort of a proxy like Burp suite or the one you mention here: maxim-smirnov/gree-wifimodule-firmware#2 (comment)

My question is, have you had any luck with it?

@KiralyCraft
Copy link

KiralyCraft commented May 24, 2024

The test server uses a different login system, you may need to create your account again with the same email. Beware that the activation email is really slow, but it does arrive eventually.

I spoofed eu12.grih.gree.com to whatever test.grih.gree.com was showing, and it worked like that up to the firmware update procedure. I used PiHole to see what the app was querying, and then added those manually in OpenWRT. I didn't get to test the MITM proxy yet

@omarkhali
Copy link

@szaman-89 332200135-5bd90813-06d0-4fc7-8c8e-5533b5bf68a8 I am ready to solder and this is my board. I just need instructions from you and tell me where it is (tx rx vcc gnd)
I'm still waiting, no one answered me. Are there instructions?

@szaman-89
Copy link

@omarkhali I don't have instructions for that procedure but saw that flashing and dumping of those chips are possible.

@KiralyCraft
Copy link

KiralyCraft commented May 26, 2024

Can you try this custom integration? It seems to introduce a new encryption algorithm for V1.21: https://github.com/tomaszduda23/HomeAssistant-GreeClimateComponent/

This repository is from a pending PR. Try both encryption version 1 and 2

@jonasa90
Copy link

Can you try this custom integration? It seems to introduce a new encryption algorithm for V1.21: https://github.com/tomaszduda23/HomeAssistant-GreeClimateComponent/

This repository is from a pending PR. Try both encryption version 1 and 2

I tried and it works with V1.22 and encryption version 2. thanks for the effort, that is the solution until gree will release the V1.53 or other firmware update.

@omarkhali
Copy link

Can you try this custom integration? It seems to introduce a new encryption algorithm for V1.21: https://github.com/tomaszduda23/HomeAssistant-GreeClimateComponent/

This repository is from a pending PR. Try both encryption version 1 and 2

Thank you, thank you, brother. It works with version 1.21

@CyberLogicDEV
Copy link

I also confirm that's working for version 1.21 (encryption version 2) for Sinclair AC. Thank you!

@zhouska
Copy link

zhouska commented May 27, 2024

It's based on the original GREE integration, which is based on: https://github.com/cmroche/greeclimate/ The upstream is here: https://github.com/home-assistant/core/tree/dev/homeassistant/components/gree

I extracted the upstream and tried to turn it into a custom component (on a best-effort basis, haha)

I can confirm it works on my V1.21 devices without setting any encryption key (just the encryption_version). It would help if it the HA integration you first mentioned was patched to include this fix...

@lozano312
Copy link

How config that? follow the steps but I don't know how to continue. I put the IP data inside or leave it as IP. Same with the MAC. And then once configured, what do I do? Nothing appears on devices or entities. What do I do next?

@zhouska
Copy link

zhouska commented May 27, 2024

How config that? follow the steps but I don't know how to continue. I put the IP data inside or leave it as IP. Same with the MAC. And then once configured, what do I do? Nothing appears on devices or entities. What do I do next?

This is what I have in climate.yaml

- platform: gree name: Whatever host: 192.168.1.60 mac: "00:00:00:00:00:01" encryption_version: 2

I also added the the patched version as a custom repository in HACS and then installed it. It is the one with zero stars so far:

image

Then check in Developer tools>Check and restart and after reboot you should see you entities...

@lozano312
Copy link

I get this error:

Invalid config for 'gree' from integration 'climate' at climate.yaml, line 7: 'encryption_version' is an invalid option for 'climate.gree', check: encryption_version

@lozano312
Copy link

2024-05-27 17:27:58.389 INFO (MainThread) [custom_components.gree.climate] Setting up Gree climate platform
2024-05-27 17:27:58.389 INFO (MainThread) [custom_components.gree.climate] Adding Gree climate device to hass
2024-05-27 17:27:58.389 INFO (MainThread) [custom_components.gree.climate] Initialize the GREE climate device
2024-05-27 17:27:58.389 INFO (MainThread) [custom_components.gree.climate] Retrieving HVAC encryption key
2024-05-27 17:27:58.396 INFO (MainThread) [custom_components.gree.climate] Fetching(xxxxxx, 7000, 10, {"cid": "app","i": 1,"pack": "Z8qEvA7Q5pU2RWSX167PaqOvS794oNxUAjFh8ZOF8sSj9mrs/0p7GUTdWxmNaBUt","t":"pack","tcid":"XXXXXXXXX","uid": 0})
2024-05-27 17:28:08.408 ERROR (MainThread) [homeassistant.components.climate] Setup of platform gree is taking longer than 60 seconds. Startup will proceed without waiting any longer.

@zhouska
Copy link

zhouska commented May 27, 2024

I get this error:

Invalid config for 'gree' from integration 'climate' at climate.yaml, line 7: 'encryption_version' is an invalid option for 'climate.gree', check: encryption_version

You need to add this custom repo to HACS https://github.com/tomaszduda23/HomeAssistant-GreeClimateComponent/ (as per @KiralyCraft) or wait for the pull request be accepted...

@lozano312
Copy link

Ok, but I get the same error as at the beginning. Tried encryption 1 and 2 and the same.
2024-05-27 19:36:13.631 ERROR (MainThread) [homeassistant.components.climate] Setup of platform gree is taking longer than 60 seconds. Startup will proceed without waiting any longer.

Thx for support!

@zhouska
Copy link

zhouska commented May 27, 2024

Ok, but I get the same error as at the beginning. Tried encryption 1 and 2 and the same. 2024-05-27 19:36:13.631 ERROR (MainThread) [homeassistant.components.climate] Setup of platform gree is taking longer than 60 seconds. Startup will proceed without waiting any longer.

Thx for support!

Maybe you still have the other, unpatched version still present in the system?

@lozano312
Copy link

I have an ekokai air conditioner. With the Gree Climate application. It was fine and worked perfectly but when I updated the firmware it stopped working.

@zhouska
Copy link

zhouska commented May 28, 2024

I have an ekokai air conditioner. With the Gree Climate application. It was fine and worked perfectly but when I updated the firmware it stopped working.

The original Gree version has now been patched to include the fix: https://github.com/RobHofmann/HomeAssistant-GreeClimateComponent/releases/tag/2.10.0

Not sure what version you upgraded from/to, but maybe there are some other issues present.

@lozano312
Copy link

Thx! but dont work :(

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

No branches or pull requests