Netatmo issues known?

I have some issues with my Netatmo integration, without changing anything to its configuration.
The log reads:



Logger: homeassistant.config_entries
Source: components/cloud/account_link.py:146
First occurred: 17:48:05 (1 occurrences)
Last logged: 17:48:05
Error unloading entry Home Assistant Cloud for netatmo

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pyatmo/auth.py", line 144, in query
    rsp = self._oauth.post(url=url, data=params, timeout=timeout)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 578, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 477, in request
    url, headers, data = self._client.add_token(
  File "/usr/local/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 198, in add_token
    raise TokenExpiredError()
oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired) 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 316, in async_unload
    result = await component.async_unload_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 177, in async_unload_entry
    await hass.async_add_executor_job(
  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/pyatmo/auth.py", line 224, in dropwebhook
    resp = self.post_request(WEBHOOK_URL_DROP, post_params)
  File "/usr/local/lib/python3.8/site-packages/pyatmo/auth.py", line 159, in post_request
    resp = query(url, params, timeout, 3)
  File "/usr/local/lib/python3.8/site-packages/pyatmo/auth.py", line 153, in query
    self._oauth.token = self.refresh_tokens()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/api.py", line 33, in refresh_tokens
    run_coroutine_threadsafe(
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 439, in result
    return self.__get_result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
    raise self._exception
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 444, in async_ensure_token_valid
    new_token = await self.implementation.async_refresh_token(self.token)
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 81, in async_refresh_token
    new_token = await self._async_refresh_token(token)
  File "/usr/src/homeassistant/homeassistant/components/cloud/account_link.py", line 146, in _async_refresh_token
    return await account_link.async_fetch_access_token(
  File "/usr/local/lib/python3.8/site-packages/hass_nabucasa/account_link.py", line 112, in async_fetch_access_token
    resp.raise_for_status()
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 941, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://account-link.nabucasa.com/refresh_token/netatmo')

I don’t think my token really has expired. I have created it just a few days ago and it worked fine for the last couple of days.

https://dev.netatmo.com/ appears to be down.
So, I assume Netatmo is facing serious issues.

btw: Is there a way to only restart the Netatmo integration or do I always have to restart the whole server to retry?

Guess I can rule out an expired token:

The Netatmo back end seems to have issues. We just gotta wait until it’s fixed.

Edit: I’d recommend reverting back to individual dev accounts until this is solved.

1 Like

There is no way to query the gateway directly, right?

If you mean whether Netatmo provides local access to their devices, no, there unfortunately is no local API (officially documented).

dev.netatmo.com is back up.
With that my issues have been resolved.

(Still wish I could access my Netatmo devices without having to go through the cloud.)

Yes, we all would love that.