Closed frankyman88 closed 1 year 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!
(message by CodeOwnersMention)
gree documentation gree source (message by IssueLinks)
I think you've filtered most of the error out from your logs, please recheck around these lines as they are the critical part:
File "/usr/local/lib/python3.10/site-packages/greeclimate/network.py", line 107, in datagram_received
File "/usr/local/lib/python3.10/site-packages/greeclimate/network.py", line 131, in decrypt_payload
Without the rest of the error I cannot say for certain, but newer models may have changed how their encryption is done making it unsupported until someone reverse engineers it.
Hey @cmroche , Thanks for your reply! I guess I wasn't clear enough about which units are connected etc. The log doesn't actually mention my new unit at all; it has IP 192.168.1.65 and MAC 502cc6a52329. The other 4 units seem to send a packet back in reply to the scan packet, but this device doesn't respond at all from what I can tell. I am trying to get a firmware update/rollback for the unit to see if that changes anything. Have copied the a more complete excerpt from the log below in case it changes anything but I don't think so :(
2022-12-04 10:42:29.060 DEBUG (MainThread) [homeassistant.components.gree] Scanning network for Gree devices 2022-12-04 10:42:29.060 INFO (MainThread) [greeclimate.discovery] Scanning for Gree devices ... 2022-12-04 10:42:29.069 DEBUG (MainThread) [greeclimate.discovery] Listening for devices on 192.168.1.255 2022-12-04 10:42:29.071 DEBUG (MainThread) [greeclimate.discovery] Listening for devices on 192.168.0.255 2022-12-04 10:42:29.072 DEBUG (MainThread) [greeclimate.discovery] Listening for devices on 255.255.255.255 2022-12-04 10:42:29.101 DEBUG (MainThread) [greeclimate.network] Sending packet: {"t": "scan"} 2022-12-04 10:42:29.102 DEBUG (MainThread) [greeclimate.network] Sending packet: {"t": "scan"} 2022-12-04 10:42:29.102 DEBUG (MainThread) [greeclimate.network] Sending packet: {"t": "scan"} 2022-12-04 10:42:29.408 DEBUG (MainThread) [greeclimate.network] Received packet from 192.168.1.33: {"t": "pack", "i": 1, "uid": 0, "cid": "502cc67debe8", "tcid": "3d8d412a0eb9", "pack": {"t": "dev", "cid": "502cc67debe8", "bc": "", "brand": "gree", "catalog": "gree", "mac": "502cc67debe8", "mid": "10001", "model": "gree", "name": "c67debe8", "series": "gree", "vender": "1", "ver": "V1.2.1", "lock": 0}} 2022-12-04 10:42:29.419 INFO (MainThread) [greeclimate.discovery] Found gree device Device: c67debe8 @ 192.168.1.33:7000 (mac: 502cc67debe8) 2022-12-04 10:42:29.428 DEBUG (MainThread) [greeclimate.network] Received packet from 192.168.1.15: {"t": "pack", "i": 1, "uid": 0, "cid": "502cc680c2fe", "tcid": "557246de51b1", "pack": {"t": "dev", "cid": "502cc680c2fe", "bc": "", "brand": "gree", "catalog": "gree", "mac": "502cc680c2fe", "mid": "10001", "model": "gree", "name": "c680c2fe", "series": "gree", "vender": "1", "ver": "V1.2.1", "lock": 0}} 2022-12-04 10:42:29.438 INFO (MainThread) [greeclimate.device] Starting device binding to Device: c67debe8 @ 192.168.1.33:7000 (mac: 502cc67debe8) 2022-12-04 10:42:29.444 INFO (MainThread) [greeclimate.discovery] Found gree device Device: c680c2fe @ 192.168.1.15:7000 (mac: 502cc680c2fe) 2022-12-04 10:42:29.446 DEBUG (MainThread) [greeclimate.network] Received packet from 192.168.1.24: {"t": "pack", "i": 1, "uid": 0, "cid": "502cc680c3bf", "tcid": "4a5db458f491", "pack": {"t": "dev", "cid": "502cc680c3bf", "bc": "", "brand": "gree", "catalog": "gree", "mac": "502cc680c3bf", "mid": "10001", "model": "gree", "name": "c680c3bf", "series": "gree", "vender": "1", "ver": "V1.2.1", "lock": 0}} 2022-12-04 10:42:29.451 INFO (MainThread) [greeclimate.device] Starting device binding to Device: c680c2fe @ 192.168.1.15:7000 (mac: 502cc680c2fe) 2022-12-04 10:42:29.452 INFO (MainThread) [greeclimate.discovery] Found gree device Device: c680c3bf @ 192.168.1.24:7000 (mac: 502cc680c3bf) 2022-12-04 10:42:29.453 DEBUG (MainThread) [greeclimate.network] Received packet from 192.168.1.223: {"t": "pack", "i": 1, "uid": 0, "cid": "502cc67f6ee3", "tcid": "510d57d7e8d6", "pack": {"t": "dev", "cid": "502cc67f6ee3", "bc": "", "brand": "gree", "catalog": "gree", "mac": "502cc67f6ee3", "mid": "10001", "model": "gree", "name": "c67f6ee3", "series": "gree", "vender": "1", "ver": "V1.2.1", "lock": 0}} 2022-12-04 10:42:29.465 DEBUG (MainThread) [greeclimate.network] Sending packet: {"cid": "app", "i": 1, "t": "pack", "uid": 0, "tcid": "502cc67debe8", "pack": {"mac": "502cc67debe8", "t": "bind", "uid": 0}} 2022-12-04 10:42:29.468 INFO (MainThread) [greeclimate.device] Starting device binding to Device: c680c3bf @ 192.168.1.24:7000 (mac: 502cc680c3bf) 2022-12-04 10:42:29.469 INFO (MainThread) [greeclimate.discovery] Found gree device Device: c67f6ee3 @ 192.168.1.223:7000 (mac: 502cc67f6ee3) 2022-12-04 10:42:29.472 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback _SelectorDatagramTransport._read_ready() Traceback (most recent call last): File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 1027, in _read_ready self._protocol.datagram_received(data, addr) File "/config/greeclimate/network.py", line 107, in datagram_received obj["pack"] = DeviceProtocol2.decrypt_payload(obj["pack"], key) File "/config/greeclimate/network.py", line 131, in decrypt_payload decrypted = cipher.decrypt(decoded).decode() File "/usr/local/lib/python3.10/site-packages/Crypto/Cipher/_mode_ecb.py", line 196, in decrypt raise ValueError("Data must be aligned to block boundary in ECB mode") ValueError: Data must be aligned to block boundary in ECB mode 2022-12-04 10:42:29.482 DEBUG (MainThread) [greeclimate.network] Sending packet: {"cid": "app", "i": 1, "t": "pack", "uid": 0, "tcid": "502cc680c2fe", "pack": {"mac": "502cc680c2fe", "t": "bind", "uid": 0}} 2022-12-04 10:42:29.483 INFO (MainThread) [greeclimate.device] Starting device binding to Device: c67f6ee3 @ 192.168.1.223:7000 (mac: 502cc67f6ee3) 2022-12-04 10:42:29.495 DEBUG (MainThread) [greeclimate.network] Sending packet: {"cid": "app", "i": 1, "t": "pack", "uid": 0, "tcid": "502cc680c3bf", "pack": {"mac": "502cc680c3bf", "t": "bind", "uid": 0}} 2022-12-04 10:42:29.504 DEBUG (MainThread) [greeclimate.network] Sending packet: {"cid": "app", "i": 1, "t": "pack", "uid": 0, "tcid": "502cc67f6ee3", "pack": {"mac": "502cc67f6ee3", "t": "bind", "uid": 0}} 2022-12-04 10:42:29.522 DEBUG (MainThread) [greeclimate.network] Received packet: {"t": "pack", "i": 1, "uid": 0, "cid": "502cc67debe8", "tcid": "3d8d412a0eb9", "pack": {"t": "bindok", "mac": "502cc67debe8", "key": "N4C96y1n6dK0Z5Ov", "r": 200}} 2022-12-04 10:42:29.522 INFO (MainThread) [greeclimate.device] Bound to device using key N4C96y1n6dK0Z5Ov 2022-12-04 10:42:29.522 INFO (MainThread) [homeassistant.components.gree.bridge] Adding Gree device c67debe8 at 192.168.1.33:7000 2022-12-04 10:42:29.523 DEBUG (MainThread) [greeclimate.device] Updating device properties for (Device: c67debe8 @ 192.168.1.33:7000 (mac: 502cc67debe8)) 2022-12-04 10:42:29.527 DEBUG (MainThread) [greeclimate.network] Received packet: {"t": "pack", "i": 1, "uid": 0, "cid": "502cc680c2fe", "tcid": "557246de51b1", "pack": {"t": "bindok", "mac": "502cc680c2fe", "key": "cJq2F6Tb8p2El4z9", "r": 200}} 2022-12-04 10:42:29.527 INFO (MainThread) [greeclimate.device] Bound to device using key cJq2F6Tb8p2El4z9 2022-12-04 10:42:29.527 INFO (MainThread) [homeassistant.components.gree.bridge] Adding Gree device c680c2fe at 192.168.1.15:7000 2022-12-04 10:42:29.527 DEBUG (MainThread) [greeclimate.device] Updating device properties for (Device: c680c2fe @ 192.168.1.15:7000 (mac: 502cc680c2fe)) 2022-12-04 10:42:29.533 DEBUG (MainThread) [greeclimate.network] Sending packet: {"cid": "app", "i": 0, "t": "pack", "uid": 0, "tcid": "502cc67debe8", "pack": {"mac": "502cc67debe8", "t": "status", "cols": ["Pow", "Mod", "SetTem", "TemSen", "TemUn", "TemRec", "WdSpd", "Air", "Blo", "Health", "SwhSlp", "SlpMod", "Lig", "SwingLfRig", "SwUpDn", "Quiet", "Tur", "StHt", "SvSt", "HeatCoolType"]}} 2022-12-04 10:42:29.534 DEBUG (MainThread) [greeclimate.network] Received packet: {"t": "pack", "i": 1, "uid": 0, "cid": "502cc680c3bf", "tcid": "4a5db458f491", "pack": {"t": "bindok", "mac": "502cc680c3bf", "key": "gNvD5S9H4VC5R0G6", "r": 200}} 2022-12-04 10:42:29.535 INFO (MainThread) [greeclimate.device] Bound to device using key gNvD5S9H4VC5R0G6 2022-12-04 10:42:29.535 INFO (MainThread) [homeassistant.components.gree.bridge] Adding Gree device c680c3bf at 192.168.1.24:7000 2022-12-04 10:42:29.535 DEBUG (MainThread) [greeclimate.device] Updating device properties for (Device: c680c3bf @ 192.168.1.24:7000 (mac: 502cc680c3bf)) 2022-12-04 10:42:29.538 DEBUG (MainThread) [greeclimate.network] Sending packet: {"cid": "app", "i": 0, "t": "pack", "uid": 0, "tcid": "502cc680c2fe", "pack": {"mac": "502cc680c2fe", "t": "status", "cols": ["Pow", "Mod", "SetTem", "TemSen", "TemUn", "TemRec", "WdSpd", "Air", "Blo", "Health", "SwhSlp", "SlpMod", "Lig", "SwingLfRig", "SwUpDn", "Quiet", "Tur", "StHt", "SvSt", "HeatCoolType"]}} 2022-12-04 10:42:29.810 DEBUG (MainThread) [greeclimate.network] Sending packet: {"cid": "app", "i": 0, "t": "pack", "uid": 0, "tcid": "502cc680c3bf", "pack": {"mac": "502cc680c3bf", "t": "status", "cols": ["Pow", "Mod", "SetTem", "TemSen", "TemUn", "TemRec", "WdSpd", "Air", "Blo", "Health", "SwhSlp", "SlpMod", "Lig", "SwingLfRig", "SwUpDn", "Quiet", "Tur", "StHt", "SvSt", "HeatCoolType"]}} 2022-12-04 10:42:29.826 DEBUG (MainThread) [greeclimate.network] Received packet: {"t": "pack", "i": 1, "uid": 0, "cid": "502cc67f6ee3", "tcid": "510d57d7e8d6", "pack": {"t": "bindok", "mac": "502cc67f6ee3", "key": "1HouBj4x8Mt0h5Wd", "r": 200}} 2022-12-04 10:42:29.827 INFO (MainThread) [greeclimate.device] Bound to device using key 1HouBj4x8Mt0h5Wd 2022-12-04 10:42:29.827 INFO (MainThread) [homeassistant.components.gree.bridge] Adding Gree device c67f6ee3 at 192.168.1.223:7000 2022-12-04 10:42:29.827 DEBUG (MainThread) [greeclimate.device] Updating device properties for (Device: c67f6ee3 @ 192.168.1.223:7000 (mac: 502cc67f6ee3)) 2022-12-04 10:42:29.868 DEBUG (MainThread) [greeclimate.network] Sending packet: {"cid": "app", "i": 0, "t": "pack", "uid": 0, "tcid": "502cc67f6ee3", "pack": {"mac": "502cc67f6ee3", "t": "status", "cols": ["Pow", "Mod", "SetTem", "TemSen", "TemUn", "TemRec", "WdSpd", "Air", "Blo", "Health", "SwhSlp", "SlpMod", "Lig", "SwingLfRig", "SwUpDn", "Quiet", "Tur", "StHt", "SvSt", "HeatCoolType"]}} 2022-12-04 10:42:29.875 DEBUG (MainThread) [greeclimate.network] Received packet: {"t": "pack", "i": 0, "uid": 0, "cid": "502cc67debe8", "tcid": "3d8d412a0eb9", "pack": {"t": "dat", "mac": "502cc67debe8", "r": 200, "cols": ["Pow", "Mod", "SetTem", "TemSen", "TemUn", "TemRec", "WdSpd", "Air", "Blo", "Health", "SwhSlp", "SlpMod", "Lig", "SwingLfRig", "SwUpDn", "Quiet", "Tur", "StHt", "SvSt", "HeatCoolType"], "dat": [0, 1, 25, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}} 2022-12-04 10:42:29.879 DEBUG (MainThread) [greeclimate.network] Received packet: {"t": "pack", "i": 0, "uid": 0, "cid": "502cc680c2fe", "tcid": "557246de51b1", "pack": {"t": "dat", "mac": "502cc680c2fe", "r": 200, "cols": ["Pow", "Mod", "SetTem", "TemSen", "TemUn", "TemRec", "WdSpd", "Air", "Blo", "Health", "SwhSlp", "SlpMod", "Lig", "SwingLfRig", "SwUpDn", "Quiet", "Tur", "StHt", "SvSt", "HeatCoolType"], "dat": [0, 1, 26, 67, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]}} 2022-12-04 10:42:29.889 DEBUG (MainThread) [greeclimate.network] Sending packet: {"cid": "app", "i": 0, "t": "pack", "uid": 0, "tcid": "502cc67debe8", "pack": {"mac": "502cc67debe8", "t": "status", "cols": ["hid"]}} 2022-12-04 10:42:29.890 DEBUG (MainThread) [greeclimate.network] Received packet: {"t": "pack", "i": 0, "uid": 0, "cid": "502cc680c3bf", "tcid": "4a5db458f491", "pack": {"t": "dat", "mac": "502cc680c3bf", "r": 200, "cols": ["Pow", "Mod", "SetTem", "TemSen", "TemUn", "TemRec", "WdSpd", "Air", "Blo", "Health", "SwhSlp", "SlpMod", "Lig", "SwingLfRig", "SwUpDn", "Quiet", "Tur", "StHt", "SvSt", "HeatCoolType"], "dat": [1, 3, 25, 66, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0]}} 2022-12-04 10:42:29.893 DEBUG (MainThread) [greeclimate.network] Sending packet: {"cid": "app", "i": 0, "t": "pack", "uid": 0, "tcid": "502cc680c2fe", "pack": {"mac": "502cc680c2fe", "t": "status", "cols": ["hid"]}} 2022-12-04 10:42:29.896 DEBUG (MainThread) [greeclimate.network] Sending packet: {"cid": "app", "i": 0, "t": "pack", "uid": 0, "tcid": "502cc680c3bf", "pack": {"mac": "502cc680c3bf", "t": "status", "cols": ["hid"]}} 2022-12-04 10:42:30.003 DEBUG (MainThread) [greeclimate.network] Received packet: {"t": "pack", "i": 0, "uid": 0, "cid": "502cc680c2fe", "tcid": "557246de51b1", "pack": {"t": "dat", "mac": "502cc680c2fe", "r": 200, "cols": ["hid"], "dat": ["362001064307+U-QCOM4004CV1.00.bin"]}} 2022-12-04 10:42:30.004 DEBUG (MainThread) [homeassistant.components.gree.bridge] Finished fetching gree-c680c2fe data in 0.477 seconds (success: True) 2022-12-04 10:42:30.009 DEBUG (MainThread) [greeclimate.network] Received packet: {"t": "pack", "i": 0, "uid": 0, "cid": "502cc67f6ee3", "tcid": "510d57d7e8d6", "pack": {"t": "dat", "mac": "502cc67f6ee3", "r": 200, "cols": ["Pow", "Mod", "SetTem", "TemSen", "TemUn", "TemRec", "WdSpd", "Air", "Blo", "Health", "SwhSlp", "SlpMod", "Lig", "SwingLfRig", "SwUpDn", "Quiet", "Tur", "StHt", "SvSt", "HeatCoolType"], "dat": [0, 1, 25, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 0, 1, 0, 0, 0]}} 2022-12-04 10:42:30.011 DEBUG (MainThread) [greeclimate.network] Received packet: {"t": "pack", "i": 0, "uid": 0, "cid": "502cc680c3bf", "tcid": "4a5db458f491", "pack": {"t": "dat", "mac": "502cc680c3bf", "r": 200, "cols": ["hid"], "dat": ["362001064307+U-QCOM4004CV1.00.bin"]}} 2022-12-04 10:42:30.011 DEBUG (MainThread) [homeassistant.components.gree.bridge] Finished fetching gree-c680c3bf data in 0.476 seconds (success: True) 2022-12-04 10:42:30.034 DEBUG (MainThread) [greeclimate.network] Sending packet: {"cid": "app", "i": 0, "t": "pack", "uid": 0, "tcid": "502cc67f6ee3", "pack": {"mac": "502cc67f6ee3", "t": "status", "cols": ["hid"]}} 2022-12-04 10:42:30.129 DEBUG (MainThread) [greeclimate.network] Received packet: {"t": "pack", "i": 0, "uid": 0, "cid": "502cc67debe8", "tcid": "3d8d412a0eb9", "pack": {"t": "dat", "mac": "502cc67debe8", "r": 200, "cols": ["hid"], "dat": ["362001064307+U-QCOM4004CV1.00.bin"]}} 2022-12-04 10:42:30.129 DEBUG (MainThread) [homeassistant.components.gree.bridge] Finished fetching gree-c67debe8 data in 0.607 seconds (success: True) 2022-12-04 10:42:30.173 DEBUG (MainThread) [greeclimate.network] Received packet: {"t": "pack", "i": 0, "uid": 0, "cid": "502cc67f6ee3", "tcid": "510d57d7e8d6", "pack": {"t": "dat", "mac": "502cc67f6ee3", "r": 200, "cols": ["hid"], "dat": ["362001064307+U-QCOM4004CV1.00.bin"]}} 2022-12-04 10:42:30.174 DEBUG (MainThread) [homeassistant.components.gree.bridge] Finished fetching gree-c67f6ee3 data in 0.347 seconds (success: True) 2022-12-04 10:42:47.480 ERROR (MainThread) [homeassistant.components.google_assistant.http] Request for https://homegraph.googleapis.com/v1/devices:requestSync failed: 500 2022-12-04 10:43:30.004 DEBUG (MainThread) [greeclimate.device] Updating device properties for (Device: c680c3bf @ 192.168.1.24:7000 (mac: 502cc680c3bf)) 2022-12-04 10:43:30.068 DEBUG (MainThread) [greeclimate.device] Updating device properties for (Device: c680c2fe @ 192.168.1.15:7000 (mac: 502cc680c2fe)) 2022-12-04 10:43:30.074 DEBUG (MainThread) [greeclimate.device] Updating device properties for (Device: c67debe8 @ 192.168.1.33:7000 (mac: 502cc67debe8)) 2022-12-04 10:43:30.074 DEBUG (MainThread) [greeclimate.device] Updating device properties for (Device: c67f6ee3 @ 192.168.1.223:7000 (mac: 502cc67f6ee3))
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.
The problem
I own five GREE brand airconditioners, four of which were purchased late 2021 and one purchased later, mid 2022. The four original units are all discovered and functioning fine with the Gree Integration. However, the newer unit does not seem to be discovered at all (see attached logs, it has IP 192.168.1.66 and MAC 50:2c:c6:a5:23:29 which is not appearing in the log at all).
The Model number of the new unit is GREE GWH09AAC-K6DNA1A/I, which is exactly the same as two of the old units. I have linked all of the units using the Gree+ Android app, and they all work fine with that. The only difference I could notice is that, in the Gree+ app, the older units have firmware "V1.00" and newer unit has "V3.73".
I wonder if the company has changed the discovery packet/communications protocol somehow? If so, I am happy to try more diagnostics but not really sure where to start.
I have my home assistant instance on two separate networks, 192.168.1.0 and 192.168.0.0, and have tried connecting it to each network, separate from the other units. I've reset and reconnected to my wifi countless times using both the Gree+ and EWPE apps without any luck. I was able to follow the instructions here to link the AC to my WIFI separately to the app, it didn't fix the problem: https://github.com/arthurkrupa/gree-hvac-mqtt-bridge#configuring-hvac-wifi
I also tried this gree custom component which had the same problem: https://github.com/RobHofmann/HomeAssistant-GreeClimateComponent
What version of Home Assistant Core has the issue?
core-2022.11.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
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?
Additional information
No response