Home Assistant Community

Withings Scales

#62

One issue I see now is Withings requirement for a functioning callback URL - so it might mean having to open home assistant up to the world to get access to the API.

#63

This is broken for me on 0.88.1 any ideas ?

#64

I plan on continuing working on the component and keep it up to date with the new authentication method. It’s still too early to consider pushing to the core codebase, but it’s the long term goal (that is, I need to write tests :slightly_smiling_face:) There are a few recent commits where I try to patch things up to make the code work again.

3 Likes
#65

With the current implementation is it possible to access more than one user - I have more than one user in the withings account that I’d like to access?

#66

Is this your pull request? It’s exciting to see this making progress!

#67

No, I’m glad someone had a better chance than me to write a full implementation of that sensor. That’s nice.

#68

I hope this does get added, looking forward to using it with my scales and sleep

3 Likes
#69

Getting this error

Error while setting up platform withings
Traceback (most recent call last):
  File "/config/deps/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 330, in request
    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/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/config/custom_components/withings/sensor.py", line 107, in async_setup_platform
    yield from _add_device(creds)
  File "/config/custom_components/withings/sensor.py", line 92, in _add_device
    withings = WithingsSensor(hass, client)
  File "/config/custom_components/withings/sensor.py", line 177, in __init__
    r = self._client.request('user', 'getdevice', version='v2')
  File "/config/deps/lib/python3.7/site-packages/nokia/__init__.py", line 202, in request
    r = self.client.request(method, '/'.join(url_parts), params=params)
  File "/config/deps/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 343, in request
    self.auto_refresh_url, auth=auth, **kwargs
  File "/config/deps/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 309, 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 415, 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 425, in parse_token_response
    validate_token_parameters(params)
  File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 435, in validate_token_parameters
    raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.
#70

Is the any news concerning Withings Scale integration. Where can I download Vangorra´s code to test?

#71

He submitted some code for updated configuration flows a few days back. It looks like there are still a few bugs. You can check out his code at the github link above.

#72

I can find the Github page but not the code. Can you direct me?

#73

I’m not a git super-user, but the way I understand it, Vangorra forks the home-assistant repo, makes his changes, then requests to merge his modified version back into home-assistant. You can see his fork, and drill down even further to see the component he added:


It looks like he’s been addressing some change requests recently, this is looking really promising.