core icon indicating copy to clipboard operation
core copied to clipboard

Gree climate state not updated till you reload integration.

Open simtreti opened this issue 1 year ago • 26 comments

The problem

Hi,

I have this symptom that happen when i'm using Alexa to send command to my Gree Heat Pump unit, the state aren't updated on HA like it was in the past. The state remain on the last one it have been sent from HA previously. If I reload the integration the state is updated succefully though.

Like on the log I attached i asked Alexa to close the heat pump unit from dry mode and the Climate entities still remain in dry mode even if it's closed now.

Do you need some log ?

What version of Home Assistant Core has the issue?

2024.8

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 Climate

Link to integration documentation on our website

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

Diagnostics information

home-assistant_gree_2024-08-12T23-50-22.106Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

2024-08-12 19:49:25.655 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Updating device state: gree-502cc6d41f2e, error count: 0 2024-08-12 19:49:25.655 DEBUG (MainThread) [greeclimate.device] Updating device properties for (Device: 502cc6d41f2e @ 192.168.50.191:7000 (mac: 502cc6d41f2e)) 2024-08-12 19:49:25.655 DEBUG (MainThread) [greeclimate.network] Sending packet: -> {"cid": "app", "i": 0, "t": "pack", "uid": 0, "tcid": "502cc6d41f2e", "pack": {"t": "status", "mac": "502cc6d41f2e", "cols": ["Pow", "Mod", "Dwet", "DwatSen", "Dfltr", "DwatFul", "Dmod", "SetTem", "TemSen", "TemUn", "TemRec", "WdSpd", "Air", "Blo", "Health", "SwhSlp", "SlpMod", "Lig", "SwingLfRig", "SwUpDn", "Quiet", "Tur", "StHt", "SvSt", "HeatCoolType"]}} 2024-08-12 19:49:25.655 DEBUG (MainThread) [greeclimate.cipher] Encrypting data: {'t': 'status', 'mac': '502cc6d41f2e', 'cols': ['Pow', 'Mod', 'Dwet', 'DwatSen', 'Dfltr', 'DwatFul', 'Dmod', 'SetTem', 'TemSen', 'TemUn', 'TemRec', 'WdSpd', 'Air', 'Blo', 'Health', 'SwhSlp', 'SlpMod', 'Lig', 'SwingLfRig', 'SwUpDn', 'Quiet', 'Tur', 'StHt', 'SvSt', 'HeatCoolType']} 2024-08-12 19:49:25.655 DEBUG (MainThread) [greeclimate.cipher] Encrypted data: a/mlF6JV42aDZDCMx2dWvudHzQ/fjHcOztsMe21sivhpPMOF7TG3XZj2dfARhjxZ/ZQysLddGSduToPcmpbzVGkqXpCz6br9NOGXG70EbWy8CGGU/LCOKQCCoEOaVAlSlLGqZry3Eczzaoc/xaXBtY0vVnqb43spNhSNCATkJM/5sSOWFgDbJvkb/DVLhSDLDTKynuKIQeczPhpKktsGJTDYtoEv5x2ocAPAHnim379ZiN5iQj/Jpa+fIakm6KtlhJnQ/khweEvZYmlL+OAFg482OfBkY7/dyJbGrzpdUfz+rTWRBYtWgO9DJct7e+3VMdPsNblc83L4Ny/Zh6hgvWUu6eEDjyOTASKTKKrpynidlfQRPKw90HI10y5WoShh 2024-08-12 19:49:25.655 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Finished fetching gree-502cc6d41f2e data in 0.001 seconds (success: True) 2024-08-12 19:49:25.666 DEBUG (MainThread) [greeclimate.cipher] Decrypting data: /0dAAniYM5jDt96mCWZxftvd6dMsIVHnjKagY+UxH8Nq9b+2iNZQzspMC5FQyQlOIHoM/8TTaFAIYVbPcxUBoQ16wP3H1hOJWIf6KBRNdxj6vxwXlUz/O1DUfggNFxsY8+NOcC6SpVo50++XZaBLO/SXU3xAdVRCUMGSLusHbr5SKs2t/CaMUL+riiNGL7kxVDT4RuGJrPOGWY3bXS/lxnjNCmb02AqK7EWr3S+vFTLc8mnfvEM1rVs7xQJjYtuD4Am+mDTlAIN/0J584wovrzUzL3caRQ5qO8dDqJjgASJmGO3UCTH6E2zeqn056sKHlj248Ag8MfOr3I6Ge7FKyrMxwz9FMcaEOB9CjHGU/JxB3ePlBLF3FyGfKHTMm/P2xvP8xdB2H7C3inTwvbd6zTjfdosjnuTw8GI+aYfbkUuPxKwfS+bColvfmdAxJSr0xrnxt32RaMduysUSGzXl1w== 2024-08-12 19:49:25.666 DEBUG (MainThread) [greeclimate.cipher] Decrypted data: {"t":"dat","uid":0,"mac":"502cc6d41f2e","cid":"502cc6d41f2e","dat":[0,2,0,0,0,0,0,19,63,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0],"cols":["Pow","Mod","Dwet","DwatSen","Dfltr","DwatFul","Dmod","SetTem","TemSen","TemUn","TemRec","WdSpd","Air","Blo","Health","SwhSlp","SlpMod","Lig","SwingLfRig","SwUpDn","Quiet","Tur","StHt","SvSt","HeatCoolType"],"r":200} 2024-08-12 19:49:25.666 DEBUG (MainThread) [greeclimate.network] Received packet from 192.168.50.191: <- {"t": "pack", "i": 0, "uid": 0, "cid": "502cc6d41f2e", "tcid": "app", "pack": {"t": "dat", "uid": 0, "mac": "502cc6d41f2e", "cid": "502cc6d41f2e", "dat": [0, 2, 0, 0, 0, 0, 0, 19, 63, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "cols": ["Pow", "Mod", "Dwet", "DwatSen", "Dfltr", "DwatFul", "Dmod", "SetTem", "TemSen", "TemUn", "TemRec", "WdSpd", "Air", "Blo", "Health", "SwhSlp", "SlpMod", "Lig", "SwingLfRig", "SwUpDn", "Quiet", "Tur", "StHt", "SvSt", "HeatCoolType"], "r": 200}} 2024-08-12 19:49:25.666 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Device state updated: [{"Pow":0,"Mod":2,"Dwet":0,"DwatSen":0,"Dfltr":0,"DwatFul":0,"Dmod":0,"SetTem":19,"TemSen":63,"TemUn":0,"TemRec":0,"WdSpd":1,"Air":0,"Blo":0,"Health":0,"SwhSlp":0,"SlpMod":0,"Lig":0,"SwingLfRig":0,"SwUpDn":0,"Quiet":0,"Tur":0,"StHt":0,"SvSt":0,"HeatCoolType":0}] 2024-08-12 19:49:25.666 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Manually updated gree-502cc6d41fb2 data 2024-08-12 19:49:25.666 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Device state updated: [{"Pow":0,"Mod":2,"Dwet":0,"DwatSen":0,"Dfltr":0,"DwatFul":0,"Dmod":0,"SetTem":19,"TemSen":63,"TemUn":0,"TemRec":0,"WdSpd":1,"Air":0,"Blo":0,"Health":0,"SwhSlp":0,"SlpMod":0,"Lig":0,"SwingLfRig":0,"SwUpDn":0,"Quiet":0,"Tur":0,"StHt":0,"SvSt":0,"HeatCoolType":0}] 2024-08-12 19:49:25.667 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Manually updated gree-502cc6d41f2e data 2024-08-12 19:49:25.667 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Device state updated: [{"Pow":0,"Mod":2,"Dwet":0,"DwatSen":0,"Dfltr":0,"DwatFul":0,"Dmod":0,"SetTem":19,"TemSen":63,"TemUn":0,"TemRec":0,"WdSpd":1,"Air":0,"Blo":0,"Health":0,"SwhSlp":0,"SlpMod":0,"Lig":0,"SwingLfRig":0,"SwUpDn":0,"Quiet":0,"Tur":0,"StHt":0,"SvSt":0,"HeatCoolType":0}] 2024-08-12 19:49:25.667 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Manually updated gree-c62f123d data 2024-08-12 19:49:25.667 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Device state updated: [{"Pow":0,"Mod":2,"Dwet":0,"DwatSen":0,"Dfltr":0,"DwatFul":0,"Dmod":0,"SetTem":19,"TemSen":63,"TemUn":0,"TemRec":0,"WdSpd":1,"Air":0,"Blo":0,"Health":0,"SwhSlp":0,"SlpMod":0,"Lig":0,"SwingLfRig":0,"SwUpDn":0,"Quiet":0,"Tur":0,"StHt":0,"SvSt":0,"HeatCoolType":0}] 2024-08-12 19:49:25.667 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Manually updated gree-502cc6d41f2e data 2024-08-12 19:49:25.667 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Device state updated: [{"Pow":0,"Mod":2,"Dwet":0,"DwatSen":0,"Dfltr":0,"DwatFul":0,"Dmod":0,"SetTem":19,"TemSen":63,"TemUn":0,"TemRec":0,"WdSpd":1,"Air":0,"Blo":0,"Health":0,"SwhSlp":0,"SlpMod":0,"Lig":0,"SwingLfRig":0,"SwUpDn":0,"Quiet":0,"Tur":0,"StHt":0,"SvSt":0,"HeatCoolType":0}] 2024-08-12 19:49:25.667 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Manually updated gree-502cc6d41fb2 data 2024-08-12 19:49:25.667 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Device state updated: [{"Pow":0,"Mod":2,"Dwet":0,"DwatSen":0,"Dfltr":0,"DwatFul":0,"Dmod":0,"SetTem":19,"TemSen":63,"TemUn":0,"TemRec":0,"WdSpd":1,"Air":0,"Blo":0,"Health":0,"SwhSlp":0,"SlpMod":0,"Lig":0,"SwingLfRig":0,"SwUpDn":0,"Quiet":0,"Tur":0,"StHt":0,"SvSt":0,"HeatCoolType":0}] 2024-08-12 19:49:25.667 DEBUG (MainThread) [homeassistant.components.gree.coordinator] Manually updated gree-c62f123d data 2024-08-12 19:50:02.536 ERROR (MainThread) [custom_components.frigate.api] Error fetching information from http://ccab4aaf-frigate:5000/api/stats: Cannot connect to host ccab4aaf-frigate:5000 ssl:default [Connect call failed ('172.30.33.5', 5000)]

simtreti avatar Aug 12 '24 23:08 simtreti

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)

home-assistant[bot] avatar Aug 12 '24 23:08 home-assistant[bot]

Same here!! I have 2 air conditioners and integration doesn`t update until hit reload.

bmdadu avatar Aug 13 '24 09:08 bmdadu

Pinging @cmroche is just so useless. This guy is either dead or doesn’t give a crap anymore.

This integration is in a sorry state, though this time it was broken by some random change in HA, so it’s not the owners fault.

Can we please just replace this integration with the one from HACS? That one IS maintained and works.

maciejtarmas avatar Aug 13 '24 19:08 maciejtarmas

Same here did anyone knew how to fix the problem?

Nadim-os avatar Aug 13 '24 22:08 Nadim-os

Can we have somebody fix this please?

hellcry37 avatar Aug 14 '24 15:08 hellcry37

restored the HA to the 2024.7.4 and it worked normally so if you have a backup just restore untill someone fix the problem

Nadim-os avatar Aug 14 '24 22:08 Nadim-os

Same problem here :( willing to help with logs if someone knows how to fix this.

mihai-trasca avatar Aug 16 '24 18:08 mihai-trasca

Same problem here !

antonbek89 avatar Aug 19 '24 09:08 antonbek89

This integration is broken on more then "reload" level, when it works and you do clicky click with your HVAC you can see errors in HA even if the action worked.

hellcry37 avatar Aug 19 '24 14:08 hellcry37

@cmroche is anyone there ?

simtreti avatar Aug 20 '24 01:08 simtreti

I was using 2023.9 and decided to upgrade. Well this error is frustrating. I have no backup of previous version :( Any update for this?

neppiak avatar Aug 24 '24 18:08 neppiak

Same problem here after updating to 08

costingheonea avatar Aug 25 '24 08:08 costingheonea

Same here...

alexbohariuc avatar Aug 25 '24 10:08 alexbohariuc

Its safe to downgrade to previous version of ha? New user here. I dont want to configure it again.

costingheonea avatar Aug 25 '24 12:08 costingheonea

Can someone confirm 2024.8.3 is fixing the issue?

costingheonea avatar Aug 26 '24 05:08 costingheonea

why, someone worked on it and I don't know about it?

hellcry37 avatar Aug 26 '24 05:08 hellcry37

Not fixed in 8.3

mihai-trasca avatar Aug 26 '24 05:08 mihai-trasca

For me it's fixed in 2024.8.3

simtreti avatar Aug 26 '24 11:08 simtreti

Are you sure?

costingheonea avatar Aug 26 '24 17:08 costingheonea

Yes I do !

simtreti avatar Aug 27 '24 02:08 simtreti

Yes, seems to be working now. I updated HA only a couple of hours ago, but it seems like my AC automations trigger and correctly turn my 3 Gree units on and off.

Looking at the 2024.8.3 change log, there’s nothing even remotely connected to this issue 🤷‍♂️

maciejtarmas avatar Aug 27 '24 11:08 maciejtarmas

I gave it a try since some of you confirmed that it's working but still the same for me :(

neppiak avatar Aug 27 '24 11:08 neppiak

I can confirm that after update, still not working. I mean, the state of the AC is not updating in HA if the units are turned on/off from Gree App for iOS or from the remote. If I want to know the correct status of the units, I have to only use HA/Home app in iOS and not change the status from other source.

costingheonea avatar Aug 28 '24 06:08 costingheonea

check this solution https://github.com/home-assistant/core/issues/124007#issuecomment-2341794691

akhunduqji avatar Sep 10 '24 19:09 akhunduqji

For anyone getting the VAL error i've being doing trial and error and this is working for me, can anyone else do the same and see if it works for them?

I have no idea what im doing, however, can someone else maybe check if this is correct and if so what do we do next???

I changed line 225 in /usr/local/lib/python3.12/site-packages/greeclimate/network.py from Response.RESULT.value: lambda o, a: [dict(zip(o["pack"]["opt"], o["pack"]["val"]))],

to

Response.RESULT.value: lambda o, a: [dict(zip(o["pack"]["opt"], o["pack"].get("val", o["pack"].get("p", []))))], The errors have now gone in the logs and the units are updating without using the refresh intergration hack.

anyone able to verifiy?

bradleewright avatar Oct 13 '24 12:10 bradleewright

The code tries to access o["pack"]["val"], but in the packets i'm receiving its "p" instead of "val". Anyone who knows what they are doing able to look into it further this is as much as i can figure out and still might be nothing......

bradleewright avatar Oct 13 '24 12:10 bradleewright

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.