使用 Wahoo Fitness 云 API 获取训练记录、下载 FIT 文件并分析功率、心率、踏频、GPS 数据。
Provides programmatic access to Wahoo Fitness Cloud data. This skill manages OAuth2 authentication, workout synchronization, and FIT file processing.
When a user asks about their Wahoo workouts, training, or fitness data, use these workflows:
User IntentAction / Command**"Sync my Wahoo workouts"python3 {baseDir}/scripts/fetch_workouts.py"Show my recent rides"Query the local SQLite DB: $WAHOO_BASE_DIR/wahoo.db (default: ~/.wahoo/wahoo.db) — schema below"Parse this FIT file"python3 {baseDir}/scripts/parse_fit.py <PATH_TO_FIT>"Connect/Set up Wahoo"**1. Verify WAHOO_CLIENT_ID and WAHOO_CLIENT_SECRET exist.
2. If missing, ask user to provide them.
3. Run python3 {baseDir}/scripts/oauth_setup.py**"Token expired / persistent 401 errors"**Run python3 {baseDir}/scripts/oauth_setup.py to re-authorize. Force-refresh without browser: python3 -c "import sys; sys.path.insert(0,'lib'); import wahoo_auth; wahoo_auth.refresh()"
This skill requires a Wahoo Developer App.
WAHOO_CLIENT_ID and WAHOO_CLIENT_SECRET.scripts/oauth_setup.py. This is an interactive process. You must present the URL to the user, wait for them to authenticate, and then ask them to paste the resulting redirect URL/code back into the terminal.python3 scripts/fetch_workouts.py$WAHOO_BASE_DIR/wahoo.db (default: ~/.wahoo/wahoo.db)Once synced, use the following SQL patterns to answer user questions:
SELECT * FROM workouts ORDER BY starts DESC LIMIT 10;SELECT timestamp, power_w, heart_rate, cadence FROM records WHERE workout_id = <id> ORDER BY timestamp;SELECT timestamp, position_lat_deg, position_long_deg, enhanced_altitude_m FROM records WHERE workout_id = <id>;wahoo_api.py built-in backoff.float() before performing mathematical analysis.m / 1609.34m/s * 2.237/v1/workouts list endpoint returns null for workout_summary. You must call /v1/workouts/<id> to get specific metrics like NP, TSS, or the FIT file URL.HTTP CodeMeaningResolution401Token expired/invalid — auto-refresh runs onceRe-run oauth_setup.py if it keeps failing403Insufficient scopeRe-authorize with missing scope in WAHOO_SCOPES429Rate limitwahoo_api.py backs off automatically, use --limit to reduce call volume404Workout not foundConfirm ID and ownership