Giter VIP home page Giter VIP logo

peloton-to-garmin's Introduction

peloton-to-garmin

#PelotonToGarmin

Convert workout data from Peloton into a TCX file that can be uploaded to Garmin.

  • Fetch latest workouts from Peloton
  • Convert Peloton workout to TCX file
  • Upload TCX workout to Garmin
  • Maintain Upload History to avoid duplicates in Garmin

Table of Contents

  1. Windows Usage
  2. Linux/MacOs Usage
  3. Docker
  4. Command Line Arguments
  5. Database
  6. Use At Own Risk

Buy Me A Coffee

Windows Setup

Quick Start

  1. Find the latest release here
  2. Download the file peloton-to-garmin-windows.zip
  3. Unzip the folder
  4. Find the file named config.ini, open it with your text editor of choice and modify the Peloton/Garmin settings
  5. Save and close the file
  6. Find the file named peloton-to-garmin.exe, double click to launch the program
  7. You will be prompted to enter how many workouts you would like to fetch
  8. A TCX file for each workout will be created in the Output directory
  9. The resulting TCX file can then be uploaded to Garmin manually, or you can configure the config.ini settings to upload automagically for you

Advanced Setup

  1. Download the repo here
  2. Extract the zip file
  3. Install the latest version of Python 3
  4. Open File Explorer and navigate to the wherever you unzipped the downloaded project
  5. Navigate so that you are inside the peloton-to-garmin folder
  6. Open a command prompt by clicking in the Location Bar at the top and typing cmd then hit enter
  7. From the command prompt run the following command:
    1. pip install -r requirements.txt
  8. Close the command prompt and return to the peloton-to-garmin folder
  9. Edit the config.ini file and set your Peloton Email and Password, Save and Close
    1. Optionally set your Garmin Email and Password if you wish for activities to be uploaded automatically

Advanced Usage

  • Open a command prompt inside of the peloton-to-garmin folder
  • Run the following command:
    • python peloton-to-garmin
  • You will be prompted to enter how many workouts you would like to fetch
  • A TCX file for each workout will be created in the output directory
  • The resulting TCX file can then be uploaded to Garmin

Linux/MacOs

  1. wget https://github.com/philosowaffle/peloton-to-garmin/archive/master.zip
  2. unzip master.zip
  3. Install Python 3
  4. Navigate so that you are inside the peloton-to-garmin folder
  5. From the command prompt run the following command:
    1. pip install -r requirements.txt
    2. In ubuntu 20.04, if you use the python3 in the repo, the command is pip3 install -r requirements.txt
  6. vim config.ini (or nano or whatever. Just not emacs, please :P)
    1. set your Peloton Email and Password, Save and Close

Usage

  • Open a command prompt inside of the peloton-to-garmin folder
  • Run the following command:
    • python3 peloton-to-garmin.py
  • You will be prompted to enter how many workouts you would like to fetch
  • A TCX file for each workout will be created in the output directory
  • The resulting TCX file can then be uploaded to Garmin

Docker

This repository does not directly maintain support for running the code in a docker container, but @Octopusprime83 has created and published a container that can be pulled from docker hub. Note that some of the behavior in the container may differ from the latest code published on github.

  • docker pull philo138/peloton-to-garmin

Command Line Arguments

Usage:
peloton-to-garmin.py [-h] [-email EMAIL] [-password PASSWORD] [-path OUTPUT_DIR] [-num NUM_TO_DOWNLOAD] [-log LOG_FILE]

optional arguments:

  • -h, --help show this help message and exit
  • -email EMAIL Peloton email address
  • -password PASSWORD Peloton password
  • -path OUTPUT_DIR Path to output directory
  • -num NUM_TO_DOWNLOAD Number of activities to download
  • -log LOG_FILE Log file name## Runnning in docker
  • -loglevel LOGLEVEL DEBUG, INFO, ERROR
  • -garmin_email Garmin email address for upload to Garmin
  • -garmin_password Garmin password for upload to Garmin

Examples:

  • To get the last 10 activities:
    * peloton-to-garmin.py -num 10
  • To pass your email and passowrd:
    * peloton-to-garmin.py -email [email protected] -password mypassword

Note: Command line arguments take precedence over values in the configuration file.

Supported Python/OS

The matrix of supported Python versions and OS's can be found here.

Database

Various config and upload history is maintained in a local database.json file. Deleting this file will delete any upload history and the servic will attempt to upload all workouts to Garmin Connect again.

Contributors

Special thanks to all the contributors who have helped improve this project!

Garmin Upload feature is provided by the library: https://github.com/La0/garmin-uploader

Warnings

โš ๏ธ WARNING!!! Your username and password for Peloton and Garmin Connect are stored in clear text, WHICH IS NOT SECURE. If you have concerns about storing your credentials in an unsecure file, do not use this option.

peloton-to-garmin's People

Contributors

actions-user avatar douglasawh avatar jyc66 avatar kdisimone avatar nateeverden avatar philosowaffle avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.