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

Initial bluetooth integration panel #23531

Merged
merged 12 commits into from
Jan 21, 2025

Conversation

silamon
Copy link
Contributor

@silamon silamon commented Jan 1, 2025

Proposed change

Initial integration panel for bluetooth where all the Bluetooth devices can be seen, along with the current preferred source scanner and RSSI. Needs further work to show the advertisements.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@bdraco
Copy link
Member

bdraco commented Jan 1, 2025

Screenshot 2025-01-01 at 10 19 09 AM

bdraco
bdraco previously approved these changes Jan 3, 2025
src/data/bluetooth.ts Outdated Show resolved Hide resolved
@silamon silamon added the backend merged The backend PR for this frontend PR has been merged label Jan 11, 2025
@silamon silamon marked this pull request as draft January 11, 2025 07:59
@silamon silamon force-pushed the bluetooth-device-page branch from dd636d6 to e938fd8 Compare January 11, 2025 08:31
@silamon silamon force-pushed the bluetooth-device-page branch from e938fd8 to bd39dc2 Compare January 11, 2025 08:31
@silamon silamon marked this pull request as ready for review January 11, 2025 08:32
@silamon
Copy link
Contributor Author

silamon commented Jan 12, 2025

It's been rewritten, but before merging I still need to verify that it works the same way as it does before when no store collection was used.

@bdraco
Copy link
Member

bdraco commented Jan 12, 2025

Tested.
Latest version is trying to listen for an event called bluetooth/subscribe_advertisements instead of calling the bluetooth/subscribe_advertisements API

{"type":"subscribe_events","event_type":"bluetooth/subscribe_advertisements","id":39}

@bdraco
Copy link
Member

bdraco commented Jan 12, 2025

I was using $0.hass.connection.subscribeMessage(function(msg) { console.log(msg); }, {"type":"bluetooth/subscribe_advertisements"}); for testing

@silamon silamon marked this pull request as draft January 13, 2025 07:22
@silamon silamon marked this pull request as ready for review January 15, 2025 19:00
@bdraco
Copy link
Member

bdraco commented Jan 16, 2025

Screenshot 2025-01-16 at 11 39 06 AM

All working as expected with latest push

bdraco
bdraco previously approved these changes Jan 16, 2025
@bdraco
Copy link
Member

bdraco commented Jan 16, 2025

I'm going to start working on more backend APIs

Subscribe Scanner state (current mode)
Subscribe Scanner config. (Mode)
Subscribe Scanner connections
Set scanner config

src/data/bluetooth.ts Outdated Show resolved Hide resolved
src/panels/config/ha-panel-config.ts Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft January 21, 2025 11:34
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@silamon silamon marked this pull request as ready for review January 21, 2025 16:48
@home-assistant home-assistant bot requested a review from MindFreeze January 21, 2025 16:48
Copy link
Contributor

@MindFreeze MindFreeze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hope I'm not missing something about the subscribe logic but this makes more sense to me

@MindFreeze MindFreeze merged commit ca2a9f9 into home-assistant:dev Jan 21, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend merged The backend PR for this frontend PR has been merged cla-signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants