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
73.3k stars 30.61k forks source link

Gree climate errors after the update #124759

Open OleksandrChekmez opened 2 months ago

OleksandrChekmez commented 2 months ago

The problem

Every time I execute any action on my AC I get error in logs. In addition to this, it looks like AC temperature is not updated.

What version of Home Assistant Core has the issue?

core-2024.8.3

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

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-08-28 11:17:36.618 DEBUG (MainThread) [greeclimate.cipher] Decrypted data: {"t":"res","mac":"9424b84e5556","p":[1],"opt":["Pow"],"r":200}
2024-08-28 11:17:36.618 DEBUG (MainThread) [greeclimate.network] Received packet from 192.168.0.208:
<- {"t": "pack", "i": 0, "uid": 0, "cid": "9424b84e5556", "tcid": "app", "pack": {"t": "res", "mac": "9424b84e5556", "p": [1], "opt": ["Pow"], "r": 200}}
2024-08-28 11:17:36.618 ERROR (MainThread) [greeclimate.network] Error while handling packet
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/greeclimate/network.py", line 235, in packet_received
    param = params.get(resp, lambda o, a: (o, a))(obj, addr)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/greeclimate/network.py", line 225, in <lambda>
    Response.RESULT.value: lambda o, a: [dict(zip(o["pack"]["opt"], o["pack"]["val"]))],
                                                                    ~~~~~~~~~^^^^^^^
KeyError: 'val'

Additional information

No response

home-assistant[bot] commented 2 months ago

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)

tammeryousef1006 commented 2 months ago

same error here repeated daily

2024-08-28 07:00:01.045 ERROR (MainThread) [greeclimate.network] Error while handling packet Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/greeclimate/network.py", line 235, in packet_received param = params.get(resp, lambda o, a: (o, a))(obj, addr) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/greeclimate/network.py", line 225, in Response.RESULT.value: lambda o, a: [dict(zip(o["pack"]["opt"], o["pack"]["val"]))],


KeyError: 'val'
2024-08-28 22:18:06.882 ERROR (MainThread) [greeclimate.network] Error while handling packet
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/greeclimate/network.py", line 235, in packet_received
param = params.get(resp, lambda o, a: (o, a))(obj, addr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/greeclimate/network.py", line 225, in <lambda>
Response.RESULT.value: lambda o, a: [dict(zip(o["pack"]["opt"], o["pack"]["val"]))],
~~~~~~~~~^^^^^^^
KeyError: 'val'
2024-08-28 22:18:09.023 ERROR (MainThread) [greeclimate.network] Error while handling packet
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/greeclimate/network.py", line 235, in packet_received
param = params.get(resp, lambda o, a: (o, a))(obj, addr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/greeclimate/network.py", line 225, in <lambda>
Response.RESULT.value: lambda o, a: [dict(zip(o["pack"]["opt"], o["pack"]["val"]))],
~~~~~~~~~^^^^^^^
KeyError: 'val'
dioni-dev commented 1 month ago

I am having the same issue.

Kind regards

SirTerrific commented 1 month ago

I think I have similar issue since the 2024.8 version. The gree add-on doesn't work. I fixed the IP in the discovery.py. There is the error : 2024-09-05 09:40:11.418 DEBUG (MainThread) [homeassistant.components.gree] Scanning network for Gree devices 2024-09-05 09:40:11.418 INFO (MainThread) [greeclimate.discovery] Scanning for Gree devices ... 2024-09-05 09:40:11.419 DEBUG (MainThread) [greeclimate.discovery] Listening for devices on 255.255.255.255 2024-09-05 09:40:11.421 DEBUG (MainThread) [greeclimate.network] Sending packet: -> {"t": "scan"} 2024-09-05 09:40:11.437 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback _SelectorDatagramTransport._read_ready() (None) Traceback (most recent call last): File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 1238, in _read_ready self._protocol.datagram_received(data, addr) File "/usr/local/lib/python3.12/site-packages/greeclimate/network.py", line 136, in datagram_received obj["pack"] = self._cipher.decrypt(obj["pack"]) ^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'decrypt' With Home Assistant 2024.7, everything works well. Thanks

bradleewright commented 1 month ago

+1 I have the same error in debug

2024-09-08 18:53:16.796 ERROR (MainThread) [greeclimate.network] Error while handling packet Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/greeclimate/network.py", line 235, in packet_received param = params.get(resp, lambda o, a: (o, a))(obj, addr) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/greeclimate/network.py", line 225, in Response.RESULT.value: lambda o, a: [dict(zip(o["pack"]["opt"], o["pack"]["val"]))],


KeyError: 'val'
2024-09-08 18:53:18.848 ERROR (MainThread) [greeclimate.network] Error while handling packet
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/greeclimate/network.py", line 235, in packet_received
    param = params.get(resp, lambda o, a: (o, a))(obj, addr)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/greeclimate/network.py", line 225, in <lambda>
    Response.RESULT.value: lambda o, a: [dict(zip(o["pack"]["opt"], o["pack"]["val"]))],
                                                                    ~~~~~~~~~^^^^^^^
KeyError: 'val'
akhunduqji commented 1 month ago

check this solution to update temperature

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

drob3k commented 1 month ago

Is there any progress with fix?