HIRO GEAR
ライフ・日常工作 ロードバイク roadbike ローラー台 スマートローラー ズイフト Zwift ROUVY 室内トレーニング サイクリング Raspberry Pi Rust

Complete Your Home Cycling Setup Without Zwift or ROUVY: Building a 'Cycling Monitor' That Automatically Records, Displays on TV, and Analyzes with AI Just by Pedaling

Complete Your Home Cycling Setup Without Zwift or ROUVY: Building a 'Cycling Monitor' That Automatically Records, Displays on TV, and Analyzes with AI Just by Pedaling

Introduction: Eliminating the “Tedious Setup & High Subscription Costs” of Indoor Rollers

Continuing with indoor cycling (rollers) for road bikes often presents surprisingly high hurdles: “the tedium of pre-ride preparation” and “monthly subscription costs.”

  • Turning on the cycle computer, connecting sensors every time you ride, and saving/syncing data after finishing.
  • Signing up for Zwift or ROUVY for a workout boost, but feeling that the fixed monthly cost is too high if you just want to ride for “light health maintenance or fitness building.”

Therefore, I decided to build a dedicated cycling monitor by combining “a PC that is always running at home” with a “Raspberry Pi.” This system automatically starts recording the moment you start pedaling, displays on a large TV screen, and uses AI to analyze your condition and fatigue levels.

In this article, I cover energy-saving hardware integration, my unique algorithm for estimating FTP, VO2max, and fatigue without harsh all-out tests, and future developments allowing use outdoors with just a smartphone.


System Overview: Smart Design That Sleeps Until You Ride

The system uses a home Raspberry Pi as a Bluetooth LE (BLE) sensor relay, aggregating data to a Rust-based server (+ React dashboard) on an always-on Ubuntu workstation.

flowchart LR
    Sensor["Power Meter / Heart Rate Monitor<br>(BLE Sensors)"] -->|Bluetooth LE| RPi["Raspberry Pi<br>(On-demand BLE Relay)"]
    Phone["Smartphone<br>(Web Bluetooth Compatible)"] -->|Direct transmission outdoors| Server["Ubuntu Workstation<br>(Rust + SQLite + WebUI)"]
    RPi -->|Local Transmission| Server
    Server -->|WebSocket Real-time Streaming| TV["Living Room TV<br>(TV Large Screen Mode)"]
    Server -->|Sports Science JSON| LLM["Local GPU AI Coach<br>(Ollama)"]
    Server -->|Weekly Activity Sync| Strava["Strava<br>(Cycling + Walking)"]
    MCP["2-Layer MCP Server"] <-->|Condition & Detailed Data Reference| Server

Obsession 1: Energy-saving design that does not pollute Bluetooth when idle

Continuously scanning for Bluetooth wastes power and radio resources. Therefore, the relay service on the Raspberry Pi side is designed “to stay in standby (polling stopped) until a session starts upon accessing the WebUI,” initiating BLE scanning & relaying only then.

Obsession 2: Automatic start/pause and large TV display just by pedaling

When you pedal and input a certain amount of power, the workout automatically starts; when you stop pedaling, it automatically transitions to pause. Furthermore, a “TV Large Screen Mode” is prepared for casting to the TV, prioritizing visibility with font sizes and color schemes suitable for the living room, turning it directly into a training studio.

Sample of Live Riding Cockpit Screen


Unique Algorithms: Decoding Your Body Without All-Out Tests

The biggest appeal of this system is that “you don’t need to do 20-minute or 5-minute all-out tests every time; physical capacity can be estimated and visualized from daily ride data.” Here are the five techniques incorporated while developing sports science discussions.

1. Submaximal FTP Estimation & Dual VO2max Estimation

FTP (Maximum Power maintainable for 1 hour) and VO2max (Maximum Oxygen Uptake) usually require rigorous all-out tests to get accurate numbers. So, I made it a “two-sword style” capable of handling both daily rides and serious efforts.

  • Daily Automatic Estimation (Submaximal Method): Using the proportional relationship between Heart Rate Reserve %HRR = (Current HR - Resting HR) ÷ (Max HR - Resting HR) and Power (W), we calculate back the output at max heart rate arrival (MAP). We automatically update ACSM metabolic formula VO2max ≒ 10.8 × (MAP ÷ Body Weight kg) + 7.0 and estimated FTP every time.
  • Precision Test Mode Only When Needed: When you say “I want to measure seriously today,” pressing the VO2max Test (5 min) or 10-min FTP Test button on the live screen switches to physically based precise measurements with a countdown.

2. How to Separate Confounding Factors in Cadence Efficiency (From Observational Data to