Skip to content
Randy H edited this page Oct 18, 2022 · 13 revisions

Welcome, Garmin users of Peloton bikes!

Introduction

Peloton supports synchronizing bike workouts with Strava but has no equivalent mechanism for Garmin Connect. A popular workaround is to use a Strava membership as an intermediary, configure Peloton to sync with it, and then manually transfer the ride from Strava into Garmin. This might be tolerable if you already maintain a Strava membership, but it is somewhat cumbersome if you are "Garmin-centric". The solution here uses an MS Office tool that supports VBA (e.g., Excel) to extract the ride data from Peloton, format it into a FIT file, and upload the result to Garmin Connect.

Note: This does NOT work on Apple machines right now, even with Microsoft 365 installed.

Second-by-second power, cadence, speed, and resistance recorded by Peloton are sent to Garmin Connect, along with distance values. If you've paired a heart rate monitor to the Peloton bike during the ride, second-by-second pulse is uploaded and viewable with the other data within Garmin Connect. While resistance settings are included, it isn't obvious where Garmin displays or otherwise uses them.

A major distinguishing feature of this implementation is that the distance/time of your Peloton rides will count toward Garmin badges and challenges while bringing all the power/cadence data into Garmin at the same time. Peloton rides recorded on your Garmin watch and synched to Garmin would have heart rate data and elapsed time and can be edited after-the-fact for a total distance applicable to a Garmin challenge, but those activities won't have any power/cadence data. Conversely, activities uploaded through the Strava workaround and other alternatives will likely have power, cadence, distance, and time [and possibly heart rate], but the distance or time won't count toward Garmin challenges. This solution ticks all those boxes.

Recording Peloton rides on your Garmin watch becomes largely optional and superfluous, especially if Peloton is capturing heart rate. Garmin metrics like respiration, "Performance Condition", and "Stamina" that might be captured by the watch during cycling activities are lost, as there isn't a [simple] way to merge them with the Peloton data. Investigation of possible solutions has begun - stay tuned.

There are other ways to get Peloton data into Garmin Connect. A Python implementation by philosowaffle is mentioned by name in a major Peloton group within Garmin Connect but looking at the rides of group members suggests the tool isn't often used. It is reportedly a solid implementation; I'm just not a Python enthusiast. As mentioned above, such implementations are unlikely to produce activities that 'count' toward Garmin Connect challenges and badges, which was a major motivation for working to solve this problem.

One-time Setup

  1. Download an existing activity from Garmin to which we refer in step #3d:

    1. Right-click and open this link in a new tab: All Activities [login to Garmin Connect as necessary]
    2. Click on the title of any activity of any type that was recorded by your watch [i.e. not a manually-entered activity]
    3. Click the gear icon in the upper right and select 'Export Original'
    4. With Windows Explorer, navigate to the folder containing the downloaded ZIP file
      [commonly C:\Users\<you>\Downloads]
    5. Open the ZIP file, revealing the FIT file within
    6. Right-click the FIT file and select COPY
    7. Navigate back to the downloads folder (where the ZIP exists) and PASTE the FIT file
    8. The ZIP file is no longer needed and may be deleted
    9. Leave this Windows Explorer open - we're going to use it again in the next step
    While you can download the individual .BAS files and import them into an Excel workbook or Access database of your own creation, the below setup instructions are based on use of this project's downloadable Excel .XLSM file. The Discussions area identifies the steps to roll-your-own Excel workbook from these .BAS files.
  1. Download the Excel .XLSM file containing the VBA code:

    1. Clicking here will download the file but is not normally expected to open the workbook nor run the VBA code
    2. With Windows Explorer, navigate to the folder containing the downloaded file [the FIT file we downloaded should be there too]
    3. Cut or Copy the file and the Paste it into a more convenient personal folder of your choosing such as
      C:\Users\<you>\Documents
    4. With Windows Explorer navigated to the folder where you chose to store the Excel XLSM file, right click on the file and select 'Properties'
    5. Near the bottom of the popup window, click the checkbox titled 'Unblock'. Then click the OK button
    6. Leave this Windows Explorer open and in this folder - we're going to use it again in the next step
  2. Obtain values we need from the FIT file we downloaded using the Excel workbook:

    1. From Windows Explorer, double-click the Excel XLSM file
      For Excel's first start on this file, macros (i.e. VBA) will be disabled
    2. Click 'Enable Content' to allow the VBA code to execute
    3. Click the Button on the Excel worksheet labeled 'Get my watch identity from an existing FIT file'
    4. In the file chooser dialog, navigate to the 'Downloads' folder and select the FIT file downloaded in Step #1g
    5. Note of the product code and ID values that are displayed for use in Step #4c
    6. Save and Exit Excel [you are not yet setup to run the actual Peloton macro code]
  3. Create Windows environment variables required by the VBA code to process Peloton/Garmin data:

    1. Run regedit [Allow it to make changes to your device]
    2. Navigate to Computer\HKEY_CURRENT_USER\Environment
    3. Add the following six values as STRING variables:
         * PELOTON_USER = <your Peloton User Id, normally an email address>
         * PELOTON_KEY = <your Peloton password>
         * GARMIN_USER = <your Garmin User Id, normally an email address>
         * GARMIN_KEY = <your Garmin password>
         * GARMIN_DEVICE_ID_NUM = <your watch's ID number, collected above>
         * GARMIN_DEVICE_MODEL_NUM = <your watch's MODEL code, collected above>
  4. Logout and back in so subsequent Excel runs 'see' the above environment variables:

    1. Press Ctrl-Alt-Del and select logout
    2. Log back in

This completes the one-time setup. Future changes to your Peloton or Garmin passwords or use of a different Garmin watch will of course require you to use Windows regedit to modify the values you just established.

Performing a conversion and Garmin upload

With the Excel workbook open, operation is as simple as clicking the button on the P2G sheet. Every minute of Peloton riding will take about two seconds to process, but a slow or unstable network connection will make it take longer. Typically, each Peloton ride should take about three minutes to convert and upload into Garmin.

If you embedded the VBA logic into your own Excel workbook or into Access, you might not have a specific pushbutton in the workbook, but you can invoke the macro like any other by pressing Alt-F8 and then running the macro named ConvertPelotonRideToGarminActivity. Sophisticated users may have assigned a keyboard shortcut to invoke the macro directly or may even run the macro automatically through the Workbook_Open() event handler.

Additional Information

I intend to try to keep the majority of supporting information in the (Discussions area of this Github repository. If you stumble during setup, or encounter something that doesn't look right, check to see if anyone else has opened a discussion on that subject. Absent that, feel free to open a new topic where we can exchange views on potential causes and viable approaches.