krocat / ToonHA

Home-Assistant component for Toon by Eneco

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Toon component stops processing data

remkolodder opened this issue · comments

Hi,

There seem to be an issue with Toon and the Toon-Hass component. Since updating to 0.57.x the component works for a little and then stops processing data. I cannot control Toon via the buttons within HASS, nor with automation, and the value readings are "stale".

The log is "flooded" with :

2017-11-16 07:36:53 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.gas_today is taking over 10 seconds
2017-11-16 07:37:55 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.power_current is taking over 10 seconds
2017-11-16 07:38:57 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.power_today is taking over 10 seconds
2017-11-16 07:39:59 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.gas_today is taking over 10 seconds

And periodic other errors like (to a much lesser degree though and could be other related to uplink not available or something):

2017-11-15 21:30:49 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.toon_van_eneco fails
Traceback (most recent call last):
File "/home/homeassistant/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 204, in async_update_ha_state
yield from self.async_device_update()
File "/home/homeassistant/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 309, in async_device_update
yield from self.hass.async_add_job(self.update)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in iter
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/homeassistant/lib/python3.5/site-packages/homeassistant/components/climate/toon.py", line 90, in update
self.thermos.update()
File "/home/homeassistant/homeassistant/lib/python3.5/site-packages/homeassistant/util/init.py", line 306, in wrapper
result = method(*args, **kwargs)
File "/home/homeassistant/homeassistant/lib/python3.5/site-packages/homeassistant/components/toon.py", line 85, in update
self.data['power_current'] = self.toon.power.value
File "/home/homeassistant/homeassistant/lib/python3.5/site-packages/toonlib/toonlib.py", line 281, in power
power = self._state['powerUsage']
File "/home/homeassistant/homeassistant/lib/python3.5/site-packages/cachetools/init.py", line 46, in wrapper
v = func(*args, **kwargs)
File "/home/homeassistant/homeassistant/lib/python3.5/site-packages/toonlib/toonlib.py", line 175, in _state
state.update(self._get_data('/client/auth/retrieveToonState'))
File "/home/homeassistant/homeassistant/lib/python3.5/site-packages/toonlib/toonlib.py", line 191, in _get_data
error_message = response.json().get('reason', '')
File "/home/homeassistant/homeassistant/lib/python3.5/site-packages/requests/models.py", line 892, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.5/json/init.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Unrelated to the Toon component itself, as the API seems fully down. I think this can be closed. Thanks for taking the time to report it though!

Hi Boltgolt,

yes mentioned on the community pages, yes this might have been a bit premature :-) thanks a lot for responding and the great work!