Add experimental Zwift weight sync - #69
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Zwift previously reported successful updates without saving the new weight. This adds an optional experimental target that reads the current profile, saves through the website profile route, and verifies the saved weight before recording delivery. An already-matching weight is a verified no-op.
--setup-zwiftsupports existing installs and a fresh Zwift-only setup, retains credentials in the existing vault, and checks profile access before enabling sync. Tokens renew automatically; status, doctor, reauthentication, and disconnection include Zwift.--targetlimits a run to one configured destination.Only the newest valid, freshly fetched reading for the selected Eufy profile reaches Zwift or Strava. Backfill cannot replace a newer recorded weight, and saved Garmin recovery data stays separate, including when its ID matches a fresh reading. Zwift failures leave other targets running. Credential-changing commands share the sync lock. Recovery notifications direct users to the failing target instead of always reopening Garmin login.
Validation: 486 tests passed on macOS, Windows, and Linux with Python 3.12, 3.13, and 3.14. Ruff and distribution builds passed. A real-account controlled weight change and restoration passed fresh and refreshed-session reads. The production client then verified cached-session reuse, token refresh, and a first Zwift-only sync without another weight write. Actual token expiry and long-term behavior across accounts remain unproven; the target stays experimental. Version: 1.13.0.