Add Support for Avago Tech Bluetooth Buttons #20088
Merged
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.
Description:
Support Bluetooth Buttons directly (without need for hub) and potentially other Bluetooth buttons
https://www.aliexpress.com/item/1005005791145037.html?spm=a2g0o.order_detail.order_detail_item.3.1478f19chQFmBA
Avago Tech Buttons come in 1 to 3 button versions and simply broadcast a Manufacturer packet with the following details without encryption
/*
Offset Button Manufacturer Data
0 Company ID = 2 bytes 0x0043
2 Unknown = 4 bytes 7fffffff
6 Counter = 1 byte
7 Unknown = 1 byte 05
8 Switch = 2 bytes - unique per switch unit
10 Unknown = 1 byte 00
11 Button = 1 bytes 0x (x = 1 to 3) single button 1 only dual button 1 and 3
12 Unknown = 4 bytes 50000100
*/
NOTE: To use these buttons
BLEAddrFilter must be set to 1 or above
MI32Option1 1 - otherwise teleperiod will act like a button press
Due to all buttons using same static random MAC address C1:A2:A3:A4:A5:A6 I dynamically update the MAC to include the Switch as the last two MAC values. Thus slots into the MI32 sensors functionality
If BLEAlias is used to remember buttons, both the static MAC address and the pseudo MAC addresses must be Aliased
eg
BLEAlias C1A2A3A4A5A6=AnyButton
BLEAlias C1A2A3A40058=Button3 (where 0058 is the Switch ID)
Related issue (if applicable): fixes #
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass