home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.75k stars 28.91k forks source link

Gree integration - devices become unavailable but not on the native app #69351

Open doppiaemme opened 2 years ago

doppiaemme commented 2 years ago

The problem

Gree devices often become unavailable and unreachable, however the same devices appear fine on the native Gree app. It happens randomly and on different devices.

For some reasons it seems the app has the capability to still find them while the integration doesn't.

Note: both HA and devices are on the same VLAN

What version of Home Assistant Core has the issue?

2022.3.8

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Gree

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2022-04-04 12:47:02 ERROR (MainThread) [homeassistant.components.gree.bridge] Timeout trying to bind to gree device: Device: XXXXXX @ 192.168XXXXXX (mac: XXXXXXXXXXX)
2022-04-04 12:48:22 ERROR (MainThread) [homeassistant.components.gree.bridge] Error fetching gree-XXXXX data: Device gree-XXXXXX is unavailable

Additional information

No response

matizk144 commented 6 months ago

Hi guys, I have(had) the same issue with Gree HVAC. The issue is, that mounted wifi adapters in GREE devices are crap and lose packets. Build-in GREE integration detect devices using broadcasting and if any packets are lost by HVAC.. home assistant switch device into offline. In this scenario the best way could be send multiple packets before switch device info offline. Another issue is with greeclimate library. As I mentioned.. GREE lose packets.. and that library return communication error if hvac doesn't respond, so finally even after any operation on demand (e.g. turn on) device could go to offline. I written (to get to know python and HA development API) new python library and custom integration which solve that issues: https://github.com/matizk144/greeFullForHA Project is draft and under tests, but if it'll work stable.. official GREE integration could be updated with fixes which I proposed in my library

MichalBury commented 6 months ago

Hello, I have installed your component and testing it. But there is a warning in HA log: 2024-01-05 08:14:20.357 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop by custom integration 'gree_full' at custom_components/gree_full/entities/greeClimate.py, line 13: await self.greeClimateApi.initialize(), please report it to the author of the 'gree_full' custom integration

matizk144 commented 6 months ago

Hello @MichalBury. I know the issue. As I said, i'm new in python and I implemented pyrhon couroutine in wrong way. I wanted to launch IO calls in async way, but, seems, that is wrongly done. I'll try to fix it. Repo is new and not support fahrenheit degrees as well. If people interest integration missing parts will be added. As well as we could integrate it to offical plugin (by refactoring it)

Latulippe9 commented 6 months ago

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

MichalBury commented 5 months ago

Hello @matizk144, no problem with the warning at now. The integration runs without problems till now. The "weird" Thing is, now also the official "gree climate" integration has no problems. I have both intergrations running now on same system. As soon I remove "gree_full" the problem with timeout starts again.

issue-triage-workflows[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

ic-dev21 commented 2 months ago

Still an issue.

Le dim. 7 avr. 2024 à 07:05, issue-triage-workflows[bot] < @.***> a écrit :

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/69351#issuecomment-2041431077, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZZGCFKDZJLYURLYBH5TZM3Y4ESBJAVCNFSM5SS44KQ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBUGE2DGMJQG43Q . You are receiving this because you commented.Message ID: @.***>

omarkhali commented 2 months ago

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

codedesperate commented 2 months ago

Just setup gree integration for the first time on latest. I ran into this issue and found this upon googling it. Seems it's a very long standing problem.

I'm thinking to make an automation that just loops the command until it is successful.

image

ic-dev21 commented 2 months ago

I did that for a few of my automations that I don’t want to ever fail.

I can share them if you want.

Le mar. 30 avr. 2024 à 04:29, codedesperate @.***> a écrit :

Just setup gree integration for the first time on latest. I ran in to this issue and found this upon googling it. Seems it a very long standing problem.

I'm thinking to make a automation that just loops the command until it is successful.

image.png (view on web) https://github.com/home-assistant/core/assets/29740063/554d0b6c-3b23-4531-a345-7199f6d2b87f

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/69351#issuecomment-2084701984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZZGCFIOEOTP7J3XECURBXDY75JAHAVCNFSM5SS44KQ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBYGQ3TAMJZHA2A . You are receiving this because you commented.Message ID: @.***>

codedesperate commented 2 months ago

I did that for a few of my automations that I don’t want to ever fail. I can share them if you want.

Please do, that would be helpful 👍

EDIT Actually, I've just done it myself now. I used a while repeat, and a 30 second delay :)

repeat:
  sequence:
    - delay:
        hours: 0
        minutes: 0
        seconds: 30
        milliseconds: 0
  while:
    - condition: state
      entity_id: climate.1edeb718
      state: unavailable
WallK commented 1 month ago

I've blocked internet for my Gree ACs and the started behaving like this (but with lower frequency) image

But restoring the internet access to one of them made connection dead stable (for more than an hour test) image

mikko commented 1 month ago

I had this problem for a long time after I blocked the AC from calling home to China. After configuring a mock server for the AC it started working properly and it has been working for months already with absolutely no disconnects.

WallK commented 1 month ago

@mikko > After configuring a mock server for the AC Could you elaborate how you did that?

mikko commented 1 month ago

@WallK I'm running this on my home server with appropriate DNS configuration on my router https://github.com/emtek-at/GreeAC-DummyServer

IIRC You need to be able to change the server domain of the AC and for my unit this worked

https://github.com/makemeafirewall/GreeAC-ConfigTool

It was quite a hassle to make working but worth it

WallK commented 1 month ago

@mikko thank you! I will try this by overriding DNS for domain I've sniffed from the ACs calls home Changing domain in the AC does seem like a hassle haha

Update: adding info-acq.gree.com and dis.gree.com in DNS records and putting dis.gree.com in the mock server env var did the trick! Thank you very much!

galandilias commented 1 month ago

2024-05-27 08:30:07.360 WARNING (MainThread) [homeassistant.components.gree.bridge] Device is unavailable: gree-c699a74a (Device: c699a74a @ 192.168.12.42:7000 (mac: 502cc699a74a)) 2024-05-27 08:30:07.361 ERROR (MainThread) [homeassistant.components.gree.bridge] Error fetching gree-c699a74a data: Device gree-c699a74a is unavailable 2024-05-27 08:32:27.360 WARNING (MainThread) [homeassistant.components.gree.bridge] Device is unavailable: gree-c699a74a (Device: c699a74a @ 192.168.12.42:7000 (mac: 502cc699a74a)) 2024-05-27 08:32:27.360 ERROR (MainThread) [homeassistant.components.gree.bridge] Error fetching gree-c699a74a data: Device gree-c699a74a is unavailable 2024-05-27 08:34:47.360 WARNING (MainThread) [homeassistant.components.gree.bridge] Device is unavailable: gree-c699a74a (Device: c699a74a @ 192.168.12.42:7000 (mac: 502cc699a74a)) 2024-05-27 08:34:47.360 ERROR (MainThread) [homeassistant.components.gree.bridge] Error fetching gree-c699a74a data: Device gree-c699a74a is unavailable 2024-05-27 08:50:30.045 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities fan.mi_smart_standing_fan_2_lite are missing or not currently available 2024-05-27 13:09:21.485 WARNING (MainThread) [homeassistant.components.gree.bridge] Device is unavailable: gree-c699a74a (Device: c699a74a @ 192.168.12.42:7000 (mac: 502cc699a74a)) 2024-05-27 13:09:21.485 ERROR (MainThread) [homeassistant.components.gree.bridge] Error fetching gree-c699a74a data: Device gree-c699a74a is unavailable 2024-05-27 13:12:31.484 WARNING (MainThread) [homeassistant.components.gree.bridge] Device is unavailable: gree-c699a74a (Device: c699a74a @ 192.168.12.42:7000 (mac: 502cc699a74a)) 2024-05-27 13:12:31.484 ERROR (MainThread) [homeassistant.components.gree.bridge] Error fetching gree-c699a74a data: Device gree-c699a74a is unavailable 2024-05-27 13:14:51.483 WARNING (MainThread) [homeassistant.components.gree.bridge] Device is unavailable: gree-c699a74a (Device: c699a74a @ 192.168.12.42:7000 (mac: 502cc699a74a)) 2024-05-27 13:14:51.483 ERROR (MainThread) [homeassistant.components.gree.bridge] Error fetching gree-c699a74a data: Device gree-c699a74a is unavailable 2024-05-27 13:19:12.485 WARNING (MainThread) [homeassistant.components.gree.bridge] Device is unavailable: gree-c699a74a (Device: c699a74a @ 192.168.12.42:7000 (mac: 502cc699a74a)) 2024-05-27 13:19:12.485 ERROR (MainThread) [homeassistant.components.gree.bridge] Error fetching gree-c699a74a data: Device gree-c699a74a is unavailable 2024-05-27 17:04:22.483 WARNING (MainThread) [homeassistant.components.gree.bridge] Device is unavailable: gree-c699a74a (Device: c699a74a @ 192.168.12.42:7000 (mac: 502cc699a74a)) 2024-05-27 17:04:22.483 ERROR (MainThread) [homeassistant.components.gree.bridge] Error fetching gree-c699a74a data: Device gree-c699a74a is unavailable 2024-05-27 17:52:32.482 WARNING (MainThread) [homeassistant.components.gree.bridge] Device is unavailable: gree-c699a74a (Device: c699a74a @ 192.168.12.42:7000 (mac: 502cc699a74a)) 2024-05-27 17:52:32.482 ERROR (MainThread) [homeassistant.components.gree.bridge] Error fetching gree-c699a74a data: Device gree-c699a74a is unavailable 2024-05-27 17:54:52.483 WARNING (MainThread) [homeassistant.components.gree.bridge] Device is unavailable: gree-c699a74a (Device: c699a74a @ 192.168.12.42:7000 (mac: 502cc699a74a)) 2024-05-27 17:54:52.483 ERROR (MainThread) [homeassistant.components.gree.bridge] Error fetching gree-c699a74a data: Device gree-c699a74a is unavailable 2024-05-27 17:57:12.484 WARNING (MainThread) [homeassistant.components.gree.bridge] Device is unavailable: gree-c699a74a (Device: c699a74a @ 192.168.12.42:7000 (mac: 502cc699a74a)) 2024-05-27 17:57:12.485 ERROR (MainThread) [homeassistant.components.gree.bridge] Error fetching gree-c699a74a data: Device gree-c699a74a is unavailable 2024-05-27 18:01:33.483 WARNING (MainThread) [homeassistant.components.gree.bridge] Device is unavailable: gree-c699a74a (Device: c699a74a @ 192.168.12.42:7000 (mac: 502cc699a74a)) 2024-05-27 18:01:33.483 ERROR (MainThread) [homeassistant.components.gree.bridge] Error fetching gree-c699a74a data: Device gree-c699a74a is unavailable

Anything of above resolves the problem? I currently let the device to connect to the producer server - but still HA logs a lot of unavailability - what is even worse - device beeps randomly (single beep from time to time...) - I bet this is related to sth like reconnect or sth

WallK commented 1 month ago

@galandilias mock server should resolve this Mine didn't beep, but disconnected all the time

stomko11 commented 1 month ago

I have been having issues, until certain point when one of ACs failed to connect at all (it was always unavailable, while OK in app). I switched to alternative integration https://github.com/RobHofmann/HomeAssistant-GreeClimateComponent which works OK for me

AdrianFasie commented 3 weeks ago

Hello all,

I have a info that maybe could help you to identify the issue. Last year I bought an AC model gwh12agb-k6dna1a which could be easily added in Home assistant using the oficial Gree Integration. 2 weeks ago I bought a second one (model gwh12agbxb-k6dna1a) and I have the well known issue with availability (mostly not available / accessible from HA). As can be seen in the image below, even if they have the same MID, the firmware is different and I cannot update the second one to 2.06. Is there a way to force to update it? Or maybe the hardware is different and this is why it is not possible... AC issue

Using GREE+ app, both work fine. On the official GREE website, they provide GREE WIFI Smart app. After installing this app, I got a pop-up info saying that for Europe I need to use EWPE Smart which is 100% identical with GREE+

It would be great if someone could fix the issue in the official Home Assistant Integration for AC with firmware V1.21

Thank you, Adrian

codedesperate commented 3 weeks ago

Hmm, I have firmware 3.75 and I have this issue too.

Screenshot_20240610-104506

AdrianFasie commented 3 weeks ago

It is amazing how devices with the same MID have different Firmware versions. I am wondering how do they decide which firmware to use if not based on MID? It could be based on model number which it is not shown in APP, but only written on device. As I mentioned, I have 2 models (gwh12agbxb-k6dna1a and gwh12agb-k6dna1a) both having different Firmware versions. @codedesperate: Could you please let us know what is your model? As long as you have 3.75, I suppose you have a different model than me.

User8395 commented 1 week ago

I have this issue too. We set up three more Gree ACs yesterday to make a total of 4 ACs and only the one set up a while ago works fine. The 3 new ACs connect but don't show temperature. Changing the mode from Home Assistant doesn't do anything on the AC itself. It also becomes unavailable after about 30 seconds with the error "This entity is no longer being provided by the Gree integration". Control works fine from Gree+. An error is shown from the core logs "Timeout trying to bind to gree device".