{"repo":"arpanghosh8453/garmin-grafana","free":true,"listed":false,"github":"https://github.com/arpanghosh8453/garmin-grafana","clone":"git clone https://github.com/arpanghosh8453/garmin-grafana.git","description":"A Dockerized python Script to fetch Garmin health data and populate that in a InfluxDB Database, for visualization long term health trends with Grafana","language":"Python","stars":3405,"topics":["database","garmin","garmin-api","garmin-connect","garmin-data","garmin-smartwatches","grafana","grafana-dashboard","grafana-influxdb","influxdb","python","python3"],"license":"BSD-3-Clause","category":"health_data_visualization","readme_excerpt":"<p align=\"center\">\n<img src=\"https://i.imgur.com/PYsbwqj.png\" width=\"450\" height=\"164\" align=\"center\">\n</p>\n\n# Grafana for Garmin Dashboard\n\nA docker container to fetch data from Garmin servers and store the data in a local influxdb database for appealing visualization with Grafana.\n\n> [!IMPORTANT]\n> Garmin is a registered trademark of Garmin Ltd. or its subsidiaries. Grafana is a registered trademark of Grafana Labs. This project is an independent, open-source tool and is not affiliated with, endorsed by, sponsored by, or approved by Garmin Ltd. or Grafana Labs.\n\n> [!NOTE]\n> This project repository is dynamically mirrored in [Codeberg](https://codeberg.org/arpanghosh8453/garmin-grafana) as a backup. An alternative docker image is available at [codeberg.org/arpanghosh8453/garmin-grafana](https://codeberg.org/arpanghosh8453/-/packages/container/garmin-grafana).\n\n> [!TIP]\n> If you are a **Fitbit user**, please check out the [sister project](https://github.com/arpanghosh8453/fitbit-grafana) made for Fitbit\n\n## Table of contents\n\n- [Dashboard Example](#dashboard-example)\n- [Features](#features)\n- [Why use this project?](#why-use-this-project)\n- **Installation**\n  - EASY : [Automated installation](#automatic-install-with-helper-script-recommended-for-less-techy-people) with helper script\n  - ADVANCED : [Manual step by step installation](#manual-install-with-docker-recommended-if-you-understand-linux-concepts) guide\n  - SYNOLOGY : [Installation Guide](https://github.com/arpanghosh8453/garmin-grafana/discussions/107#discussion-8326104)\n  - KUBERNETES : [Helm](./k8s/README.md) chart for Kubernetes. Try with minikube - [Makefile](./k8s/Makefile) for easy deployment.\n- **How to**\n  - How to [pull historic (old) data](#historical-data-fetching-bulk-update) (bulk update)?\n  - How to [import from garmin connect local export files](#importing-from-garmin-connect-export)?\n  - How to [update to newer versions](#update-to-new-versions) of this project?\n  - How to [export data as CSV files](#export-data-to-csv-files) for AI insights?\n  - How to [backup the InfluxDB Database?](#backup-influxdb-database)\n  - How to use [multiple accounts](#multi-user-instance-setup)? - if you want to set up a dashboard for your spouse\n  - [Troubleshooting](#troubleshooting) Guide\n  - [Need Help?](#need-help)\n  - [Want a Desktop App?](#want-a-desktop-app)\n- Project supplement\n  - [Credits](#credits)\n  - [Dependencies](#dependencies)\n  - [Contribution Guideline](#contribution-guideline)\n  - [Limitations](#limitations)\n- [Support this project](#love-this-project)\n- [Star History](#star-history)\n\n## Dashboard Example\n\n![Dashboard](https://github.com/arpanghosh8453/garmin-grafana/blob/main/Grafana_Dashboard/Garmin-Grafana-Dashboard-Preview.png?raw=true)\n\n### Strength Training Dashboard\n\nA separate dashboard for weightlifting, built on the `StrengthExerciseSet` and `StrengthHRZones`\nmeasurements. It covers estimated 1RM progression per exercise, training volume, personal records,\nexercise balance, a set-level workout log, and HR zone time during strength sessions.\n\n![Strength Training Dashboard](https://github.com/arpanghosh8453/garmin-grafana/blob/main/Grafana_Dashboard/Garmin-Strength-Training-Dashboard-Preview.png?raw=true)\n\n## Features\n\n- Automatic data collection from Garmin\n- Collects comprehensive health metrics including:\n  - Heart Rate Data\n  - Hourly steps Heatmap\n  - Daily Step Count\n  - Sleep Data and patterns (SpO2, Breathing rate, Sleep movements, HRV)\n  - Sleep regularity heatmap (Visualize sleep routine)\n  - Stress Data\n  - Body Battery data\n  - Calories\n  - Sleep Score\n  - Activity Minutes and HR zones\n  - Activity Timeline (workouts)\n  - GPS data from workouts (track, pace, altitude, HR)\n  - And more...\n- Automated data fetching in regular interval (set and forget)\n- Historical data backfilling\n\n## Why use this project?\n\n- **Free and Fully Open Source**: 100% transparent and open project — modify, distribute extend, and self-host as you wish, with no hidden costs. Just credit the author and support this project as you please!\n- **Local Ownership**: Keep a complete, private backup of your Garmin data. The script automatically syncs new data after each Garmin Connect upload — no manual action needed (\"set and forget\").\n- **Full Visualization Freedom**: You're not limited by Garmin’s app. Combine multiple metrics on a single panel, zoom into specific time windows, view raw (non-averaged) data over days or weeks, and build fully custom dashboards.\n- **Deeper Insights - All day metrics**: Explore your data to discover patterns, optimize performance, and track trends over longer periods of time. Export for advanced analysis (Python, Excel, etc.) from Grafana, set custom alerts, or create new personalized metrics. This project fetches _almost_ everything from your Garmin watch - not just limited to Activities analytics like most other online platforms\n- **No 3rd party data sharing**: You avoid sharing your sensitive health related data with any 3rd party service provider while having a great data visualization platform for free!\n\n## Automatic Install with helper script (Recommended For less techy people)\n\n> [!IMPORTANT]\n> This script is for initial setup only. if you already have used it or followed the manual setup to deploy this project, you should not run this again once the garminconnect OAuth tokens are saved (first successful data fetch). Please check the `update to new versions` section for upgrading the container(s).\n\n> [!TIP]\n> If you are getting some errors you can't figure out, give the almighty [ChatGPT](https://chat.openai.com/) a try, it's often known to be helpful troubleshooting issues with this project and script.\n\nThis script requires a linux environment. If Docker is not installed on your Linux/MacOS system, follow the instructions to [install docker manually](https://docs.docker.com/engine/install/) on Linux. There is also an [automated docker installation script](https://github.com/docker/docker-install) available using the one-liner command `curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh`.\n\nIf you are on `Windows` you should consider using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) to get a linux sub-system up and running.\n\n#### Detailed steps for Windows users are as follows:\n\n- [Install docker desktop](https://docs.docker.com/get-started/introduction/get-docker-desktop/)\n- Install `WSL` and `Ubuntu` from the Microsoft Store\n- Start -> Run -> type `WSL.exe`, Follow the prompts to create your Linux sudo (admin) user and password. This password will be required for later steps.\n- Open docker desktop and agree to the EULA\n- Reboot your machine (important)\n- Once back up, WSL and Docker should be installed and linked together.\n- Start -> Run -> type `WSL.exe`, then run the below bash command in the terminal window.\n\nFor Linux or MacOS, simply run the following bash command from your linux command line (terminal).\n\n> [!NOTE]\n> If you get the error that `git : command not found` then you need to install `git` with the command `sudo apt install git` for Ubuntu/Debian/WSL(windows) based systems. For Mac, you need to use `brew install git`. If you are on a non-debian linux distribution, please use your OS specific package manager replacing `apt`.\n\nUse the following command to clone this repository to your local machine\n\n```bash\ncd ~ && git clone https://github.com/arpanghosh8453/garmin-grafana.git garmin-grafana\n```\n\nUse the command next to install it automatically using the easy-install script. If it fails because docker was not installed, retry the command again after installing docker.\n\n```bash\ncd garmin-grafana && sudo bash ./easy-install.sh\n```\n\nEnter the Garmin Connect credentials when prompted and you should be all up and running (you will be prompted for 2FA code as well if you have that set up). Once the data keeps coming, you can check out the `http://localhost:3000` to reach Grafana (by default), do the initial setup with the default username `admin` and password `admin`. Check out the dashboards link on the left sidebar. you should have a dashboard auto-configured as `Garmin-Stats` under the dashboards section. There you should see the data added. It will **keep updating automatically** as soon as new data syncs with your Garmin Connect account.\n\n> [!NOTE]\n> When you run this for the first time, it will only automatically fetch the data for **last 7 days** only and keep pulling new data that syncs with Garmin Connect moving forward. if you want to sync your older data, that is super easy to do. You just need to run the following command in the terminal (`WSL` for windows) replacing the YYYY-MM-DD with appropriate start and end dates (MANUAL_START_DATE value must be older than MANUAL_END_DATE value)\n>\n> ```bash\n> cd ~/garmin-grafana && docker compose run --rm -e MANUAL_START_DATE=YYYY-MM-DD -e MANUAL_END_DATE=YYYY-MM-DD garmin-fetch-data\n> ```\n\nThat should be everything you need for now! The script will be running in the background as long as your machine is up. After a restart, make sure to open docker desktop if you are on windows (if it does not start automatically) so that the containers get booted up as well. For Linux, everything should restart reliably after a reboot. If you are having issues, make sure the docker daemon is running and check the container status with `docker ps` command\n\n## Manual Install with Docker (Recommended if you understand linux concepts)\n\n> [!IMPORTANT]\n> Install docker if you don't have it already. Docker is supported in all major platforms/OS. Please check the [docker installation guide](https://docs.docker.com/engine/install/). You can install it on Windows via WSL, on Unraid via Docker Compose plugin, on Proxmox via Docker-LXC, and natively on Linux and Mac.\n\n1. Clone this repository with the command `git clone https://github.com/arpanghosh8453/garmin-grafana.git`. Change your working directory with `cd garmin-grafana`. Then create a fold","default_branch":"main","files":43,"tree":[".github/CONTRIBUTING.md",".github/FUNDING.yml",".github/ISSUE_TEMPLATE/bug_report.md",".github/ISSUE_TEMPLATE/feature_request.md",".github/workflows/codeberg-sync.yml",".github/workflows/prod.push.yml",".github/workflows/version.release.yml",".gitignore",".python-version",".woodpecker/docker.yml","Dockerfile","Extra/Garmin-Grafana-Logo.svg","Extra/garmin-fetch.ipynb","Grafana_Dashboard/Garmin-Grafana-Dashboard-Preview.png","Grafana_Dashboard/Garmin-Grafana-Dashboard.json","Grafana_Dashboard/Garmin-Grafana-Dashboard.yaml","Grafana_Dashboard/Garmin-Strength-Training-Dashboard-Preview.png","Grafana_Dashboard/Garmin-Strength-Training-Dashboard.json","Grafana_Datasource/influxdb.yaml","LICENSE","README.md","compose-example.yml","docs/manual-import-instructions.md","easy-install.sh","k8s/Chart.yaml","k8s/Makefile","k8s/README.md","k8s/templates/_helpers.tpl","k8s/templates/example-secret.yaml","k8s/templates/garmin-deployment.yaml","k8s/templates/influxdb-deployment.yaml","k8s/templates/influxdb-pvc.yaml","k8s/templates/influxdb-service.yaml","k8s/templates/tokens-pvc.yaml","k8s/values.yaml","kubernetes-spec-example.yaml","pyproject.toml","src/garmin_grafana/__init__.py","src/garmin_grafana/fit_activity_importer.py","src/garmin_grafana/garmin_bulk_importer.py","src/garmin_grafana/garmin_fetch.py","src/garmin_grafana/influxdb_exporter.py","uv.lock"],"storefront":"/r/arpanghosh8453","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/arpanghosh8453/garmin-grafana/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}