garmin-connect
Garmin Connect integration for Clawdbot: sync fitness data (steps, HR, calories, workouts, sleep) every 5 minutes using OAuth.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- garmin-connect
- description
- Garmin Connect integration for Clawdbot: sync fitness data (steps, HR, calories, workouts, sleep) every 5 minutes using OAuth.
02 资源文件 9
- 参考文档_meta.json295 B
- 参考文档README.md3.5 KB
- 参考文档requirements.txt62 B
- 脚本scripts/garmin-auth-oauth.py2.0 KB
- 脚本scripts/garmin-auth.py1.5 KB
- 脚本scripts/garmin-cron.sh434 B
- 脚本scripts/garmin-formatter.py3.0 KB
- 脚本scripts/garmin-sync-oauth.py4.3 KB
- 脚本scripts/garmin-sync.py5.4 KB
03 SKILL.md 正文
Garmin Connect Skill
Sync all your Garmin fitness data to Clawdbot:
- ? Daily Activity: Steps, heart rate, calories, active minutes, distance
- ? Sleep: Duration, quality, deep/REM/light sleep breakdown
- ?️ Workouts: Recent activities with distance, duration, calories, heart rate
- ⏱️ Real-time sync: Every 5 minutes via cron
Quick Start
1. Install Dependencies
pip install -r requirements.txt
2. OAuth Authentication (One-time)
python3 scripts/garmin-auth.py your-email@gmail.com your-password
This saves your OAuth session to ~/.garth/session.json — fully local and secure.
3. Test Sync
python3 scripts/garmin-sync.py
You should see JSON output with today's stats.
4. Set Up 5-Minute Cron
Add to your crontab:
*/5 * * * * /home/user/garmin-connect-clawdbot/scripts/garmin-cron.sh
Or manually:
*/5 * * * * python3 /home/user/garmin-connect-clawdbot/scripts/garmin-sync.py ~/.clawdbot/.garmin-cache.json
5. Use in Clawdbot
Import and use in your scripts:
from scripts.garmin_formatter import format_all, get_as_dict
# Get all formatted data
print(format_all())
# Or get raw dict
data = get_as_dict()
print(f"Steps today: {data['summary']['steps']}")
Features
✅ OAuth-based (secure, no password storage) ✅ All metrics: activity, sleep, workouts ✅ Local caching (fast access) ✅ Cron-friendly (5-minute intervals) ✅ Easy Clawdbot integration ✅ Multi-user support
Data Captured
Daily Activity (summary)
steps: Daily step countheart_rate_resting: Resting heart rate (bpm)calories: Total calories burnedactive_minutes: Intensity minutesdistance_km: Distance traveled
Sleep (sleep)
duration_hours: Total sleep timeduration_minutes: Sleep in minutesquality_percent: Sleep quality score (0-100)deep_sleep_hours: Deep sleep durationrem_sleep_hours: REM sleep durationlight_sleep_hours: Light sleep durationawake_minutes: Time awake during sleep
Workouts (workouts)
For each recent workout:
type: Activity type (Running, Cycling, etc.)name: Activity namedistance_km: Distance traveledduration_minutes: Duration of activitycalories: Calories burnedheart_rate_avg: Average heart rateheart_rate_max: Max heart rate
Cache Location
By default, data is cached at: ~/.clawdbot/.garmin-cache.json
Customize with:
python3 scripts/garmin-sync.py /custom/path/cache.json
Files
| File | Purpose |
|---|---|
garmin-auth.py |
OAuth setup (run once) |
garmin-sync.py |
Main sync logic (run every 5 min) |
garmin-formatter.py |
Format data for display |
garmin-cron.sh |
Cron wrapper script |
requirements.txt |
Python dependencies |
Troubleshooting
OAuth authentication fails
- Check email/password
- Disable 2FA on Garmin account (or use app password)
- Garmin servers might be rate-limiting — wait 5 minutes
No data appears
- Sync your Garmin device with the Garmin Connect app
- Wait 2-3 minutes for data to sync
- Check that data appears in Garmin Connect web/app
- Then run
garmin-sync.pyagain
Permission denied on cron
chmod +x scripts/garmin-cron.sh
chmod +x scripts/garmin-sync.py
chmod +x scripts/garmin-auth.py
Cache file not found
Run garmin-sync.py at least once to create cache:
python3 scripts/garmin-sync.py
Usage Examples
from scripts.garmin_formatter import format_all, get_as_dict
# Get formatted output
print(format_all())
# Get raw data
data = get_as_dict()
if data:
print(f"Sleep: {data['sleep']['duration_hours']}h")
print(f"Steps: {data['summary']['steps']:,}")
License
MIT — Use, fork, modify freely.
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.