From 95d4d2c99731579fe997f034a42faf225f3ed1f7 Mon Sep 17 00:00:00 2001 From: mle Date: Sun, 19 May 2024 18:11:58 +0200 Subject: [PATCH] Support fragmented responses also in AA55 protocol. --- goodwe/protocol.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/goodwe/protocol.py b/goodwe/protocol.py index 5669092..37c8b70 100644 --- a/goodwe/protocol.py +++ b/goodwe/protocol.py @@ -504,8 +504,7 @@ def _validate_response(data: bytes, response_type: str) -> bool: data[-2:] is checksum (plain sum of response data incl. header) """ if len(data) <= 8 or len(data) != data[6] + 9: - logger.debug("Response has unexpected length: %d, expected %d.", len(data), data[6] + 9) - return False + raise PartialResponseException(len(data), data[6] + 9) elif response_type: data_rt_int = int.from_bytes(data[4:6], byteorder="big", signed=True) if int(response_type, 16) != data_rt_int: