Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@davidkroell
Copy link

Hi @tormoder,

I'd like to add the BMI parameter to the WeightScaleMsg, due to the issue here: davidkroell/bodycomposition#9

I've conducted a first integration test with my utility davidkroell/bodycomposition and it works:

grafik
(screenshot from Garmin Connect)

I wasn't able to fix the tests, could you help me out?

Regards,

David

@tormoder
Copy link
Owner

tormoder commented Nov 4, 2021

Hi @davidkroell.

I cant't find this field (for the WeightScaleMsg) in the official FIT profile (21.60). Should it be there?

@davidkroell
Copy link
Author

Hi @tormoder,

I don't know if this is officially supported within this message. I've got this from there: https://github.com/jaroslawhartman/withings-sync/blob/4e96d96364b848c4222354ac904c55c5053d97f9/withings_sync/fit.py#L203-L221 and tried it out with Garmin Connect and it works.

@tormoder
Copy link
Owner

tormoder commented Nov 6, 2021

This repository uses the official SDK profile from Garmin (a sheet) to grenerate all code related to messages and fields. This means that we can't (and I don't want) to have any special handling of fields or message, since it will be overwritten when we generate code for a new profile. The only current exception is for errors in the profile sheet that causes code generation to fail.

I can't see a BMI field for the WeightScaleMsg scale message at all in the profile. So fields are listed there, but not enabled for the default profile. AFAICS this is not the case for BMI. I would be interested to know where the repo you listed got this information from.

But, since you are actively using this library, I would like to help you. I'll look into providing a separate branch for you. Give me a few days :-)

@RobertWojtowicz
Copy link

RobertWojtowicz commented Nov 7, 2021

Hi,
@tormoder

I came across this topic here (in search of a BMI synchronization solution):
jaroslawhartman/withings-garmin-v2@a6d63b1
jaroslawhartman/withings-garmin-v2#16

There are other interesting fields (in search of a Caloric Intake synchronization solution):
(7, FitBaseType.uint16, basal_met, 4),
(9, FitBaseType.uint16, active_met, 4),

Best Regards,
Robert

@tormoder
Copy link
Owner

Thanks for the input @RobertWojtowicz.

It seems to me, based on jaroslawhartman/withings-garmin-v2#16,
that this field is used by Garmin, but not documented in the SDK.
I think there are other such examples elsewhere also (but it's a long time I've looked at such issues).

#6 is somewhat related.

The other two fields you mention is documented and enabled in the last (21.67) default profile:

weight_scale message

 | 253 | timestamp | date_time | 
 | 0 | weight | weight |
 | 1 | percent_fat | uint16 |
 | 2 | percent_hydration | uint16 |
 | 3 | visceral_fat_mass | uint16 |
 | 4 | bone_mass | uint16 | 
 | 5 | muscle_mass | uint16 |
 | 7 | basal_met | uint16 |
 | 8 | physique_rating | uint8 | 
 | 9 | active_met | uint16 |
 | 10 | metabolic_age | uint8 |
 | 11 | visceral_fat_rating | uint8 |
 | 12 | user_profile_index | message_index |

@RobertWojtowicz
Copy link

RobertWojtowicz commented Nov 10, 2021

Hi, @tormoder

Are you planning to add that BMI field ?
Is any of the basal_met or/and active_met parameters responsible for the Caloric Intake field ?
Is it possible to add it somehow ?

@tormoder
Copy link
Owner

@davidkroell You can temporarily use the bodycomp-bmi branch if you want.

go get github.com/tormoder/fit@bodycomp-bmi

@RobertWojtowicz
Copy link

Hi, @davidkroell

can you create a new version bodycomposition with BMI ?

Best Regards,
Robert

@davidkroell
Copy link
Author

Hi guys,

a new release is available here: https://github.com/davidkroell/bodycomposition/releases/tag/v2.2.0.

@tormoder thanks for providing the branch.

@RobertWojtowicz
Copy link

RobertWojtowicz commented Nov 21, 2021

Hi, @davidkroell @tormoder

It works, thank you very much :)

obraz

Only Caloric Intake is missing now (not working)

@tormoder
Copy link
Owner

Closing this, since this change now lives on a separate branch.

Supporting it for the main branch must be done via something like #62.

"Caloric Intake" can be added to the branch if that (hidden) field exsits and someone could provide the field definition.

@tormoder tormoder closed this Nov 22, 2021
@tormoder
Copy link
Owner

@davidkroell FYI, BMI is now available in the master branch. since Garmin (at some point) enabled it in the default profile.

fit/messages.go

Line 4960 in 181a8ab

Bmi uint16

@RobertWojtowicz
Copy link

RobertWojtowicz commented Oct 15, 2023

Hi,
@davidkroell,

I know that the bodycomposition module is working well, but could you refresh it at your free time? based on the new versions of the libraries and include the master branch termoder?

BR,
Robert

@davidkroell
Copy link
Author

@RobertWojtowicz working on it.

Next time please open a issue at my repo instead (I've done it now for you).
You can track status here: davidkroell/bodycomposition/issues/20

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 this pull request may close these issues.

3 participants