asantaga / wiserHomeAssistantPlatform

Platform and related climate/sensors to support the Drayton Wiser Home Heating System
MIT License
231 stars 44 forks source link

Error expecting ':' delimiter #436

Closed Chaoscontrol closed 7 months ago

Chaoscontrol commented 8 months ago

Sorry for opening so many issues lately. I'm just trying to clean up my error log that has been increasing for a long while, and tbh most have always been from this integration. Even if I haven't found actual issues when using it. :(

Reporting 2 types of errors here, although they seem very similar.

This error originated from a custom integration.

Logger: custom_components.wiser.coordinator
Source: custom_components/wiser/coordinator.py:150
Integration: Drayton Wiser Integration for Home Assistant (documentation, issues)
First occurred: 8 February 2024 at 12:10:19 (144 occurrences)
Last logged: 15:09:19

Expecting ':' delimiter: line 1 column 1361 (char 1360)
Unterminated string starting at: line 1 column 2770 (char 2769)
Unterminated string starting at: line 1 column 4220 (char 4219)
Unterminated string starting at: line 1 column 1345 (char 1344)
Unterminated string starting at: line 1 column 8790 (char 8789)
This error originated from a custom integration.

Logger: custom_components.wiser.coordinator
Source: helpers/update_coordinator.py:313
Integration: Drayton Wiser Integration for Home Assistant (documentation, issues)
First occurred: 8 February 2024 at 12:10:19 (138 occurrences)
Last logged: 15:09:19

Unexpected error fetching wiser (wiser-WiserHeat04B0AC) data: Expecting ':' delimiter: line 1 column 1361 (char 1360)
Unexpected error fetching wiser (wiser-WiserHeat04B0AC) data: Unterminated string starting at: line 1 column 2770 (char 2769)
Unexpected error fetching wiser (wiser-WiserHeat04B0AC) data: Unterminated string starting at: line 1 column 4220 (char 4219)
Unexpected error fetching wiser (wiser-WiserHeat04B0AC) data: Unterminated string starting at: line 1 column 1345 (char 1344)
Unexpected error fetching wiser (wiser-WiserHeat04B0AC) data: Unterminated string starting at: line 1 column 8790 (char 8789)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 269, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/wiser/coordinator.py", line 151, in async_update_data
    raise ex
  File "/config/custom_components/wiser/coordinator.py", line 129, in async_update_data
    await self.wiserhub.read_hub_data()
  File "/usr/local/lib/python3.12/site-packages/aioWiserHeatAPI/wiserhub.py", line 126, in read_hub_data
    await self._build_objects()
  File "/usr/local/lib/python3.12/site-packages/aioWiserHeatAPI/wiserhub.py", line 140, in _build_objects
    self._domain_data = await self._wiser_rest_controller._get_hub_data(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioWiserHeatAPI/rest_controller.py", line 187, in _get_hub_data
    return await self._do_hub_action(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioWiserHeatAPI/rest_controller.py", line 126, in _do_hub_action
    return json.loads(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 8510 (char 8509)
Integration v3.4.2.
HA:
Core
2024.2.0
Supervisor
2023.12.1
Operating System
11.4
Frontend
20240104.0
HubR, with single channel, on a combi boiler without OpenTherm. Firm 3.14.0.
asantaga commented 7 months ago

which version of the integration are you running? I just upgraded, cleaned my logs and I have no errors. Running 3.4.2, your issue may have been solved..

Chaoscontrol commented 7 months ago

Nope, down in my post I said I was on 3.4.2 already. I always update automatically as soon as it's available. These haven't shown again since I cleared the log. I'll wait for them to show again and report back.

dpgh947 commented 7 months ago

I had a couple of these this morning, not seen it before. I am on 3.4.2

This error originated from a custom integration.

Logger: custom_components.wiser.coordinator
Source: helpers/update_coordinator.py:300
Integration: Drayton Wiser Integration for Home Assistant (documentation, issues)
First occurred: 07:26:16 (1 occurrences)
Last logged: 07:26:16

Unexpected error fetching wiser (wiser-WiserHeat02B1EE) data: Unterminated string starting at: line 1 column 12795 (char 12794)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/wiser/coordinator.py", line 151, in async_update_data
    raise ex
  File "/config/custom_components/wiser/coordinator.py", line 129, in async_update_data
    await self.wiserhub.read_hub_data()
  File "/usr/local/lib/python3.11/site-packages/aioWiserHeatAPI/wiserhub.py", line 126, in read_hub_data
    await self._build_objects()
  File "/usr/local/lib/python3.11/site-packages/aioWiserHeatAPI/wiserhub.py", line 140, in _build_objects
    self._domain_data = await self._wiser_rest_controller._get_hub_data(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aioWiserHeatAPI/rest_controller.py", line 187, in _get_hub_data
    return await self._do_hub_action(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aioWiserHeatAPI/rest_controller.py", line 126, in _do_hub_action
    return json.loads(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 12795 (char 12794)
msp1974 commented 7 months ago

Wierdly (or not), i had not seen this before. However, i upgraded to 2024.2 the other day and i had the same message this morning. Will be looking in to it. I presume something in 2024.2 has caused it - maybe another upgrade to aiohttp that doesn't like the Wiser response.

dpgh947 commented 7 months ago

I am still on 2024.1.6

Chaoscontrol commented 7 months ago

@dpgh947 error doesn't seem the same I reported on this thread.

The one your reported seems like the current ones I am seeing daily that I reported on this thread.

Tbh, I haven't seen the ones reported in this issue anymore so far.

msp1974 commented 7 months ago

@dpgh947 is the same in the sense it is a json format error just a different specific format error. Either way, same part of the code does not like the json returned from the hub.

msp1974 commented 7 months ago

This should be resolved in v3.4.4. Please reopen if you have this issue again.

dpgh947 commented 4 months ago

I keep getting these, I wonder if it related to this issue? If I hadn't looked in the logs I wouldn't have known there's a problem, the integration seems to be working.

This error originated from a custom integration.

Logger: custom_components.wiser.coordinator
Source: custom_components/wiser/coordinator.py:198
integration: Drayton Wiser Integration for Home Assistant (documentation, issues)
First occurred: 16:12:54 (1 occurrences)
Last logged: 16:12:54

Unknown error fetching wiser (wiser-WiserHeat061012) data. Response payload is not completed: <TransferEncodingError: 400, message='Not enough data for satisfy transfer length header.'>. Please report this error to the integration owner