Strava Support

1,002 views
Skip to first unread message

Justin Knotzke

unread,
Nov 21, 2011, 8:38:25 PM11/21/11
to golden-che...@googlegroups.com

   Hi

  I just uploaded a patch that allows users to upload their rides to Strava.com: http://bugs.goldencheetah.org/issues/519

  Big thanks to Mark Shaw CTO of Strava.

  It's got a few rough edges but in a week or two it will be complete.

  J

Mark Liversedge

unread,
Nov 22, 2011, 2:08:50 AM11/22/11
to golden-che...@googlegroups.com
I notice it applies to v2.1 not v3. Will take a look at applying to v3 since we've closed v2.1 for new features, hopefully releasing in the next week and a bit.

Will keep you posted.

Justin Knotzke

unread,
Nov 22, 2011, 3:02:02 PM11/22/11
to golden-che...@googlegroups.com
I've uploaded the final patch for testing.

There is now a modal dialog box to inform users of progress.

I've tested using non GPS'd data and it uploads fine. There's much less to see in Strava when there's no GPS, but the upload works.

That's it for me. Let me know if you find any bugs that need fixin'.

All the best

J

Mattyb

unread,
Nov 22, 2011, 5:25:12 PM11/22/11
to golden-cheetah-users
Awesome idea and great work.
Can't wait for it to be part of V3 :)

Mark Liversedge

unread,
Nov 26, 2011, 4:25:39 AM11/26/11
to golden-che...@googlegroups.com
Props to Justin and Damien who updated the patch for version 3. I pushed it this morning to the v3 repo.

Lets see if we can get GC users to top of those KOM rankings ;)

Mark

VeloTraining

unread,
Apr 5, 2012, 5:11:56 AM4/5/12
to golden-che...@googlegroups.com
Hi

I've just downloaded GC, the latest Windows development version, I'm having problems getting it to upload to Strava. I've imported a .wko file into GC of a VeloTron workout and that seems to work fine though the .txt file generated by the VeloTron Coaching Software (VTCS) wouldn't import. When I try to upload to Strava I'm told to "make sure I fill in the Strava login info under Tools>Options". When I go in there al I can find is a "proxy" tab, here I am invited to enter proxy type, hostname, port, username and password. I've tried putting in my Strava username and password but still no joy and I'm not sure what should be in the other fields, assuming I'm even trying to fill in the right section!

The version of GC I downloadd has  abuild date of March 25th 2012.

Anyway, any help would be appreciated as so far I'm stuck.

Thanks,

Q

Jamie Kimberley

unread,
Apr 5, 2012, 7:57:57 AM4/5/12
to VeloTraining, golden-che...@googlegroups.com
I have had similar issues trying to upload to strava. Not sure what exactly is wrong, but I seems to be user specific and possibly an issue on strava's end of things. 

//mobile\\
--
_______________________________________________
Golden-Cheetah-Users mailing list
golden-che...@googlegroups.com
http://groups.google.com/group/golden-cheetah-users?hl=en
Message has been deleted

VeloTraining

unread,
Apr 5, 2012, 8:09:24 AM4/5/12
to golden-che...@googlegroups.com, VeloTraining
Hi Jamie

So it sounds as if at the present time this doesn't reliably work ;-(

Q

_______________________________________________
Golden-Cheetah-Users mailing list
golden-cheetah-users@googlegroups.com
http://groups.google.com/group/golden-cheetah-users?hl=en

G Coco

unread,
Apr 5, 2012, 8:41:16 AM4/5/12
to golden-che...@googlegroups.com
Hi,

Select Tools Menu - Options Item
Click Athlete icon on the left
Select the Passwords tab
Scroll Down to Strava section and add username/password.
Click Save button

Gareth

VeloTraining

unread,
Apr 5, 2012, 11:41:43 AM4/5/12
to golden-che...@googlegroups.com
Hi Gareth

Thanks for that, I thought that's what I did. I'm afraid at the moment GC is inoperable on both my iMac and my W7 machine. I've been trying to import some .wko files and GC stalls at a certain point and stops working, worse still GC then gets left in a state from which it will not load. Mark Liversedge has kindly been in touch and I've sent him some files to have a dig around with. Damned shame as I thought GC was going be solve this Strava issue for me with my VeloTron files!

Cheers,

Q

Mark Liversedge

unread,
Apr 5, 2012, 12:23:36 PM4/5/12
to golden-che...@googlegroups.com
Q and I swapped via email.

The crash/hang is due to a "bad" wko file (we fail to parse it correctly), i have pushed a fix for this in commit #cb212571 (well a fix to stop the crash, not the parsing error).

For now, the offending file needs to be deleted.

VeloTraining

unread,
Apr 5, 2012, 1:09:48 PM4/5/12
to golden-che...@googlegroups.com
Hi Gareth

I've installed v3 on my Mac and under the tools menu there is no "options" to select :-(  Screenshot attached.

Cheers,

Q

On Thursday, April 5, 2012 1:41:16 PM UTC+1, G Coco wrote:

VeloTraining

unread,
Apr 5, 2012, 1:23:22 PM4/5/12
to golden-che...@googlegroups.com
Hi Gareth

Right, thanks very much. My fault entirely, I didn't look under athlete but wrongly assumed it would be under "settings", hence the "proxy" issue :-(

Anyhow, I'll give this a go now!

Thanks for your help,


Q

On Thursday, April 5, 2012 1:41:16 PM UTC+1, G Coco wrote:

Mark Liversedge

unread,
Apr 5, 2012, 1:23:38 PM4/5/12
to golden-che...@googlegroups.com
on a mac its under goldencheetah -> preferences.

VeloTraining

unread,
Apr 5, 2012, 1:26:11 PM4/5/12
to golden-che...@googlegroups.com
Hi 

Sigh… so it is. Looks like I'm going to have to revert to blaming my age shortly ;-)

Anyway, I'm going to give it a go!

Cheers,

Q

djconnel

unread,
Apr 23, 2012, 9:28:39 AM4/23/12
to golden-che...@googlegroups.com
First, nice work!   It would be nice to have download as well... http://www.strava.com/api/v1/streams/:rideId

I've had a time zone problem with Strava when uploading.  I don't see in source how you deal with it....  Here's a copy of my support request, which hasn't yet been answered:

-------
  • It appears to me that when a ride is uploaded, the following is done: 
    1. time is converted to GMT using the time zone offset (good) 
    2. default time zone offset is applied (bug) 
    3. This is set as the "ride time" (Zulu) 
    4. time zone of the first position is applied, generating another "zulu" time 
    5. This is interpreted as the "local time".

    There's two errors here: 
    1. step 2 
    2. the "local time" should be reported with a time zone offset, not as Zulu.




Greg Lonnon

unread,
Apr 23, 2012, 2:52:10 PM4/23/12
to djconnel, golden-che...@googlegroups.com
Dan,

Are you sure time zones on upload isn't working?  I am pretty sure that got fixed a few months ago in V3.  We had a bug that hardcoded the timezone, fixed it to always convert the timestamp in the file to UTC time.  I checked this for tcx format, but the logic should work for all the other formats too.

As for the download, the data stream doesn't contain power information and I think the only hard part of the download would be creating a UI that would allow you to select the right ride.  I am assuming that you don't want to download your own ride, but another rider's data.

Greg

djconnel

unread,
Apr 23, 2012, 8:39:32 PM4/23/12
to golden-che...@googlegroups.com, djconnel
Yes -- data stream contains power.


jump to "watts".  It also has "temp", which is temperature in degC, which is undocumented.

On the time zone issue: I was sending all zulu time (+0:00) and it adjusted by the user default time zone offset to a new zulu time shifted.  When the original data had a time zone adjustment, it was correctly shifted to zulu, but then erroniously adjusted to a local time zone.  I was sending a JSON stream (as I see GC does) rather than a TCX stream.  This was all v2 upload.

Here's my PHP code for upload:

   $payload =
      array(
            "type" => "json",
            "token" => $token,
            "data_fields" => $data['fields'],
            "points" => $data['points'],
            "activity_name" => "PHP upload test"
            );

      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, 'http://www.strava.com/api/v2/upload');
      curl_setopt($ch, CURLOPT_POST, true);
      curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accepts: application/json'));
      curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
      curl_exec($ch);
      curl_close($ch);

where time data were prepared:

      $t0 = time();
      date_default_timezone_set("GMT");
      .
      .
      .
        $time = date(DATE_ATOM, $t + $t0);
        $points[] = array($time, $lat, $lng, $alt, $tc);

On Monday, April 23, 2012 11:52:10 AM UTC-7, Greg wrote:
Dan,

Are you sure time zones on upload isn't working?  I am pretty sure that got fixed a few months ago in V3.  We had a bug that hardcoded the timezone, fixed it to always convert the timestamp in the file to UTC time.  I checked this for tcx format, but the logic should work for all the other formats too.

As for the download, the data stream doesn't contain power information and I think the only hard part of the download would be creating a UI that would allow you to select the right ride.  I am assuming that you don't want to download your own ride, but another rider's data.

Greg

On Mon, Apr 23, 2012 at 7:28 AM, djconnel wrote:
First, nice work!   It would be nice to have download as well... http://www.strava.com/api/v1/streams/:rideId

I've had a time zone problem with Strava when uploading.  I don't see in source how you deal with it....  Here's a copy of my support request, which hasn't yet been answered:

-------
  • It appears to me that when a ride is uploaded, the following is done: 
    1. time is converted to GMT using the time zone offset (good) 
    2. default time zone offset is applied (bug) 
    3. This is set as the "ride time" (Zulu) 
    4. time zone of the first position is applied, generating another "zulu" time 
    5. This is interpreted as the "local time".

    There's two errors here: 
    1. step 2 
    2. the "local time" should be reported with a time zone offset, not as Zulu.




--
_______________________________________________
Golden-Cheetah-Users mailing list

djconnel

unread,
Apr 24, 2012, 12:32:51 PM4/24/12
to golden-che...@googlegroups.com, djconnel
Some tests a friend of mine did:

Here's a ride I manually generated and uploaded... you can see the time stamp I used in the title:
So definitely funny business going on.

I've managed to compile the code on my new Mac, so I'm going to see what GC is potentially doing differently.

Greg Lonnon

unread,
Apr 24, 2012, 9:16:46 PM4/24/12
to djconnel, golden-che...@googlegroups.com
Dan,

There is something odd going on.

It seems they don't wrap the date/time correctly.  It looks random...  Do you have the json dump used for the upload and download.

In GC, we use the GMT zone (or the zulu time zone) for all uploads and allow QT to do the mapping based on the time zone in the data.

It seems to work fine...

Greg

PS Good catch on the power, I looked at one of my mtb rides that doesn't have power.  Having the power on the file could open up some fun GC realtime features.

--
_______________________________________________
Golden-Cheetah-Users mailing list

djconnel

unread,
May 3, 2012, 9:48:54 AM5/3/12
to golden-che...@googlegroups.com, djconnel
I worked out my... or rather Strava's problem.

Convert times to GMT, send with a "Z" at the end, and it works (e.g. 2012-05-03T12:00:00Z )

Rely on standard time formatting ( e.g. 2012-05-03T12:00:00+00:00 ) and you get the extra time adjustment.

I'd still call this a "bug" on their side but in any case my application now seems to work... sort of.   I really want to replace old data with new better data and only seem to be able to create a new activity with the new data, the old activity remaining.  Goal is to remove time gaps from activities, and/or segments where the computer was clearly left running in a motor vehicle.

stijn goossens

unread,
Sep 2, 2014, 2:06:35 PM9/2/14
to golden-che...@googlegroups.com, djco...@gmail.com





I just installed the GC 3.1 which looks quite great :)
But is it normal that strava upload is greyed out (see screenshot)? If it would matter, I'm using the debian repository.


A question: is it possible that GC recognizes automatically which sport it is when importing (from strava)?


regards

Stijn


Torbjorn Jansson

unread,
Jul 7, 2015, 4:00:26 AM7/7/15
to golden-che...@googlegroups.com, djco...@gmail.com
I am observing the same behaviour as Stijn, with a disabled Strava upload. I am building from source code on Linux Ubuntu 15.04, currently building GC v3.2 RC2. Before, when running on a windows machine, I used the distributed win installer and Strava upload worked fine, so I suspect that I have missed some setting in the build process.

Could anybody please help me getting it right? It is quite annoying to register rides in two places.

Cheers,

Torbjörn

Jon Escombe

unread,
Jul 7, 2015, 8:25:38 AM7/7/15
to Torbjorn Jansson, golden-che...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages