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

Lost HR module

I lost an HR module recently and I'm trying to figure out the last activity I used it on. Through GC/GCM (or perhaps the FIT file), is it possible to work out the HR source of an activity? 

Thanks

  • Hey, I whipped up a quick script that will show you the sensors used for the current activity you're viewing in GC (web). (I'm assuming that you know the ballpark of the last activity you wore it.)

    This will work on PC/Mac/Linux or even mobile (but the UX for GC web sucks on mobile).

    If you need a script that just lists a bunch of activities by date, along with their sensors, that would also be doable, but I figured this would be the quickest solution.

    Also, I assume it's not an HRM-RUN with fancy running dynamics, bc otherwise you could tell whether it was used by the absence or presence of metrics like stride length and ground contact balance.

    Installation

    1) Get script from here: https://pastebin.com/Uz0NZ95V . Copy raw data to clipboard (click on RAW Paste Data box, press CTRL/CMD-A, CTRL/CMD-C)

    2) Open https://caiorss.github.io/bookmarklet-maker/

    2a) Paste script from 1 into Code box

    2b) Change title to "GC sensor info"

    3c) Click Generate Bookmarklet

    3d) Drag blue bookmarklet onto your bookmarks bar. (Press CTRL/CMD-SHIFT-B if it's not visible)

    If you are on mobile or you somehow don't have a bookmarks bar:

    - Bookmark any site at all

    - Copy Output from bookmarklet maker to clipboard

    - Edit bookmark and paste clipboard into Address/URL/Location field

    Usage

    1) Log into garmin connect

    2) Navigate to a recent activity

    3) Click on your new "GC sensor info" bookmark

  • I went ahead and made a script to show activities and sensors for the last 30 activities (or # of activities of your choice). (Thanks for the idea )

    Usage:

    - Log into Garmin Connect Web

    - Open dev console (F12 / CTRL-SHIFT-I / CMD-OPTION-I)

    - Paste following script into console

    function activitySensors(limit) {
        console.log(`Loading last ${limit} activities. This may take a while.`);
        const results = [];
        let pendingRequests = limit;
        jQuery.getJSON(
            `https://connect.garmin.com/modern/proxy/activitylist-service/activities/search/activities?limit=${limit}`,
            function(act_list) {
                act_list.forEach(
                    function(act) {
                        jQuery.getJSON(
                            `https://connect.garmin.com/modern/proxy/activity-service/activity/${act.activityId}`,
                            function(activityInfo) {
                                results.push({
                                    act,
                                    activityInfo
                                });
                                pendingRequests--;
                                onReceive();
                            }
                        )
                        .fail(function() {
                            console.log(`Failed to retrieve activity with ID ${act.activityId}`);
                            pendingRequests--;
                            onReceive();
                        });
                    }
                )
            }
        );
    
    
        function onReceive() {
            if (pendingRequests > 0) {
                return;
            }
            results.sort((a,b) => ((a,b) => (a > b) - (a < b))(a.act.startTimeLocal, b.act.startTimeLocal)).forEach((r) => {
                const haveSensors = r.activityInfo.metadataDTO.sensors.length;
                console.log(`• ${r.act.startTimeLocal} | ${r.act.activityName} | https://connect.garmin.com/modern/activity/${r.act.activityId}${haveSensors ? "" : " | No Sensors"}`);
                if (haveSensors) {
                    console.log("Sensors:");
                    console.log(JSON.stringify(r.activityInfo.metadataDTO.sensors, null, 2));
                }
            });
            console.log("──────────────────────────────────────────────────────────────────────────────────────");
        }
    }

    - Run script by typing/pasting the following text into the console (change 30 to the desired number of activities to view):

    activitySensors(30);

    You'll see a list of activities with date/time, name, URL, and sensors (if present).

    e.g.

  • Thanks very much! I'll give it a try and report back.

  • Its an HRM Dual, so no running dynamics.

  • I used the console script method (cool coding!) and discovered that I last used it on the home treadmill. I've not found it yet, but at least I know it's likely to be hiding somewhere around my home, rather than on a running track.

  • Found it under the treadmill! :-)