This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to affect an equipment to an activity ?

I have two bikes : A gravel and a mountain bike.

Is it possible to affect an activty to a specific bike ? When I use my Garmin (Edge 1030), I choose the activity. The report in Garmin connect mentions the activity (gravel/mountain bike) but there is no affectation of the distance to the bike. 

Is it possible to automatically affect the gravel activty to my gravel and the mountain bike to my mountain bike ?

Thanks !

  • No, we can select only one default gear for a main category, and every sub-category will get the same gear.

    Automatically Add to...

    • Running
    • Cycling
    • Hiking
    • Swimming
    • Walking
    • Other

    So, choosing a default bike for Cycling, will add it to all sub-categories. Mountain and gravel cycling will get the same.

  • Gears for activities' categories and also sub-categories can be auto changed using a script.

    Use in web-browser console (F12).
    Set limit=2 as needed, for testing - this will change 2 latest activities if typeKey=mountain_biking.

    Change typeKey for other types (gravel_cycling or road_biking), you can also add other search conditions (dates, distances or something), some parameters are listed in this post.

    Get gear ID from Gears' page - choose Edit and copy ID from a link. Then replace !!!GEAR_ID!!! by that ID.

    Insert if inside a search script (line 8).

    jQuery.getJSON(
        'https://connect.garmin.com/modern/proxy/activitylist-service/activities/search/activities?limit=2',
        function(act_list)
        {
            act_list.forEach(
            function(act)
                {
    
                }
            );
        }
    );

    if(act['activityType']['typeKey'] === 'mountain_biking')
    	{
            fetch('https://connect.garmin.com/modern/proxy/gear-service/gear/link/!!!GEAR_ID!!!/activity/' + act['activityId'],
            {
                'headers': { 'NK': 'NT', 'X-HTTP-Method-Override': 'PUT' },
                'method': 'POST'
            });
            console.dir(act['activityId'], act['activityName'], act['startTimeLocal']);
        }


    If you need to remove some gear from an activity, then it's done the same way,
    change .../gear/link/... to .../gear/unlink/....

  • Thanks for your answers. This is something that could be implemented and could be useful. I am sure I am not alone with more than one bike.

  • Hello,

    I have the same needs for bikes and also for running shoes (Trail / Road).

    It would be a great addition to implement default gears based on sub-categories instead of categories.