Core: Update for climate.ecobee fails

Created on 26 Mar 2020  路  13Comments  路  Source: home-assistant/core

The problem


Getting lots of errors in my logs about ecobee taking over 10 seconds to update and update fails. My history graph of various ecobee sensor temperatures have visible gaps in the plots when the update fails.

Environment

  • Home Assistant release with the issue: 0.107.6
  • Last working Home Assistant release (if known): Unknown, but it didn't start with 0.107
  • Operating environment (Hass.io/Docker/Windows/etc.): Hass.io on RPi 3b+
  • Integration causing this issue: ecobee
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/ecobee

Problem-relevant configuration.yaml

Setup via Integrations, not in yaml.

Traceback/Error logs

2020-03-25 16:00:57 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.ecobee is taking over 10 seconds
2020-03-25 16:01:10 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.ecobee fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
    await self.async_update()
  File "/usr/src/homeassistant/homeassistant/components/ecobee/climate.py", line 289, in async_update
    await self.data.update()
  File "/usr/src/homeassistant/homeassistant/components/ecobee/__init__.py", line 96, in update
    await self._hass.async_add_executor_job(self.ecobee.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/pyecobee/__init__.py", line 196, in update
    return self.get_thermostats()
  File "/usr/local/lib/python3.7/site-packages/pyecobee/__init__.py", line 177, in get_thermostats
    "GET", ECOBEE_ENDPOINT_THERMOSTAT, log_msg_action, params=params
  File "/usr/local/lib/python3.7/site-packages/pyecobee/__init__.py", line 511, in _request
    f"Request response: {response.status_code}: {response.json()}"
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 898, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Additional information

ecobee stale

Most helpful comment

Thanks @jjlawren for figuring this one out!

All 13 comments

Hey there @marthoc, mind taking a look at this issue as its been labeled with a integration (ecobee) you are listed as a codeowner for? Thanks!

This should be fixed in 0.108: #33130

Thanks @jjlawren for figuring this one out!

I'm running 0.108.1 and I seem to be getting similar errors as before:
2020-04-09 17:00:55 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.ecobee is taking over 10 seconds

I think those are unavoidable if the API is slow to respond. Do you see any other errors or are your devices not updating?

Seems to be updating ok and not getting gaps in my temperature graphs like before.

I think that's kind of expected since the Ecobee API is sometimes slow to respond. We have a 30s timeout to Ecobee, but HA warns after a 10s wait. As long as it recovers and continues to update I think it's fine.

I'm on 108.3 and seeing a different, but maybe related error. Also seeing gaps in my ecobee graphs.

Log Details (ERROR)
Logger: pyecobee
Source: /usr/local/lib/python3.7/site-packages/pyecobee/__init__.py:562
First occurred: April 12, 2020, 3:22:03 AM (3 occurrences)
Last logged: 6:31:00 AM

Connection to ecobee timed out while attempting to get thermostats. Possible connectivity outage.

That's the new expected error when the Ecobee API is timing out. These are upstream problems on Ecobee's end. The HA side is working "correctly" even though you're still running into issues.

I'm with 0.112 and my log is full of:
2020-07-03 12:47:44 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.thermostat is taking over 10 seconds
2020-07-03 12:50:47 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.thermostat is taking over 10 seconds
2020-07-03 12:53:50 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.thermostat is taking over 10 seconds
2020-07-03 12:56:53 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.thermostat is taking over 10 seconds
2020-07-03 12:57:23 WARNING (MainThread) [aiohttp.websocket] websocket connection is closing.
2020-07-03 12:59:56 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.thermostat is taking over 10 seconds
2020-07-03 13:02:58 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.thermostat is taking over 10 seconds
2020-07-03 13:06:01 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.thermostat is taking over 10 seconds
2020-07-03 13:09:04 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.thermostat is taking over 10 seconds
2020-07-03 13:12:05 WARNING (MainThread) [homeassistant.helpers.entity] Update of weather.thermostat is taking over 10 seconds
2020-07-03 13:12:26 WARNING (MainThread) [homeassistant.components.weather] Updating ecobee weather took longer than the scheduled update interval 0:00:30
2020-07-03 13:15:09 WARNING (MainThread) [homeassistant.helpers.entity] Update of weather.thermostat is taking over 10 seconds
2020-07-03 13:15:30 WARNING (MainThread) [homeassistant.components.weather] Updating ecobee weather took longer than the scheduled update interval 0:00:30

it takes the thermostat about 1-2min to update from the time I press the button in HA.
works perfectly with the ecobee app.

Sometimes it seems the Ecobee API is very slow to respond. It's not totally failing as you'd see a different timeout error in that case, but many of the calls are taking >10s.

Do actions you make in HA update the actual thermostats relatively quickly, but the state takes a long time to reflect in HA?

no, the actual change in the thermostat takes ~1-2min.
but if I'm using the ecobee mobile App, it works instantly.
and if I use the app or the actual thermostat, the change takes about 1min to be reflected in HA.

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 now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings