-
Notifications
You must be signed in to change notification settings - Fork 17
Add Bodytone DU30-B1D8 Fitness Bike #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
netsoft-ruidias
wants to merge
5
commits into
dudanov:main
Choose a base branch
from
netsoft-ruidias:feat/bodytone
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
47db30f
Add Bodytone DU30-B1D8 Fitness Bike
netsoft-ruidias 021491e
Add fallback
netsoft-ruidias 0376d9f
bump python dependency
netsoft-ruidias bbeae6c
update
netsoft-ruidias ce1670d
fix: guard against missing _cli in _on_disconnect
netsoft-ruidias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| """ | ||
| Bluetooth diagnostic script. | ||
| Scans ALL nearby BLE devices (no UUID filter) and shows advertisement details. | ||
| Run with: python diagnose_bt.py | ||
| """ | ||
|
|
||
| import asyncio | ||
| from bleak import BleakScanner | ||
| from bleak.uuids import normalize_uuid_str | ||
|
|
||
| FTMS_UUID = normalize_uuid_str("1826") | ||
| SCAN_TIME = 10 # seconds | ||
|
|
||
|
|
||
| async def main(): | ||
| print(f"Scanning ALL BLE devices for {SCAN_TIME}s (no filter)...\n") | ||
|
|
||
| found = {} | ||
|
|
||
| def callback(device, adv): | ||
| if device.address not in found: | ||
| found[device.address] = (device, adv) | ||
|
|
||
| async with BleakScanner(detection_callback=callback): | ||
| await asyncio.sleep(SCAN_TIME) | ||
|
|
||
| if not found: | ||
| print("No BLE devices found at all.") | ||
| print("Possible causes:") | ||
| print(" - Bluetooth adapter not available") | ||
| print(" - BlueZ not running (check: sudo systemctl status bluetooth)") | ||
| print(" - Home Assistant holding exclusive access to the adapter") | ||
| return | ||
|
|
||
| print(f"Found {len(found)} BLE device(s):\n") | ||
|
|
||
| ftms_devices = [] | ||
|
|
||
| for addr, (dev, adv) in sorted(found.items()): | ||
| has_ftms = FTMS_UUID in (adv.service_uuids or []) | ||
| marker = " <-- FTMS (fitness machine!)" if has_ftms else "" | ||
| print(f" [{addr}] {dev.name or '(no name)'}{marker}") | ||
| print(f" RSSI: {adv.rssi} dBm") | ||
| if adv.service_uuids: | ||
| print(f" Service UUIDs: {list(adv.service_uuids)}") | ||
| if adv.service_data: | ||
| print(f" Service Data: {adv.service_data}") | ||
| if adv.manufacturer_data: | ||
| mfr = {k: v.hex() for k, v in adv.manufacturer_data.items()} | ||
| print(f" Manufacturer: {mfr}") | ||
| print() | ||
|
|
||
| if has_ftms: | ||
| ftms_devices.append((dev, adv)) | ||
|
|
||
| print("-" * 60) | ||
| if ftms_devices: | ||
| print(f"FTMS devices found: {len(ftms_devices)}") | ||
| for dev, adv in ftms_devices: | ||
| has_service_data = FTMS_UUID in (adv.service_data or {}) | ||
| print(f" {dev.address} ({dev.name})") | ||
| print(f" Has FTMS service data: {has_service_data}") | ||
| if not has_service_data: | ||
| print(" NOTE: No FTMS service data -> requires GATT fallback") | ||
| else: | ||
| print("No FTMS devices found in the raw scan.") | ||
| print("Check that the bike is powered on and in Bluetooth range.") | ||
|
|
||
|
|
||
| asyncio.run(main()) |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # PowerShell | ||
|
|
||
| usbipd list | ||
| usbipd attach --wsl --busid 2-5 |
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
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.