Saturday, March 03, 2018

Converting Strava segments to FIT files

Strava Premium users who own a Garmin can sync their favourite Strava segments with their Garmin device automatically. But that’s not an option available to free users. Apparently this site used to be able to generate the FIT files used by Garmins but Strava made some fairly radical changes to their API that broke that site (and many others).

So I’ve added a FIT file export to my Segment Explorer. Due to rather inclement weather I’ve not been able to test this out on the road yet, but downloading the FIT file and shoving it in my Garmin\NewFiles folder displays it in my Segments list so it seems to work. If you authorize my app then your PR time will also be included in the file.

Update – You can now add a goal to the generated FIT file if you generate the file from the segment details page

38 comments:

bemme51 said...

Hi, I used gniza's tool quite a while. I tested yesterday an exported segment which I download here. So far I'm not sure which datat is included in the fit-file generated here. The "gniza"-fit-files contained the effort I picked before downloading (usually the segment leader time). so far it seems that there are some ponters for the different leader types: https://github.com/BenniG82/edge-segments/wiki/Segments-FIT-File-Structure

I didn't had enough time to compare between the segemnts, I'll follow up on that ( I still kept a few old "gniza" files)

ANd - thanks for your work :-)

Doogal said...

If you connect your Strava account to my page, it will include your PR data. It should also include the KOM and QOM data, although I'm just taking an average time for the KOM/QOM points along the segment as I'm not sure if I'm able to get the actual times from Strava (I will investigate further)

Unknown said...

I have a edge 510 plus. And used your site. The segments show up in my device but I can't get it to popup on my display. Am I doeing something wrong?
I have selected Garmin segments in the device. Should I select strava segments instead?

Unknown said...

Sorry that must be 520plus

Doogal said...

I don't have access to a 520 plus so unfortunately can't test it. It works OK on my 810 and I've had feedback from people using the FIT files on Forerunner 935, Edge 1000 and Edge 510. I'd have thought the 510 is pretty similar to to the 520 so I'd have thought it should work. You'll want to be set to Garmin segments, if you set it to Strava segments it will try to sync your starred segments from Strava which will only work if you've got a Premium account (and if you've got a Premium acount that's probably the best approach anyway).

Is it a problem with all the segments or just a specific one? Might be something related to what's in one of the segments. Also is there anything in the Garmin\Debugging folder on the device?

Unknown said...

Come posso fare a collegare il mio accaunt trava alla tua pagina??? Grazie

Unknown said...

Thank you! I had some segments that weren't getting transferred to my Fenix 5X and I was able to transfer them with your site.

jardelaf said...

For a long time I was looking for some website or app that could download the strava segments and consequently could share them in garmin and use them because the gniza site no longer works (unfortunately).
But from looking, I found this post and I followed the steps and downloaded a segment. I'll test it and hope it all goes well.
I'm from Brazil!

ogi said...

Thank you very much :) We need this kind of tools like gniza. Strava is insufficient in some respects. Do you think to improve your tool? For example are we able to merge our different achivements such as PR, last ride or any ride in a specific date?
Thanks,
Ugur

Doogal said...

Your PR should be in there if you've authorised my Strava app. There's only a certain number of different types of achievement that can be added to a FIT file, Overall (I guess best of KOM/QOM), PersonalBest (not sure how that is different to Pr), Connections, Group, Challenger, Kom, Qom, Pr, Goal, Rival, ClubLeader. I could potentially fill any of them if they are useful. I guess they could also be reused for other things but I think that could be confusing. I'm thinking goal could be pretty useful and I can hopefully just pick it up from Strava, so you can set it to whatever you like?

Doogal said...

Although looking at it more closely the Strava API doesn't give me access to a user's goal on a segment, but I could probably add an option for adding a custom goal when generating the FIT file?

ogi said...

if you can add custom goal, i would appreciate. Thanks:)

Doogal said...

I've added it to my To Do list, hopefully I'll get to look at it soon

ogi said...

Thanks :)

Anonymous said...

Just want to say i really appreciate the work you've done setting up this website, it has worked great with my Garmin 510 for sometime now!

Can i ask if you know if it works with a Element bolt/roam device (as i am thinking of purchasing)? I.e. can i put the generated fit (or gpx) file onto the bolt and have it show up as a segment whilst out riding?
Many thanks

Doogal said...

I'm afraid I've not had any reports of people using these files on an Element Bolt/Roam. As far as I can tell it generates FIT files for workouts and uses GPX for routes so it understands the formats but I can't find any information about what it uses for segments

If you do buy one I'd certainly be interested to know if works (I was leaning towards buying a new Garmin to replace my ageing 810 but maybe I should buy a Wahoo instead for testing purposes!)

Doogal said...

You can now add a goal to the FIT file from the segment details page

ogi said...

That's great. i will try and let you know. Thanks:)

ogi said...

I tried with Edge 1030. It seems it works. it will be very useful for me. Thanks:)

Unknown said...

Hi, I managed to upload the fit file into the newfiles and the segments show up on my garmin edge 820. But the problem is they are getting removed as soon as it syncs. Is there a way to avoid this happening over and over. Can I add these segments on garmin connect? Thanks

Poggs said...

Hi,
Do your PRs automatically update, or do you have to download an updated fit file to overwrite the existing data?
Many thanks.

Ps your segment downloader is really useful, as Strava have now stopped you from using live segments, if they are downhill. There is no point being a Premium member, if you are a mountain biker now.

Doogal said...

Unfortunately you have to download the segment again to get an updated PR

Robert said...

Thanks for your work! From a first glance, it looks like only the KOM effort is available in the fit file (tested on a Garmin Edge 130). I would need the QOM data (not the personal data).

Doogal said...

Unfortunately some changes by Strava mean the QOM is no longer available to me, just the fastest overall

Justin said...

Did anyone figure out if you can load these fit files onto a wahoo? I'm working on a similar feature for Sauce for Strava but I too only have Garmin's for testing.

Anonymous said...

Doogal You sir are a geezer

Since Strava have seen fit in their wisdom to disable live segment loads on anything they consider a downhill segment less than avg gradient minus 0.25% this looks like a workaround as I understand it this was targeted at mountain bikers and was some sort of safety feature to avoid Strava being accused of encouraging dangerous racing but it applies to running as well and the gentlest of gradients now doesn't load

I've loaded a single downhill (-0.3%) segment as a test and all appears fine but can you clarify the difference between

Add Optional Rival PR and Add Optional Challenger PR as I'm confused

Also if I link my Strava account can it pull through my own personal PR into the fit to run against

Last question if I've successfully loaded file via new files folder will the next sync with Strava remove the segments I've loaded via your tool.

I assume that if I beat a PR I'd also have to load .fit manually again to edit the time?

Doogal said...

Rival and Challenger are just names for some times you want to add to the FIT file. They should appear with those names on the Garmin

Yes, if you connect to Strava then your PR should come through

I don't think they'll get removed when you sync your Strava segments but I've not tested it much using Strava segments. The only issue I've heard of is segments not appearing when following a route, but that seems to be due to the route directions taking precedence over the segment

Unfortunately you need to download again if you beat your PR. I avoid that by being unfit and never beating any of my PRs!

Anonymous said...

Last question if I've successfully loaded file via new files folder will the next sync with Strava remove the segments I've loaded via your tool.



I posed this question the other day and can confirm after testing that with your .fit download its possible to run your solution in parallel to Live segments on Strava Premium

Any segments with an avg gradient of minus 0.25 or ABOVE sync via the Live Segment functionality between Strava and Garmin Connect

Its possible then to side load those BELOW minus 0.25 (the downhills) manually via the New Files folder and both happily co exist on the device

AND subsequent syncs of Strava and Garmin do NOT overwrite the side loaded files

Many Thanks

Unknown said...

This used to work for me i would download the fit file put in in new folder (on garmin) and change to Garmin seg instead of Strava seg but downhill seg will not trans have Garmin blocked thid too?

Doogal said...

Is it still working with uphill/flat segments? If so I guess it is something Garmin have done. Otherwise I may have broken something when making changes for changes Strava have made

Anonymous said...

I was having the same issue as far as the segments being deleted. I changed my setting in garmin express to not automatically connect. I was able to download "downhill" segments today and they worked on my garmin. It is possible the next time I sync with garmin express I will have to reload. I am keeping a folder on my computer of all the segments and then will copy and paste if I have to. I don't update very often. But at least it does still work.

Kosio said...

I have the following question: if I enter a goal time, will the fit file assume that I should move with the average speed implied? And if I choose my PB, will it actually compare to the effort second by second? I am asking because for many segments with fluctuations in speed the average speed is not very useful. Comparing to the own PB would be perfect!Maybe it could even be scaled.

Doogal said...

Kosio

For PR times, it will use the actual timings from your PR effort. For the goals a constant speed is assumed. You're right, if there's a PR, I could scale the timings for the goals, I'll add that to my To Do list

Miro said...

Hello i want some of the DH segments on my new Garmin edge 130. i followed the setup for this, changed to Garmin segments, copied files to GARMIN/NEWFILES , but nothing happens. I dont see these segments. When I connect my Garmin device to the PC again, the NEWFILES folder is empty. I dont know what to do now, can you give me an advice? thanks
btw, i found your site on the strava support forum, and i like your segment explorer very much.

Doogal said...

I'm not familiar with the 130. Does it provide a list of the segments on the device? Is that showing anything? I heard today of someone having trouble with segments where they hadn't ridden the segment before so there was no PR, maybe that's the problem?

Miro said...

update: I also connected the strava account with your wonderful page, and then with another button exported the .FIT file, and after copying, it now works! Yes the 130 has the segments on the device, now it can show even the DH segments, and my friend has tested this yesterday and it works! But like you said, unridden segment doesnt show any PR to compete (i think until i use your table then), and also does not show the live segment popup when you have Course enabled. But i have to say, your tool is absolutely amazing, also thank you for answering. Not only that you can have DH segments live, but also it can be used without premium! great work!
P.S. Maybe if there is an option to download ALL my starred segments as .FIT by one button at once, it would be very useful feature for updating.

Doogal said...

Good to hear it's working, I've added your suggestion to my To Do list

Doogal said...

You can now download all your starred segments from https://www.doogal.co.uk/SegmentViewer.php
It will give up after 100 segments since I don't think Garmins will let you use more than 100 segments. And I've not tested with a large number of segments so it's quite possible it may time out with a lot of segments