Skip to main content

A terminal-based cycling metrics visualization tool

Project description

peloterm

A beautiful cycling metrics visualization tool that displays your real-time:

  • Power ⚡
  • Speed 🚴
  • Cadence 🔄
  • Heart Rate 💓

Features

  • Real-time BLE sensor connection with concurrent device scanning
  • Modern web-based UI with configurable video integration (YouTube by default)
  • Support for multiple sensor types
  • Easy-to-use command line interface
  • Automatic device reconnection if connection is lost
  • Smart listening mode that waits for you to turn on devices - no more timing issues!
  • Automatic ride recording with FIT file generation
  • Interactive Strava upload during shutdown

Installation

pip install peloterm

Usage

First, scan for available Bluetooth sensors in your area:

peloterm scan

This will show all available BLE devices and help you set up your configuration file with the correct sensor IDs.

Starting Your Session

peloterm start

Perfect for devices that auto-sleep quickly! By default, peloterm now uses smart listening mode:

  • Shows you which devices it's waiting for
  • Lets you turn on your devices when you're ready
  • Connects to all devices concurrently as they become available
  • Automatically starts monitoring once all devices are connected
  • Records your ride data automatically

Example workflow:

  1. Run peloterm start
  2. See the list of devices it's waiting for
  3. Turn on your heart rate monitor, cadence sensor, and trainer
  4. Watch as each device connects in real-time
  5. Start your workout once all devices are connected!
  6. Press Ctrl+C when done - you'll be prompted to save and upload your ride

Recording and Strava Integration

When you stop Peloterm (Ctrl+C), you'll be prompted with:

  1. 💾 Save this ride as a FIT file? - Save your ride data
  2. 📝 Enter a name for your ride - Optional custom name
  3. 🚴 Upload this ride to Strava? - Direct upload to Strava
  4. Activity details - Name and description for Strava

If Strava isn't set up yet, you'll be guided through the setup process automatically.

Strava Setup (Optional)

To set up Strava integration ahead of time:

peloterm strava setup

This will guide you through:

  1. Creating a Strava API application
  2. Authorizing Peloterm to upload activities
  3. Storing your credentials securely

Other Strava Commands

# Test your Strava connection
peloterm strava test

# List all recorded rides
peloterm strava list

# Upload a specific ride file
peloterm strava upload ride_file.fit --name "Epic Mountain Climb"

Command Options

The start command supports these options:

  • --config PATH - Use a specific configuration file
  • --timeout 60 - Set connection timeout in seconds (default: 60)
  • --debug - Enable debug output
  • --web/--no-web - Enable/disable web UI (default: enabled)
  • --port 8000 - Set web server port
  • --duration 30 - Set target ride duration in minutes
  • --no-recording - Disable automatic ride recording

Examples:

# Standard ride with recording
peloterm start

# Disable recording (monitoring only)
peloterm start --no-recording

# Use debug mode to troubleshoot connections
peloterm start --debug

# Listen for devices with 2-minute timeout
peloterm start --timeout 120

File Formats

When recording rides, Peloterm generates FIT files which are:

  • Compact: Binary format, much smaller than TCX/GPX
  • Complete: Supports all cycling metrics (power, cadence, heart rate, speed)
  • Compatible: Native format for Garmin devices and widely supported
  • Strava-optimized: Best format for uploading to Strava

FIT files are saved to ~/.peloterm/rides/ and can be uploaded to Strava or imported into other cycling apps.

Development

To set up the development environment:

# Clone the repository
git clone https://github.com/yourusername/peloterm.git
cd peloterm

# Create a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -e ".[dev]"

Running Tests

To run the test suite:

pytest

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

peloterm-0.1.0.tar.gz (59.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

peloterm-0.1.0-py3-none-any.whl (59.4 kB view details)

Uploaded Python 3

File details

Details for the file peloterm-0.1.0.tar.gz.

File metadata

  • Download URL: peloterm-0.1.0.tar.gz
  • Upload date:
  • Size: 59.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for peloterm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bdad2c359584305b5172f141ef88630ea6221e34fadaf8f66cb5175e2b9053f9
MD5 6400460eb69b803b929a2014269fdc0f
BLAKE2b-256 dad6408377ecede2e258bdb29bd550bf8e8fdc135c1432c970ea2316972f74f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for peloterm-0.1.0.tar.gz:

Publisher: publish.yml on amarder/peloterm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file peloterm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: peloterm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 59.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for peloterm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0c66efec6a4516cc93ccf41efcaa76ec70106b89e2c7accc78ec9c9287813b0
MD5 b7eacdd192eea8dd7fc6175fbb39e000
BLAKE2b-256 78e4247693134c02a3da3950840bad6cdf418bd7eef94615e876201c6887c68b

See more details on using hashes here.

Provenance

The following attestation bundles were made for peloterm-0.1.0-py3-none-any.whl:

Publisher: publish.yml on amarder/peloterm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page