Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Water % #11

Open
moozphat opened this issue Jan 12, 2019 · 6 comments · May be fixed by #17
Open

Water % #11

moozphat opened this issue Jan 12, 2019 · 6 comments · May be fixed by #17

Comments

@moozphat
Copy link

There seems to be an issue with synching of water percentage. A reading of 61.4% in Health Mate shows as 46.5% in Garmin Connect. Could this be an encoding or unit issue with the hydration data? The other readings (fat, muscle, etc) are fine.

@piccit
Copy link

piccit commented Jan 13, 2019

Withings gives it as mass (in kg, I think) but Garmin expects a percentage - so that's why it's wrong

@moozphat
Copy link
Author

Great; that is exactly it and explains the numbers I am seeing... My last reading is 46.8kg water / 76.4kg total weight (61.2%) and shows as 46.8% in GC.

@moozphat
Copy link
Author

So, I have fixed on my local copy. Here is the proposed fix which I tried to make elegant...

In fit.py:

  • Line 205: Add an additional argument: water_mass=None

  • Line 209: Add this code to make the conversion:
    if water_mass is not None: percent_hydration=water_mass/weight*100

In nokia_weight_sync.py:

  • Line 363: Replace
    percent_hydration=m.get_measure(types['hydration']) by
    water_mass=m.get_measure(types['hydration'])

By the way, thanks for this great project!

@rafdev18
Copy link

rafdev18 commented Jan 13, 2019 via email

@moozphat
Copy link
Author

moozphat commented Jan 13, 2019

@rafdev18 I just bought this scale and followed the readme instructions. I noted that I could not use localhost and I had to use port 80 or 443 when registering on withings... I would try to redo the whole process and delete config.ini as it worked for me.

Or, I am thinking it might have something to do with your dependencies versions (ie requests-oauthlib). Good luck

@magnific0
Copy link
Owner

@moozphat thanks for the reporting this issue, suggested fixes and and activity in this issue. I'll try to implement the code some time in the near future. I'll update here and close the issue once it is done.

letz added a commit to letz/nokia-weight-sync that referenced this issue Jul 12, 2019
Fix water percentage upload
Fixes magnific0#11
@letz letz linked a pull request Jul 12, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants