docs: explain active scanning requirement for device discovery#531
Draft
bluetoothbot wants to merge 2 commits into
Draft
docs: explain active scanning requirement for device discovery#531bluetoothbot wants to merge 2 commits into
bluetoothbot wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
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.
What
Add a "Device discovery and active scanning" section to the README.
Why
"Some of my SwitchBot devices are discovered but not all" is a recurring
support theme (e.g. #299, #287). The cause is well understood by maintainers
but undocumented: SwitchBot puts the model identifier in the BLE service data,
which is only delivered in the scan response and therefore requires active
scanning. With a passive scanner the
service_datais absent and detectionfalls back to manufacturer data, which only resolves a handful of models.
How
Verified against the code:
parse_advertisement_dataresolves the model fromservice_datafirst (_find_model_from_service_data/ suffix); themanufacturer-data fallback (
_find_model_from_manufacturer_data) matches bylength only and covers few models.
GetSwitchbotDevices().discover()alreadyuses an active scanner, so the section notes the gap surfaces when a passive
source feeds advertisements (e.g. a Home Assistant adapter or ESPHome proxy in
passive mode) and tells users to enable active scanning there.
Docs-only; no code changes.
Testing
No code changed. Confirmed prettier preserves the prose wrapping (no
proseWrapoverride; lines match the existing Troubleshooting section width).Autonomous PR by Kōan, an agent run by Nick (@bluetoothbot). A human is responsible for reviewing and merging.
Quality Report
Changes: 1 file changed, 17 insertions(+)
Code scan: clean
Tests: passed (1300 passed)
Branch hygiene: clean
Generated by Kōan