garmin-connect
Garmin Connect integration for Clawdbot: sync fitness data (steps, HR, calories, workouts, sleep) every 5 minutes using OAuth.
Why use this skill?
Sync Garmin steps, heart rate, sleep, and workouts to Clawdbot every 5 minutes. Secure OAuth integration for automated fitness tracking and analysis.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/rayleigh3105/garmin-connectWhat This Skill Does
The Garmin Connect skill seamlessly integrates your Garmin fitness data with Clawdbot, providing a centralized hub for all your health and activity metrics. It automatically synchronizes a comprehensive range of data, including daily steps, heart rate, calories burned, active minutes, and distance. Additionally, it captures detailed sleep patterns, such as duration, quality, and breakdowns of deep, REM, and light sleep stages, as well as time spent awake. The skill also logs recent workouts, detailing activity type, duration, distance, calories, and heart rate data. This synchronization occurs automatically every 5 minutes, ensuring you always have the most up-to-date information available within Clawdbot. The integration utilizes OAuth for secure, password-free authentication, with all sensitive data stored locally.
Installation
1. Install Dependencies: Begin by cloning the repository and installing the necessary Python packages:
pip install -r requirements.txt
2. OAuth Authentication:
Perform a one-time OAuth setup to authorize Clawdbot's access to your Garmin Connect data. Replace [email protected] and your-password with your actual Garmin Connect credentials:
python3 scripts/garmin-auth.py [email protected] your-password
This process securely saves your OAuth session locally to ~/.garth/session.json without storing your password.
3. Test Data Sync: Verify the integration by manually syncing your data:
python3 scripts/garmin-sync.py
This command should output today's Garmin Connect statistics in JSON format.
4. Automate 5-Minute Sync:
To ensure continuous data flow, set up a cron job to run the sync script every 5 minutes. Add the following line to your crontab (crontab -e):
*/5 * * * * python3 /path/to/garmin-connect-clawdbot/scripts/garmin-sync.py ~/.clawdbot/.garmin-cache.json
(Ensure you replace /path/to/garmin-connect-clawdbot/ with the actual path to your skill's directory.)
5. Integrate with Clawdbot: Once installed and configured, you can import and use the data within your Clawdbot scripts:
from scripts.garmin_formatter import format_all, get_as_dict
# Get all formatted data
print(format_all())
# Or get raw dict and access specific metrics
data = get_as_dict()
print(f"Steps today: {data['summary']['steps']}")
Use Cases
- Personal Health Monitoring: Track your daily activity, sleep quality, and workout performance over time to identify trends and areas for improvement.
- Fitness Coaching: Provide clients with objective data on their activity levels and recovery, enabling more personalized training plans.
- Data Aggregation: Combine Garmin data with other sources within Clawdbot for a holistic view of your well-being.
- Automated Reporting: Generate regular summaries of fitness achievements and sleep patterns without manual data entry.
Example Prompts
- "Show me my Garmin stats for today."
- "How well did I sleep last night according to Garmin?"
- "Log my recent Garmin workout in my training journal."
Tips & Limitations
- Local Cache: Data is cached locally at
~/.clawdbot/.garmin-cache.jsonfor quick access. You can specify a different cache path if needed. - OAuth Security: The skill uses OAuth, meaning your Garmin password is never stored or transmitted by the skill.
- Data Granularity: While the skill syncs detailed sleep and workout data, the exact fields available depend on what Garmin Connect provides.
- Error Handling: Ensure your cron job is set up correctly and that network connectivity is stable for continuous syncing. Refer to the
Troubleshootingsection in the original documentation for common issues. - Multi-User: The skill supports multi-user setups, though initial setup and cron configuration might require attention for each user profile.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-rayleigh3105-garmin-connect": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-write, file-read, external-api, code-execution