Strava Integration

Show info on miles, friends rides, percent of weekly, monthly, annual goals.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Started working on this today, mostly there just need to figure out athlete authentication. I’ve included the ability to display all-time or YTD stats for your running, cycling or swimming. I’ll work toward publishing but would greatly appreciate any feedback or collaboration in the interim!

Code: rgkimball/tidbyt_strava

Preview:

Edit: PR has been opened for review, looking forward to hearing everyone’s feedback! Add Strava applet by rgkimball · Pull Request #238 · tidbyt/community · GitHub

This looks great! I like the options you are planning, and I think that covers anything I wanted to do.

Initial version released! Give it a shot, would love to hear what you think and any ideas for what else could be included.

I installed it right away when it first appeared. It’s exactly what I wanted, thanks for doing this!
The only thing I might suggest, you have YTD and All Time, perhaps the Monthly Progress option? I’d like to see the monthly graph from the current month against the previous month like they have in the iPhone app:

Just an idea, I love it as is!

That would be cool, nice idea! I’ll look through the API docs a bit and see if something like this is feasible.

Turns out this wasn’t too hard actually, we can easily query for a list of activities between two dates, and the Pixlet/Starlark API makes it pretty easy to chart things!

image

Might take a few weeks to get this into production but it’s close!

1 Like

That’s awesome! I think I’ll run two instances of your app so I can see the annual and the monthly progress.

Maybe a display of your last swim,bike or run would be cool too? (I’m getting greedy aren’t I :slight_smile: )

I thought about doing an individual activity display but my favorite part of the activity feed is the map, and I had my doubts that something like that would translate well to a lo-res display. Converting the polylines into an image also seems to be something of a project. Do you have a good idea for what that display might look like without maps?

1 Like

I played around with polylines in the past. I plotted them in a Javascript app. I’ll go back and review what I had. But as I recall, it wasn’t too bad.

While it would be cool to see your route drawn out, just a graphic of your last activity, the distance, pace and elevation and a trophy icon would be pretty cool to display.

1 Like

Hi there, love this app, but currently getting this error: “Strava API failed, code 429, Rate Limit Exceeded” on my Tidbyt. Tried deleting and re-installing app, same error…any thoughts?

1 Like

I looked at the Strava code and it will cache the data for one hour. So there isn’t anything you can do now to fix this.

@rgkimball I have two thoughts you might consider:

  1. Check with Strava what their policy is, my guess is they’ve changed it since you wrote this app
  2. Check for a 429 error before overwriting the cache. If you get that error, just display the old cached version.

I have both the YTD and AllTime display on mine, love it!

3 Likes

Hi - apologies for the display issues lately. The curse of popularity! The 429 error tells us that as a community we are hitting the limit of our API usage - up until yesterday we were causing the app to fail in this situation, but a blank screen can be a bit confusing since I can’t really tell what’s failing.

I especially like suggestion #2 here, though you would increasingly see stale data on your device as you add activities. Definitely preferable to an error but still confusing since people will expect to see the screen update!

Perhaps hourly updates are a bit eager for the purposes of this display; I could switch to daily but this would simply give us some runway as the install base grows. We can certainly think of ways to pare back our requests, but the real solution here is to have Strava increase our rate limits. I’ll see what I can do about a short term fix here while this is worked out. Appreciate your patience and all the interest in the app!

3 Likes

This looks great, just added it to my Tidbyt! :slight_smile:

This is great work, thanks for doing this! If necessary, maybe we could generate an api key per user, and pass that to your app. Unless strava would be so kind as to increase the rate-limit.