Skip to content
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

BTHome: New feature #20996

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

BTHome: New feature #20996

wants to merge 8 commits into from

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Nov 16, 2024

Contribution description

Little weekend (or rather Thursday and Friday night) project of mine. This extends Skald, who advertises to the world with BTHome, "an energy efficient but flexible BLE format for devices to broadcast their sensor data and button presses". The main use case is to integrate BLE-powered devices into Home Assistant.

Most of the spec is supported, except "Trigger based advertisements" (since Skald at the moment only advertises periodically). For encryption, I was able to confirm with the spec examples that at least from the generated output
is the expected one, given the example input, but Home Assistant is for some reason not able to decrypt the message (even the one in the examples)... So further investigation is needed.

TODOs:

  • Investigate why encryption does not work with HA
  • Finish doc

Testing procedure

  • TODO: Provide tests

So far only tested by flashing a node and seeing the device pop-up in Home Assistant:

image
image

Issues/PRs references

None

@github-actions github-actions bot added Area: network Area: Networking Area: doc Area: Documentation Area: build system Area: Build system Area: drivers Area: Device drivers Area: BLE Area: Bluetooth Low Energy support Area: sys Area: System Area: examples Area: Example Applications labels Nov 16, 2024
@miri64 miri64 marked this pull request as draft November 16, 2024 11:09
@miri64 miri64 added State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Type: new feature The issue requests / The PR implemements a new feature for RIOT labels Nov 16, 2024
@miri64
Copy link
Member Author

miri64 commented Nov 26, 2024

Investigate why encryption does not work with HA

After talking to @BOZHENG001, I think the problem is that Skald is implementing an older BLE version than BTHome expects and thus fields (such as TXAdd which is used as part of the nonce for encryption) are not in the place Home Assistant expects them to be. Will try to confirm this somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: BLE Area: Bluetooth Low Energy support Area: build system Area: Build system Area: doc Area: Documentation Area: drivers Area: Device drivers Area: examples Area: Example Applications Area: network Area: Networking Area: sys Area: System State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant