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? 🙂

Withings to Garmin Connect
Tagged on:

7 thoughts on “Withings to Garmin Connect

  • 2017-04-15 at 13:06
    Permalink

    Did you notice that this script is not working anymore? It gives me this error message:

    Traceback (most recent call last):
    File “sync.py”, line 125, in
    main()
    File “sync.py”, line 60, in main
    sync(**opts.__dict__)
    File “sync.py”, line 117, in sync
    cookie = garmin.login(garmin_username, garmin_password)
    File “/Users/Cezex/Utilities/Withings2Garmin/garmin.py”, line 132, in login
    cookies = self._get_cookies(email=username, password=password)
    File “/Users/Cezex/Utilities/Withings2Garmin/garmin.py”, line 100, in _get_cookies
    data[“lt”] = re.search(“name=\”lt\”\s+value=\”([^\”]+)\””, preResp.text).groups(1)[0]
    AttributeError: ‘NoneType’ object has no attribute ‘groups’

    Will you be able to fix it?

    Reply
  • 2017-04-26 at 15:42
    Permalink

    Hi.

    I’m trying to run the script, but I’m getting “user EVG has not opened withings data”. As I understand my Withings profile should be public, but I can’t find a wake to make it so, neither in the web interface or in Android app.

    Could you help me with that please?

    Reply
    • 2017-04-26 at 16:16
      Permalink

      Although, I was able to sync by commenting out these three lines:
      if not user.ispublic:
      print ‘user %s has not opened withings data’ % withings_shortname
      return

      Reply
  • 2017-05-19 at 09:25
    Permalink

    This script is not working for me. It gives me this error message:
    ==> Python sync.py – no – upload> weight.fit
    Traceback (most recent call last):
    File “sync.py”, line 126, in
    main()
    File “sync.py”, line 59, in main
    sync(**opts.__dict__)
    File “sync.py”, line 118, in sync
    session = garmin.login(garmin_username, garmin_password)
    File “/Users/aurelio/Desktop/Garmin/withings-garmin/garmin.py”, line 139, in login
    session = self._get_session(email=username, password=password)
    File “/Users/aurelio/Desktop/Garmin/withings-garmin/garmin.py”, line 77, in _get_session
    data[“lt”] = re.search(“name=\”lt\”\s+value=\”([^\”]+)\””, preResp.text).groups(1)[0]
    AttributeError: ‘NoneType’ object has no attribute ‘groups’

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *