Auto assign gear to activities using filters

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

Is there a general solution? My gravel bike has two cranks, one with crank power meter (gravel 2 cleat shoes), and one with Garmin road power pedals (road 3 cleat shoes). Therefore 2 PMs for 1 bike.

I’m using Strautomator and it supports OR condition.

Ugly workaround

IMG_5014

:man_shrugging:

Hours and miles don’t align. Something else to fix. Sigh.

Davi, tudo bem?
seria possível usar o sensor de cadencia ao invés dos medidor de potencia?

Hey David
Is there a way of doing this based on the connecting shifting.
E.g. I move my assomia’s between my road and TT bike but they both have AXS so I could I say this shifter is for this bike and that shift is for that bike?
Thanks :slight_smile:

Excuse me. Where I charge my shoes? I dont understand

If you are looking for how to add gear, it’s on the settings page:

Once added, set default gear for each category of sports.

Sorry, please.
The question was very very easy.
I am bad.
Sorry
Thanks

How are they supposed to match? I have same names in Strava and here, but the gear does not show up.

Also, when I click on activity type icon in order to choose a gear, the gear drop-down list is empty, nothing to choose from.