Skip to content

Rewrite Withings to Garmin sync for Docker - #1

Merged
cheungr merged 1 commit into
masterfrom
cheungr-withings-garmin-docker-rewrite
Oct 4, 2026
Merged

cheungr merged 1 commit into
masterfrom
cheungr-withings-garmin-docker-rewrite

Conversation

@cheungr

@cheungr cheungr commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Summary

Replace the legacy multi-destination Python CLI with a focused Withings weight/body-composition sync to Garmin Connect, deployed as a non-root Docker Compose service.

Before

  • Large argparse application combined Garmin, TrainerRoad, blood pressure, FIT/JSON export, and Kubernetes/cron deployment surfaces.
  • Withings auth required fast manual code pasting, had weak token persistence, and lacked concurrency protection.
  • Garmin depended on garth without an interactive MFA path or reliable refreshed-token persistence.

After

  • Python 3.12 slim image, Compose scheduler, one ./data volume, configurable UID/GID, healthcheck, and short Ubuntu quickstart.
  • garminconnect 0.3.17 with interactive MFA / --mfa-code; Garmin passwords are not persisted and account tokens are saved and refreshed.
  • Withings OAuth accepts a code or redirect URL, persists rotated tokens atomically, and sync/state operations use a cross-process lock.
  • auth, sync --once, sync --since, and status CLI commands; per-measurement dedup state and UTC FIT body-composition records.
  • Remove TrainerRoad, blood pressure, legacy config paths, bundled Withings app credentials, Kubernetes manifests, and the old callback page.
  • Add mocked unit tests and CI for tests/Compose build; preserve version-tagged PyPI publishing with a pip/setuptools build.

Validation

  • pytest: 10 passed
  • docker compose build
  • Container --help and status commands

Replace legacy multi-target sync with a focused, persistent Docker Compose service and first-class Garmin MFA.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@cheungr
cheungr merged commit 7bca5c7 into master Oct 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant