Skip to content
This repository has been archived by the owner on Nov 12, 2020. It is now read-only.

Component doesn't work anymore since a few days #23

Open
vistalba opened this issue Jul 7, 2020 · 6 comments
Open

Component doesn't work anymore since a few days #23

vistalba opened this issue Jul 7, 2020 · 6 comments

Comments

@vistalba
Copy link

vistalba commented Jul 7, 2020

Since a few days the component isn't working anymore:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 478, in request
    url, http_method=method, body=data, headers=headers
  File "/usr/local/lib/python3.7/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/setup.py", line 193, in _async_setup_component
    result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/config/custom_components/miele/__init__.py", line 127, in async_setup
    data_get_devices = await client.get_devices(lang)
  File "/config/custom_components/miele/miele_at_home.py", line 41, in get_devices
    home_devices = await self._get_devices_raw(lang)
  File "/config/custom_components/miele/miele_at_home.py", line 24, in _get_devices_raw
    devices = await self.hass.async_add_executor_job(func)
  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/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 497, in request
    self.auto_refresh_url, auth=auth, **kwargs
  File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 446, in refresh_token
    self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
  File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 421, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 431, in parse_token_response
    validate_token_parameters(params)
  File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 441, in validate_token_parameters
    raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.

As the error is "token_expired" I created a new token but run into the same error.

@vistalba
Copy link
Author

Any plans or news to this? :(
I really like this integration but it seems like it isn't maintained anymore. I do not have the knowledge to make a PR :(

@breiti78
Copy link

@vistalba Refreshing the Token from the Miele Website worked for my to get it back running.

@vistalba
Copy link
Author

@breiti78 I alreay did this and it didn't work :( hhmmmm....

How does your config look like? Do you use !secret?

configuration.yaml

miele:
    client_id: !secret miele_clientid
    client_secret: !secret miele_clientsecret
    lang: de

secret.yaml

miele_clientid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
miele_clientsecret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

@breiti78
Copy link

I have also added
cache_path: /local/miele
to the configuration as location where the token gets stored. After changing this I had to re authorize the Miele add-in as the message popped up in Home Assistant. After entering email and password in the Miele Website and accepting the authorization everything was working.

@vistalba
Copy link
Author

vistalba commented Jul 15, 2020

I now did the same. Defined new client_id and new client_secret.
I deleted the token file and restarted HA.
Afther that, I get the message to "configure" so I can link client_id/client_secret with my account. I did this process and the file gets recreated.
But afther that I get the same issue as before and all entities are "unavailable".

Edit:

But now appread another error message in log:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 193, in _async_setup_component
    result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/config/custom_components/miele/__init__.py", line 127, in async_setup
    data_get_devices = await client.get_devices(lang)
  File "/config/custom_components/miele/miele_at_home.py", line 46, in get_devices
    for home_device in home_devices:
TypeError: 'coroutine' object is not iterable

@vistalba
Copy link
Author

Any news or input about this issue? I'm still running in this issue.
Already tried to re-auth but it doesn't help at all :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants