Port Bodytone GATT machine type detection#70
Open
michaelw wants to merge 20 commits into
Open
Conversation
…nown and reserved values with logging
* mw/kickr-core-v2: Handle repeated disconnect callbacks without _cli errors Implement TrainingStatusFlags and TrainingStatusCode handling for unknown and reserved values with logging Update Python version requirements to support 3.14
* mw/extended-status-strings: Handle extended training status strings
Bump the package version for the production fork release and point project metadata at the fork. This release will be consumed by the forked Home Assistant FTMS integration via a tagged git dependency reference.
Zero-only realtime packets were previously treated as null packets. That dropped legitimate nonzero-to-zero transitions, which could leave Home Assistant sensors stuck on the last nonzero value.\n\nKeep suppressing likely bogus startup zero-only packets until the first nonzero realtime packet is seen, while still emitting real nonzero-to-zero transitions and deduplicating repeated zero packets.
* mw/zero-value-realtime-updates: Preserve real nonzero-to-zero realtime updates
…-connect type detection
…-connect type detection
* mw/uuid-only-ftms-fallback: Expose FTMS advertisement machine type detection feat: Support UUID-only FTMS devices with data-only fallback and post-connect type detection # Conflicts: # src/pyftms/client/__init__.py
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.
Summary
get_machine_type_from_gatt(...)helperBackground
Thanks to #67 for the Bodytone DU30-B1D8 compatibility work and the successful discovery output. This port keeps that GATT data-characteristic detection idea, but layers it on top of the fork's existing UUID-only advertisement fallback and post-connect machine type correction.
Review notes addressed
This version keeps discovery from opening GATT connections inside the advertisement loop, so per-device connection delays and repeated fallback attempts cannot consume the scan window. It also keeps the existing scanner UUID filter behavior and raises a GATT-specific
NotFitnessMachineErrorreason when no supported FTMS data characteristic is present.The
_clidisconnect guard and Python 3.14 support were already present in this fork.Tests
uv run --project repos/python-pyftms ruff check repos/python-pyftms/src repos/python-pyftms/testsuv run --project repos/python-pyftms pytest repos/python-pyftms/tests