Releases: nrvim/garmin-givemydata
Releases · nrvim/garmin-givemydata
v0.1.9
Browser Engine: Camoufox → SeleniumBase UC Chrome
The browser engine has been completely replaced. Camoufox (Firefox) and Playwright are gone — replaced with SeleniumBase UC mode (undetected Chrome).
Why: Camoufox caused three separate issues:
- Session rot over SSH (#11) — Firefox doesn't emit
Sec-CH-UA-*client hints, making sessions look suspicious to Garmin's device tracker. Chrome emits these natively. - FIT downloads returning 0 files (#18) — Camoufox's
fetch()couldn't complete binary downloads. Users confirmed--chromefixed it. - Windows required
--chromeflag (#15) — Camoufox didn't work on Windows at all.
What's new
- Single engine: Chrome via SeleniumBase UC mode — Cloudflare bypass, stable sessions, FIT downloads work
- Process lifecycle signal handlers — SSH disconnect (SIGHUP) now triggers clean browser shutdown instead of crashing mid-write, preventing profile corruption
- CSRF token refresh — 30-minute TTL instead of caching forever (stale CSRF caused silent 403s)
- Clean-exit sentinel — detects unclean shutdown on next launch, auto-recovers
- Xvfb at 1920x1080 for headless Linux (was 1280x1024)
- f-string JS injection fix — FIT download URLs are now passed as safe parameters instead of interpolated into JavaScript
Breaking Changes
--chromeflag removed (Chrome is now the only engine — flag silently ignored for backwards compat)- Dependency changed:
playwright+camoufox→seleniumbase - No more
playwright install chromiumstep — SeleniumBase auto-downloads chromedriver - Google Chrome must be installed on the system
Migration
Delete old browser profile and re-login (one time):
# Git clone
pip install -e .
rm -rf browser_profile/ garmin_session.json
# pip
pip install --upgrade garmin-givemydata
rm -rf ~/.garmin-givemydata/browser_profile ~/.garmin-givemydata/garmin_session.json
# Homebrew
brew upgrade garmin-givemydata
rm -rf ~/.garmin-givemydata/browser_profile ~/.garmin-givemydata/garmin_session.jsonv0.1.8
What's New
MCP Server: 6 → 44 tools
- Training & Performance: CTL/ATL/TSB training load, post-workout recovery signatures, side-by-side period comparison — metrics no other Garmin MCP offers
- Health Metrics: Dedicated tools for HR, HRV, sleep, stress, body battery, SpO2, steps, floors, calories, respiration, intensity minutes, hydration, blood pressure — each enriched with trend analysis, anomaly detection, and clinical threshold flags
- Daily Overview: Today's snapshot, weekly summary with goal tracking
- Profile & Devices: User profile, devices, gear, badges, workouts, goals, challenges, health snapshots, HR zones, activity types
- Sync:
garmin_syncnow shows last sync time before syncing, withrefresh=Falsefor status-only checks
Security Hardening
garmin_queryuses SQLite read-only mode (?mode=ro) — writes, ATTACH, and schema changes are impossible at the engine level- Query result limit clamped (1–10,000 rows) to prevent memory exhaustion
- Table identifiers quoted in
garmin_schemato prevent injection - Sync lock prevents concurrent browser instances
- Sync timeout enforced with proper executor shutdown
- Sanitized error messages (no internal paths leaked)
Bug Fixes
- Fix weight date storage (#13): Weight entries from Garmin Index Scale were stored with raw Unix timestamps instead of proper dates. Fixed timestamp conversion to handle both milliseconds and seconds formats. Users with existing data should delete
garmin.dband re-sync. - Headless sync:
garmin_syncvia MCP now runs Camoufox headlessly — no browser window, no Playwright async conflicts
README Reorganized
- Quick Start is now the first section
- MCP tools organized by category with collapsible sections
- Accurate MCP config instructions for pip, brew, and git clone installs
v0.1.7
What's new
- Camoufox browser engine — Default browser engine is now Camoufox (anti-detect Firefox). Bypasses Cloudflare bot detection headlessly. No more
--visibleneeded for login. - JSON session cookies — Session cookies saved as portable JSON with ~1 year lifetime. No more constant re-login.
- Chrome fallback — Use
--chromeflag if you prefer Chrome or have issues with Camoufox. - Stale session detection — Automatically detects expired sessions and re-authenticates instead of failing silently.
- Consistent naming — Renamed
browser_profile_stealthtobrowser_profileeverywhere.
Upgrading
# pip
pip install --upgrade garmin-givemydata
# Homebrew
brew upgrade garmin-givemydata
# git clone
git pull && pip install -r requirements.txtAfter upgrading, delete the old browser profile to start fresh:
rm -rf browser_profile
rm -rf ~/.garmin-givemydata/browser_profileFixes
- Fixes #11 (constantly having to login)