deiger / AirCon

Scripts for controlling Air Conditioners, e.g. with HiSense modules.
GNU General Public License v3.0
213 stars 59 forks source link

Failed to decode / failed to handle #261

Open hpmkruit opened 11 months ago

hpmkruit commented 11 months ago

After a reboot of Home Assistant (2023.11.2) the addons throws errors after restart:

E1113 14:59:15.437 query_handlers.py:75] Failed to parse property. Traceback (most recent call last): File "/app/aircon/query_handlers.py", line 141, in _decrypt_and_validate return json.loads(text.decode('utf-8')) File "/usr/local/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.10/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 22 (char 21)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/aircon/query_handlers.py", line 73, in property_update_handler update = self._decrypt_and_validate(device, data) File "/app/aircon/query_handlers.py", line 143, in _decrypt_and_validate raise Error(f'Failed to decode message, {ex!r}:\n{text.decode("utf-8")}') aircon.error.Error: Failed to decode message, JSONDecodeError("Expecting ',' delimiter: line 1 column 22 (char 21)"): {"seq_no":7,"data":{}

When adjusting the temp i get an error log:

I1113 15:05:50.558 mqtt_client.py:37] MQTT message Topic: hisense_ac/083a8883df41/adjust_temperature/command, Payload b'19.0' I1113 15:05:50.571 web_log.py:206] 192.168.2.44 [13/Nov/2023:14:05:50 +0000] "GET /local_lan/commands.json HTTP/1.1" 200 418 "-" "-" I1113 15:05:51.217 query_handlers.py:139] Decrypted: {"seq_no":11,"data":{"name":"operation_source_id","value":2}} E1113 15:05:51.218 query_handlers.py:92] Failed to handle {'seq_no': 11, 'data': {'name': 'operation_source_id', 'value': 2}}. Exception = 'operation_source_id' I1113 15:05:51.219 web_log.py:206] 192.168.2.44 [13/Nov/2023:14:05:51 +0000] "POST /local_lan/property/datapoint.json?echo=true HTTP/1.1" 200 150 "-" "-"

Tried rebooting airco (Fujitsu, FGLair app), but no change

hpmkruit commented 11 months ago

Update: tried reverting HA core to 10.5 and reïnstalling the add-on. Both did not fix the issue above