MI32 legacy: add BTHOME sensor parser #20625
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:
Initial support for sensors using BTHOME packet format - https://bthome.io.
Thankfully this format can serve all kinds of purposes and is very flexible. It can even be useful for internal use as it is possible to build pure BLE devices with Tasmota sending BTHOME packets for many months now.
Basically every BLE sensor, that can be flashed with a custom firmware based on the first project of this kind (https://github.com/atc1441/ATC_MiThermometer for the LYWSD003MMC) can be configured to send in the BTHOME format.
The number of supported sensors is growing steadily and meanwhile includes some TUYA based models, although no easy OTA conversion for every new type is available. Kudos for @pvvx for his huge amount of work: https://pvvx.github.io
As the parser must stop if an unknown data type is received, Feedback is needed in such cases. It should be pretty trivial to add more data types, although ATM it is only planned to roughly match the feature set of the Xiaomi/Mijia sensors. More advanced use case can already be realized with Berry anyway (like multiple entities of the same data type in one sensor).
Decryption is not supported yet.
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass