Smappee Unauthorized

Since a few days, my smappee integration on home assistant has stopped working.
I am getting an unauthorized error.

When I do a post request (with postman), I get an access token, so my credentials are ok.

POST /dev/v3/oauth2/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded;charset=UTF-8

This is my error log, does anyone else have this problem?
Thank you in advance

Logger: homeassistant.config_entries
Source: helpers/
First occurred: 17 april 2022 09:29:36 (1 occurrences)
Last logged: 17 april 2022 09:29:36

Error setting up entry smappeeCloud for smappee
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pysmappee/", line 21, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/pysmappee/", line 67, in get_service_locations
  File "/usr/local/lib/python3.9/site-packages/requests/", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/", line 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/smappee/", line 104, in async_setup_entry
    await hass.async_add_executor_job(smappee.load_service_locations)
  File "/usr/local/lib/python3.9/concurrent/futures/", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/pysmappee/", line 22, in load_service_locations
    locations = self.smappee_api.get_service_locations()
  File "/usr/local/lib/python3.9/site-packages/pysmappee/", line 24, in wrapper
    self._oauth.token = self.refresh_tokens()
  File "/usr/src/homeassistant/homeassistant/components/smappee/", line 43, in refresh_tokens
  File "/usr/local/lib/python3.9/concurrent/futures/", line 445, in result
    return self.__get_result()
  File "/usr/local/lib/python3.9/concurrent/futures/", line 390, in __get_result
    raise self._exception
  File "/usr/src/homeassistant/homeassistant/helpers/", line 460, in async_ensure_token_valid
    new_token = await self.implementation.async_refresh_token(self.token)
  File "/usr/src/homeassistant/homeassistant/helpers/", line 88, in async_refresh_token
    new_token = await self._async_refresh_token(token)
  File "/usr/src/homeassistant/homeassistant/helpers/", line 175, in _async_refresh_token
    new_token = await self._token_request(
  File "/usr/src/homeassistant/homeassistant/helpers/", line 201, in _token_request
  File "/usr/local/lib/python3.9/site-packages/aiohttp/", line 1004, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url=URL('')

I also have the same problem which started right after Smappee had cloud issues on April 14th.
My client_id and secret are correct and working in a different script outside Home Assistant.
On the status page, it advise that when issues with third party integrations, you may need to relogin or reconnect with your Smappee account.

I’ve removed the smappee integration, and attempted to re-install it to the cloud. During installation I get redirected to for autorization (which I can do), but then I’m HA simply says ‘Error’ without any details.

Anybody else suggestions how to fix ?

I contacted smappee, they told me to remove the smappee integration.
After reinstalling the integration, it worked immediately.
No need to reconfigure, or re-enter your password…

1 Like