-
Notifications
You must be signed in to change notification settings - Fork 54
Remove filter to handle new UUIDs in SwitchBot firmware #48
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
Conversation
The new SwitchBot firmware advertises its services differently, making the old UUID filter not find any SwitchBot devices. This commit is a quick-fix to remove the filter and simply allow the rest of the discovery code to handle it as before. This should be backwards compatible with the old firmware since the rest of the discovery and initialization is exactly the same. See also devWaves/SwitchBot-MQTT-BLE-ESP32#80
Any chance this will be implemented? |
Worked perfectly, thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored functionality to my switchbot curtains with firmware rev 4.6 update
@Danielhiversen Could you please merge and publish this quickly? Thank you! |
@RenierM26 are you about to help out? |
Does a maintainer may have time to review? :) |
Will look into it later this week |
I do now get "Unexpected error" when adding the HA integration: Is it related to this changes? The error before the update was "failed to connect" with no logs at all. Raspberry Pi 3 Logs:
|
The new SwitchBot firmware advertises its services differently, making the old UUID filter not find any SwitchBot devices. This change is a quick-fix to remove the filter and simply allow the rest of the discovery code to handle it as before.
I don't really know Bluetooth so this is just a total hack that seemed to work. But from reading of the rest of the code, it's still handling advertisement data and making sure it's a supported model, so this change shouldn't hurt.
In theory, this should be backwards compatible with the old firmware since the rest of the discovery and initialization is exactly the same, but I don't have many devices to test with. Running a scan, I was able to find my own SwitchBot thermometer, and a neighbour's "WoHand" device, which I'm assuming is a switch. Before, I wasn't able to find any devices.
See also devWaves/SwitchBot-MQTT-BLE-ESP32#80
This seems to address home-assistant/core#70262, since after this patch I was able to have HomeAssistant discover my neighbour's switch.