Withings Scales

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.

This is broken for me on 0.88.1 any ideas ?

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?

Is this your pull request? Itā€™s exciting to see this making progress!
https://github.com/home-assistant/home-assistant/pull/21625

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

3 Likes

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.

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

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.

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

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.

Itā€™s close to ready - the maintainers would like another peer review. Anybody got the python chops to take a gander?

2 Likes

Looking forward to this, shame itā€™s been sat there for 15 days waiting for another review though.

Iā€™ve tried adding this to a custom component. It seems to load fine without any errors but I donā€™t get any sensors. Has anyone else tried it yet and been successful?

1 Like

If anybody could tell me how to download and add this as a custom component, I would like to give it a tryā€¦ thanks!

Config flow does not work for custom components. The pull request went staleā€¦ Can anyone help?

Any news on integration I HA. Had hoped for 0.96 but obviously it isnā€™t there

The pull request was reviewed and changes were requested by balloob. The changes werenā€™t made within 30 days, so the pull request was automatically closed. It looks like just yesterday Vangorra re-opened the pull request after making the requested changes. Itā€™s now awaiting peer review. It probably wonā€™t make it into 0.96, but perhaps 0.97. You can keep an eye on the new PR here:

Working as custom component for me! See here. You need HA>=0.96.

1 Like

I see it just got merged! woohoo \o/

2 Likes

Are there any docs for this? I searched for ā€˜withingsā€™ on the integrations page but nothing appears for me.

EDIT: I see itā€™s still getting merged, I should be more patient! :blush:

1 Like