Out of the blue last night I started having errors in my log: ecobee tokens invalid; re-authentication required
. This has happened to me before when restarting HA, but not out of the blue. As I have done in the past, I deleted the Ecobee integration so that I could add it again in order to reauthorize. However, I now cannot get the integration to complete. I enter my API key, I go to the Ecobee portal and authorize with the pin code that HA has given me, I receive a success notification from Ecobee, but when I go back to HA and click Submit, I just get a spinning wheel and it hangs. I have to click the X to get out, and I end up with an entry on the Integrations page for Ecobee that has no devices or entities.
I have tried restarting HA, deleting the integration and re-adding it multiple times, it is always fails in the same way. A restart of HA after deleting the integration produces the following:
2020-12-13 16:38:23 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-12-13 16:38:23 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for weatherbit which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-12-13 16:39:01 WARNING (MainThread) [homeassistant.components.hue] ('Please check for software updates of the bridge in the Philips Hue App.', 'Signify Hue', 'hue_hub_firmware')
2020-12-13 16:39:24 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: ecobee
2020-12-13 16:40:24 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: ecobee
2020-12-13 16:41:24 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: ecobee
2020-12-13 16:42:24 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: ecobee
2020-12-13 16:43:24 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for stage 2 - moving forward
2020-12-13 16:43:24 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pyecobee/__init__.py", line 564, in _request
response.raise_for_status()
File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.ecobee.com/token?grant_type=refresh_token&refresh_token=s9uGANEMMtVSEZIIMHjjZ9e&client_id=TRP9 [*I have deleted part of this just in case*]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 130, in async_init
result = await self._async_handle_step(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 213, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/ecobee/config_flow.py", line 107, in async_step_import
if await self.hass.async_add_executor_job(ecobee.refresh_tokens):
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/pyecobee/__init__.py", line 159, in refresh_tokens
response = self._request(
File "/usr/local/lib/python3.8/site-packages/pyecobee/__init__.py", line 578, in _request
raise InvalidTokenError(
pyecobee.errors.InvalidTokenError: ecobee tokens invalid; re-authentication required
2020-12-13 16:43:24 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: ecobee
2020-12-13 16:44:24 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: ecobee
2020-12-13 16:45:24 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: ecobee
2020-12-13 16:46:24 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: ecobee
2020-12-13 16:47:24 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: ecobee
2020-12-13 16:48:24 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for bootstrap - moving forward
2020-12-13 16:48:24 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: ecobee
2020-12-13 16:49:24 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: ecobee
Every minute I continue get the error Waiting on integrations to complete setup: ecobee
. The integration has been deleted, so it shouldnāt be waiting for anything. It takes 10 minutes for HA to complete a restart because it is waiting for the integration. This means my z-wave network doesnāt start during this time, among other things. I am running Home Assistant 0.118.5 (HassOS 4.17) in a Proxmox VM on a NUC.
Any help on how I can get past this and get my Ecobee integration back would be very much appreciated.