Garmin Connect API

2,765 views
Skip to first unread message

gregclimbs

unread,
Dec 8, 2016, 3:06:31 PM12/8/16
to golden-cheetah-users
I am curious if it would be possible to crowdfund the the $5000 for access to the Garmin Connect API?

I would contribute.

I personally hate file management.

In the past year I got a Fenix 3, and in doing so grew fond of the automatic upload to connect that happens at the end of any workout (and subsequent sync to Strava for the social aspect of the site). I also now have many workouts that have additional data (from running dynamics to l/r balance to paddling data). This data is stripped in the automatic sync to Strava.

I would prefer to just have the raw, native file imported into GC via direct sync to Garmin Connect. And I would be willing to pay to help make this happen.


g

Chris Cleeland

unread,
Dec 8, 2016, 3:52:49 PM12/8/16
to gregclimbs, golden-cheetah-users
Do you have to program it in MonkeyC?

--
_______________________________________________
Golden-Cheetah-Users mailing list
golden-cheetah-users@googlegroups.com
http://groups.google.com/group/golden-cheetah-users?hl=en
---
You received this message because you are subscribed to the Google Groups "golden-cheetah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golden-cheetah-users+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Chris Cleeland

Mark Liversedge

unread,
Dec 8, 2016, 4:05:28 PM12/8/16
to golden-cheetah-users
I have asked Garmin for advice, the docs suggest the API is for website to website communication, not desktop syncing. I agree it would be nice.

Will keep you posted.

Mark

Alex Harsanyi

unread,
Dec 8, 2016, 5:15:11 PM12/8/16
to golden-cheetah-users

In my setup, I'm using a Raspberry Pi to charge and sync my FR920.  The setup is as follows:

* USB charging cradle is connected to the USB port on a Raspberry PI
* When I connect the FR920 for charging, a program on the PI copies all the FIT files off the device onto a local folder
* Also have a script that downloads the EPO file (GPS quick sync data) for the device.
* The local folder on the PI is shared over my local home network
* On my laptop, I can simply import FIT files from a network folder.

I use a similar setup to copy videos of the Fly6 camera without having to connect it to my laptop.

The big advantage is that I don't have to have a USB cable plugged into my laptop as I move around the house, and since I have to charge my Garmin device anyway, having to connect it to the cradle is not a big deal.  I had the same setup for my old 310, so I have software that syncs via ANT-FS on the PI, but I'm not using that anymore.

This solution is not for everyone, as it requires some technical expertise to set up, but works smoothly otherwise.

If anyone is interested, I can publish some instructions and the software I use.

Alex.

fs

unread,
Dec 8, 2016, 5:30:45 PM12/8/16
to golden-cheetah-users

I used Garmin Connect to upload automatically to Training Peaks via cellular phone.
And the upload to GC was really convenient. Any idea how to get this sorted.
I have to admit I am a simple minded user.

Americo Cacciapuoti

unread,
Dec 9, 2016, 6:09:27 AM12/9/16
to golden-cheetah-users
Same here, for now I'm uploading them manually, but I have to rename the rides and also add the comments about the ride already written on TP. 

Mark Liversedge

unread,
Dec 9, 2016, 6:34:47 AM12/9/16
to golden-cheetah-users
On Thursday, 8 December 2016 21:05:28 UTC, Mark Liversedge wrote:
I have asked Garmin for advice, the docs suggest the API is for website to website communication, not desktop syncing. I agree it would be nice.

Will keep you posted.

Mark

The Garmin guys responded pretty quickly, which was good.

Sadly, their API is PUSH based. When they receive data they will POST it to subscribing services.
So we would (a) need a website running 24/7 to receive POST requests (b) need to store all athlete data on our web servers.

This aint gonna happen as we are not geared to running a service, nor managing data security and privacy and above all: paying for the infrastructure.

Mark 

mickebergma...@gmail.com

unread,
Dec 9, 2016, 7:16:08 AM12/9/16
to golden-cheetah-users
I don't see this as a problem.
If you're too lazy to download the data, what is the chance that you have the energy to analyze it properly?

pschriver

unread,
Dec 9, 2016, 7:24:12 AM12/9/16
to golden-cheetah-users
I have a similar setup on my laptop but doing it on a Pi would be awesome. I tried it on a Pi but failed miserably. If you have a link to the instructions, that would be great

Aart Goossens

unread,
Dec 9, 2016, 9:07:12 AM12/9/16
to golden-cheetah-users
I think it is already possible to setup automatic sync with Garmin Connect via Tapiriik.com and e.g. Dropbox.
Alternatively it might be worth looking into working together with Tapiriik (which is open source as well) to create a more direct way of syncing to GC.

Op vrijdag 9 december 2016 13:24:12 UTC+1 schreef pschriver:

Chris Cleeland

unread,
Dec 9, 2016, 9:40:49 AM12/9/16
to Mark Liversedge, golden-cheetah-users
On Fri, Dec 9, 2016 at 5:34 AM, Mark Liversedge <liver...@gmail.com> wrote:
On Thursday, 8 December 2016 21:05:28 UTC, Mark Liversedge wrote:
I have asked Garmin for advice, the docs suggest the API is for website to website communication, not desktop syncing. I agree it would be nice.

Will keep you posted.

Mark

The Garmin guys responded pretty quickly, which was good.

Sadly, their API is PUSH based. When they receive data they will POST it to subscribing services.
So we would (a) need a website running 24/7 to receive POST requests (b) need to store all athlete data on our web servers.

Is the target of the POST hard-wired to the API key?  I guess it would have to be in order for this to work.


Chris Cleeland

unread,
Dec 9, 2016, 10:46:29 AM12/9/16
to mickebergma...@gmail.com, golden-cheetah-users
On Fri, Dec 9, 2016 at 6:16 AM, <mickebergma...@gmail.com> wrote:
I don't see this as a problem.
If you're too lazy to download the data, what is the chance that you have the energy to analyze it properly?

Sounds more like using limited time wisely to me.  AFAIK the computer can't analyze the data, but it's certainly capable of migrating data from one place to another in an automated fashion.

I don't use garmin connect at all since I have an ancient edge 500 and have to download everything manually, but if my head unit did magically sync somewhere on its own I'd certainly see value in having the sync extend to the place were I want to analyze the data because that would mean I'd have more time to analyze data.

-- 
Chris Cleeland

Mike Patton

unread,
Dec 9, 2016, 1:45:56 PM12/9/16
to golden-cheetah-users
Automating the process of getting data into a place you need it is critical when you are managing multiple athletes' files. Making it as convenient as possible for athletes also ensures maximum compliance with data sharing which makes a coach's job easier. Less time chasing files and more time analyzing data to make better planning decisions.

Guy C

unread,
Dec 9, 2016, 2:31:59 PM12/9/16
to golden-cheetah-users
Tapiriik will sync the files to Dropbox, but then they will be TCX files which GC can't sync down.

Ale Martinez

unread,
Dec 9, 2016, 3:23:29 PM12/9/16
to golden-cheetah-users
There are other open source Python scripts which can be used to download the original .fit files from Garmin Connect and combined with GC autoimport s.t.  https://github.com/kjkjava/garmin-connect-export and https://github.com/petergardfjall/garminexport.

Aart Goossens

unread,
Dec 9, 2016, 4:05:26 PM12/9/16
to golden-cheetah-users
It seems the Github issue you link to is not related to this but is about fit files when manually copied to a dropbox folder that they are not synced to e.g. TP.
Anyway: Tapiriik is able to put tcx files into my Dropbox and GC is able to automatically import tcx files. Just tested this and it works.

However, although this covers the automatic syncing Garmin to GC, I am not sure if the data in these tcx files is all the data that is available in the fit files that can be directly downloaded via the Garmin Connect API. I think there might be some data like left/right balance or pedalling smoothness missing but I have no way of testing that at the moment.

Op vrijdag 9 december 2016 20:31:59 UTC+1 schreef Guy C:

Mark Liversedge

unread,
Dec 9, 2016, 4:13:19 PM12/9/16
to golden-cheetah-users
On Friday, 9 December 2016 21:05:26 UTC, Aart Goossens wrote:
Anyway: Tapiriik is able to put tcx files into my Dropbox and GC is able to automatically import tcx files. Just tested this and it works.

However, although this covers the automatic syncing Garmin to GC, I am not sure if the data in these tcx files is all the data that is available in the fit files that can be directly downloaded via the Garmin Connect API. I think there might be some data like left/right balance or pedalling smoothness missing but I have no way of testing that at the moment.

I've sent a note to Collin at Tapirik to see if there is any scope for collaboration.
I've also asked Garmin about any plans for a direct upload/download api.

Guy C

unread,
Dec 12, 2016, 3:52:56 AM12/12/16
to golden-cheetah-users
Took me an embarrassingly long time to figure this how this was possible! I was trying to using the Dropbox sync function but that ignores TCX files, but yes now I get that you can set up auto-import instead.

Ugo

unread,
Dec 12, 2016, 5:46:22 AM12/12/16
to golden-cheetah-users
Hi Alex,
I would be interested in knowing more about your Raspberry PI setup. Could you post/publish the details of your set up?
Thank you
Ugo


Alex Harsanyi

unread,
Dec 12, 2016, 7:11:06 PM12/12/16
to golden-cheetah-users
https://github.com/alex-hhh/PiFitSync

I uploaded my setup at the above project.

Let me know if the instructions are clear, or need further detail. I assume you are comfortable with the initial setup of a Raspberry Pi and with compiling programs.

Best regards,
Alex

Ugo

unread,
Dec 13, 2016, 7:14:38 AM12/13/16
to golden-cheetah-users
Thank you very very much Alex. I'll give it a try.
Ugo

Potuz

unread,
Apr 18, 2017, 8:30:20 AM4/18/17
to golden-cheetah-users
Not for download, but today I came across this: 

The protocol seems to be easy to implement. 

I came across this cause I am looking for a way to connect my edge 520 via bluetooth with my laptop to upload the fit to GoldenCheetah directly (to avoid having to plug it via usb). A bit of googling and couldn't find anyone that has sucessfully reversed engineered Garmin connect's bluetooth protocol to do this. I'm a little surprised, but I suppose I'll start some wireshark sessions this weekend. 

Mark Liversedge

unread,
Apr 18, 2017, 9:48:23 AM4/18/17
to golden-cheetah-users
I approached Garmin regarding using their older APIs and have taken their advice to not proceed.
We are looking at other possibilities, so I would hold back on this for now.

Mark

Jean Div

unread,
Apr 22, 2017, 1:58:07 AM4/22/17
to golden-cheetah-users
I use Peter Gardjall's EXCELLENT script that Ale points out. It runs on a cronjob every couple of hours on my home NAS to pull new files to an 'Import Training Files' folder that is synced with Resillio Sync, so when I boot up my laptop the folder sync's and I can just import what is there. The script on the server also clears files older than 1 week from the import folder to keep it tidy. I have not used the GC 'auto import from folder' functionality, but one could choose to do this as well to really make it automated.

I'm very far from technically capable, but managed to bumble my way around and get this set up. Maybe it gives some of you guys ideas until we get a neat API solution.

May be a little off topic, but on API's the one thing that annoys me a *little* between all the various sites is that the files do not share any of the context data - Strava, GC, TP, Zwift.. if you take any time to name a file, or add commentary, etc in any of the data.. that is not present in the file when you pass it on to the next source. All of my accounts are currently messy, but I keep my GC as the neat version/'the truth'. Anyone found a way around this?

Mark Liversedge

unread,
Apr 22, 2017, 2:10:48 AM4/22/17
to golden-cheetah-users
On Saturday, 22 April 2017 06:58:07 UTC+1, Jean Div wrote:
May be a little off topic, but on API's the one thing that annoys me a *little* between all the various sites is that the files do not share any of the context data - Strava, GC, TP, Zwift.. if you take any time to name a file, or add commentary, etc in any of the data.. that is not present in the file when you pass it on to the next source. All of my accounts are currently messy, but I keep my GC as the neat version/'the truth'. Anyone found a way around this?

This is a problem with the two Garmin file formats FIT and TCX (which are the most popular options for uploading/downloading from training sites). They don't really support narrative fields and as a result you lose that data when working with sites that use them.

Its quite notable that Today's Plan is the only site (so far) to have adopted a JSON format which doesn't have this problem (and its supports read/write of GoldenCheetah JSON format, which is super cool). Also notable is the fact they allow upload/download to non-premium accounts (i.e. free accounts).

I have no affiliation with them, but think this is pretty cool.

We do read/write with a lot of sites in 3.5, and more will be added soon, but the FIT/TCX file format limitations are an irritant.

Mark

Potuz

unread,
Apr 22, 2017, 9:28:41 AM4/22/17
to golden-cheetah-users


On Saturday, April 22, 2017 at 1:10:48 AM UTC-5, Mark Liversedge wrote:

Its quite notable that Today's Plan is the only site (so far) to have adopted a JSON format which doesn't have this problem (and its supports read/write of GoldenCheetah JSON format, which is super cool). Also notable is the fact they allow upload/download to non-premium accounts (i.e. free accounts).


TodaysPlan has free accounts? I didn't know that and went ahead and signed up when I saw your e-mail. In the default setup I signed I see that I have a bill due in 14 days (I suppose they put me in a trial premium period) and there's no info about non-premium accounts. But now that I am asking here, how to I authorize in GC? by using "" in the URL field and hitting authorize a browser pops up blank. If I  type however the same url hardcoded in OAuthDialog.cpp then the browser pops up with todaysplan webpage. Should I be setting GC_TODAYSPLAN_CLIENT_ID somewhere?

Mark Liversedge

unread,
Apr 22, 2017, 10:13:22 AM4/22/17
to golden-cheetah-users
there is a bug (that is fixed already). The URL should default to: https://whats.todaysplan.com.au


Mark

Potuz

unread,
Apr 22, 2017, 10:30:00 AM4/22/17
to golden-cheetah-users


On Saturday, April 22, 2017 at 9:13:22 AM UTC-5, Mark Liversedge wrote:
there is a bug (that is fixed already). The URL should default to: https://whats.todaysplan.com.au


Thanks, unfortunately after going to the procedure of allowing GC I get:

"Error retrieving access token, Error transferring https://whats.todaysplan.com.au/rest/oauth/access_token? - server replied: Not Found (203)" 

I am not sure if I may have caused this cause before I read your e-mail I went ot https://whats.todaysplan.com.au/en/authorize/GoldenCheetah and hit authorize which seems to send the token to GC's main site (at least it redirects me there with a token). 

Mark Liversedge

unread,
Apr 22, 2017, 10:38:50 AM4/22/17
to golden-cheetah-users
If this is your own build you will need to get your own client id / secret from Today's Plan.

Mark

Potuz

unread,
Apr 22, 2017, 11:39:59 AM4/22/17
to golden-cheetah-users


On Saturday, April 22, 2017 at 9:38:50 AM UTC-5, Mark Liversedge wrote:
If this is your own build you will need to get your own client id / secret from Today's Plan.

Ohh right, thanks, already contacted support. In the meantime I'll upload manually my files and familiarize with their system. Thanks for pointing that they had free accounts. 

P. 

Dan Froelich

unread,
May 9, 2017, 9:32:32 AM5/9/17
to golden-cheetah-users
I thought I was somewhat capable, but this defeated me.
I'm sure I can find an alternate source for the virtualenv, but do you think you could write up a short step by step for the rest of us?

Jean Div

unread,
May 12, 2017, 8:01:32 AM5/12/17
to golden-cheetah-users
Never realised that it was a file format limitation.. Will keep pulling .fit, and using GC as the 'single version of the truth' till JSON becomes more widely adopted then. Thanks Mark.

Big ups to Todays Plan!
Reply all
Reply to author
Forward
0 new messages