-
Notifications
You must be signed in to change notification settings - Fork 295
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
Calories not syncing from Strava to Garmin Connect #353
Comments
I confirm this issue, Calories are not synced to the Garmin Connect, but I think this is caused by the broken export (from Strava?) rather than import - tcx files which I use for exporting to Dropbox also doesn't contain this information: |
According to strava this value is provided in a field calories: http://strava.github.io/api/v3/activities/ which we actually read in https://github.com/cpfair/tapiriik/blob/master/tapiriik/services/Strava/strava.py#L178 I also confirmed that this field is indeed is returned correctly by Strava. |
@sergmelikyan Yes my issue is sync from Strava to Garmin Connect, as I said all other fields do sync, but the calories are 0. |
Looks like problem is on the side of reading activities from the Strava, in strava.py on line 130 we are doing request to Strava to read all activities for the given athlete like this:
Which according to Strava API Reference here doesn't contain "calories" field for individual activity, only "kilojoules" for rides and nothing for runs for example. My experiments confirm that output data from this requests doesn't contain this field. I have create new API app on this page and used provided Access Token to execute following cUrl:
Now question is how to resolve this? Here are my thoughts:
Method 1: Different API Call
Which means that we will have to do "1 + 2*x" instead of "1 + x" API calls to Strava where x is number of activities to sync given that we insert this additional call somewhere here: strava.py line 212 This will significantly increase time and load on the system as well as overall API call numbers which are rate limited. @cpfair what do you think about load which will be generated if we will switch to request per activity model? Method 2: Calculate value by ourselves
Method 3: Reach out to Strava developers References:
P.S. Seems like providing is In the current API call to list activities is excessive and can be safely dropped:
|
Strava does provide information about how many calories user spent during activity only when details on specific activity is requested. Additional API call was added to request activity details during downloading activity in order to obtain calories information. Previous behavior was to collect calories stats from the response to request of the list of user activities which doesn't contain this information. Closes cpfair#353
Strava does provide information about how many calories user spent during activity only when details on specific activity is requested. Additional API call was added to request activity details during downloading activity in order to obtain calories information. Previous behavior was to collect calories stats from the response to request of the list of user activities which doesn't contain this information. Closes cpfair#353
Method 3: Reach out to Strava developers I have received response stating that somewhere in the beginning of the next year "calories" value might get more exposure, but right now the only way to get this value is using aforementioned call to get activity details. |
It looks like this is unchanged in April 2022 - calories are not included in API v3 calls to https://www.strava.com/api/v3/athlete/activities |
Everything else including power, heartrate is syncing, but the calories are 0.
The text was updated successfully, but these errors were encountered: