Auto assign gear to activities using filters

Yes thats correct.

Hi David,
after today’s ride (Intervals.icu) it happens again and auto assign doesn’t work. First time for a week, all other rides were fine.

thanks
alfred

Tx. When that activity was loaded there was already a matching Strava activity so the gear was taken from that. I am trying to think what to do about that. If someone has a bunch of Strava activities all with correct gear and then connects Garmin/Polar/Suunto/Coros and they get replaced then copying their gear is good. But then you gets random gear assignment “failures” when new activities come in depending on the timing between Strava and the other activity source.

thanks for checking.
So nothing I can really do to avoid it, I will manually choose the gear whenever required.

cheers

another note to this failure:
when I update the gear from Strava
image

I end up with “double entries” in bikes, those I have added here in ICU with power meters assigned to and those I had added in Strava some time ago.

Now I am wondering whether the “Factor” coming from Strava is seen as a different bike to the “Factor” in ICU and therefore causes the error.
My simple solution would be to delete the gear in Strava cause I don’t really nead it there. Or alternatively adapt the gear coming from Strava with power meters, components, alerts etc.
What’s your recommendation?

cheers

I have been trying to figure out how to solve this without having to add a “Use gear from Strava” checkbox (if unticked then gear would be assigned using Intervals.icu rules instead). But maybe thats the way.

I have added an option to ignore Strava gear and just use Intervals.icu gear assignment rules:

Re to my last post, I have tried my 2nd option:

no more errors since then. Although I have to bulk-update the “new gear” in the activity list, but once I realised that this needs to be done :face_with_monocle: it was quite easy to apply.
Anyway, the tick-box on the Strava connection appears to be a solution as well.

cheers
alfred

1 Like

to my surprise, today’s ride ended up with assigning the wrong bike to the power meter in use.
Even though the Rotor PM and the serial No is associated with the Elves-bike,

and also apparently in the FIT-file,

the wrong bike (Factor) is assigned to the ride

image

I have also ticked the “Don’t use Strava gear” box.

@david: is the logging you applied 2weeks ago still active?

tx
alfred

Yes the logging is still there but I cannot figure out how the code is running:

2023-11-01 15:22:34.043 DEBUG 1 — [o-8044-exec-146] icu.intervals.strava.StravaSyncService : Athlete i30021 ignoring Strava gear on 10141712950
2023-11-01 15:02:10.591 DEBUG 1 — [o-8044-exec-111] icu.intervals.strava.StravaSyncService : Athlete i30021 ignoring Strava gear on 10141712950
2023-11-01 12:07:19.594 DEBUG 1 — [ async-job-7165] icu.intervals.service.ActivityService : Athlete i30021 new activity 2023-11-01T10:29:20Z gear set from Strava activity 10141712950 [b10887625]

Code is simple:

if (!athlete.ignoreStravaGear() && strava.gear != null && strava.gear.id != null) {
    activity.gear = strava.gear;
    log.debug("Athlete " + athleteId + " new activity " + activity.start_date_local +
        " gear set from Strava activity " + strava.id + " [" + activity.gear + "]");
}

public boolean ignoreStravaGear() {
    return ignore_strava_gear != null && ignore_strava_gear;
}

I really don’t get it. Maybe I will think of something tm with fresh brain.

thanks for your efforts David,
will re-check after tomorrows ride if the error emerges again.

Refresh your brain :wink:

Update:
after today’s ride, the bike was correctly assigned based on the PM Serial data.
Not exactly clear to me why this happens occasionally.

This is awesome!

Just diving into the gear tracking on intervals, previously only used Garmin connect (which sucks) … but Garmin is my main data source and that made sense. With Garmin, I always needed to manually switch my gear components since there was no way to auto-assign based on subcategories.

Now I’m trying to do just that with intervals and that leads bumps me into an issue. I manually added my gear and components to track with the correct values from Garmin. Here is the setup:

Bike R, chain component R, chainring component R, cassette component R
→ filter bike, outdoor
Bike G, chain component G, chainring component G, cassette component G
→ filter gravel bike, outdoor
Equipment (trainer), chain component R, chainring component R, cassette component T
→ filter bike, indoor

The idea is that when I ride gravel everything related is tracked and some for road, with the addition of indoor on the trainer. The way it’s set up now the bike R itself is not tracked with the indoor trainer activity, any tips on how to achieve just that?

Thanks!

Did you try creating 3 different bike profiles. The way intervals.icu handles gears is based on the premise of “bikes”

    • Bike R , chain component R , chainring component R , cassette component R → filter bike, outdoor
    • Bike G , chain component G , chainring component G , cassette component G → filter gravel bike, outdoor
    • Equipment (trainer), chain component R , chainring component R , cassette component T → filter bike, indoor

and then assign the gears/bike based on the activity. (you need to ensure your indoor rides are marked as indoor)

I had this issue as well and I solved it using my app which I can assign specufuc gears to specific sports automatically. I like to track some items which is not trackable currently in intervals.icu so I still use Garmin as my main gears source.

1 Like

I did not. What I forgot to mention is that I use my road bike on my trainer (KICKR) and track both indoors. That only can be achieved in the current gear tracking setup automatically if we could add a subfilter for components, allowing to filter indoor and outdoor components on the Bike R … then I would add my Kickr trainer and it’s cassette as a component. I also struggle to find a way to quickly edit components (maybe Garmin has the edge here), looks like I need to wait with gear tracking in intervals.

Looking at your trainer app, what a great feature. That solves a big portion of my tracking efforts … at least for biking. Same issue with Garmin and running, road, trail. Thanks for the headsup I’ll have a look at the app. edit Looks awesome and for me interesting, but I’m an android user.

1 Like

I think this would still be doable as you’re tracking “bikes”, hence you would just assign gears to the specific bike, but you will have to “blow” up your bike to components. eg: FrontWheel, BackWheel then

Outdoor Bike + FrontWheel + BackWheel → Assign to Outdoor activities
OutDoor Bike + FrontWheel + Trainer Cassette → Assign to Indoor / Trainer activities.

Was thinking the same, duplicate the roadbike with an indoor and outdoor setup, and components can be shared. Need to sleep it over, not the perfect solution. Thanks for your inputs!

edit

This is a bit of a hack, but allows full flexible filtering. Use the general category for “Bike” then add bikes as a component. This allows for fully flexible auto-assign with all kinds of filters.

1 Like

I’m not sure if this is the right place to ask this, but…

After my bike ride is complete and it auto-uploads to Strava, and then auto-uploads to Intervals, I need to change the gear. I have a default bike that is assigned to all my bike rides in Strava, so I edit the gear in Strava after the ride to change to the actual bike I rode. But in Intervals, it does not update after I have edited the Strava ride. Other changes in Strava (the title of the ride, for example) do update in Intervals after I edit them in Strava. My gear (my bike) does not update, though. I have to go into the activity in Intervals and click “actions” and then “sync” to update it.

Is there a better way?

Strava doesn’t send out all items after the initial upload. AFAIK, it sends the updated title and desc and perhaps a few other things.

1 Like

Is it possible to allocate 2 pieces of gear to an activity by default for instance a bike, and a trainer for for virtual rides, if so how? Thanks in advance