withings

Withings to Garmin Connect – resurrection

After dropping “legacy” APIs on Withings page, the script stopped to work…

It took quite a while to adjust it to OAuth2 but finally – it’s done!

Go to https://github.com/jaroslawhartman/withings-garmin-v2 to download the script.

References

  • Based on withings-garmin by Masayuki Hamasaki, improved to support SSO authorization in Garmin Connect 2.
  • SSO authorization derived from https://github.com/cpfair/tapiriik

Pre-requisites

  • simplejson

Usage

Obtaining Withings Authorization Code

When running for a very first time, you need to obtain Withings authorization:

You need to visit the URL listed by the script and then – copy Authentification Code back to the prompt.

This is one-time activity and it will not be needed to repeat.

Tips

You can hardcode your usernames and passwords in the script (sync.py):

For advanced users – registering own Withings application

The script has been registered as a Withings application and got assigned Client ID and Consumer Secret. If you wish to create your own application – feel free!

Note, registering it is quite cumbersome, as you need to have a callback URL and an Icon. Anyway, when done, you should have the following identifiers:

IdentfierExample
Client ID183e03.................765c98c10e8f1aa647a37067a1......baf491626
Consumer Secreta75d65.................4c16719ef7bd69fa7c5d3fd0ea......ed48f1765
Callback URIhttps://jhartman.pl/withings/notify

Configure them in config/withings_app.json, for example:

Fix for “Withings to Garmin Connect” authorisation problems

It has been reported that the script does not work anymore:

I’ve managed to fix it. See latest commit in https://github.com/jaroslawhartman/withings-garmin-v2

Withings to Garmin Connect

Since a while I’m owning great Withings Scale which has a capability to store measurements in a cloud. Because I’m using Garmin GPSes (and Garmin Connect), I’d love to synchronize the measurements to the Garmin Connect site.

Lucky, I found a great script garmin-withings.

Unfortunately, after latest changes in the Garmin Connect (implementation of SSO on march 2014) the script stopped to work. I’ve compiled changes proposed by https://github.com/cpfair/tapiriik and it seems that the script with my updates works again (well, at least until further changes in Garmin Connect…)

You can find the script on https://github.com/jaroslawhartman/withings-garmin-v2

ToDo

Garmin Connect can display a lot of other parameters, not only weight and body fat level:

Measurements

It would be great to calculate all these figures and post them to Garmin Connect, right? 🙂