-
Notifications
You must be signed in to change notification settings - Fork 78
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
Implement Hap support #532
Conversation
raise error instead of assert use __bytes__ use Union instead of foo | bar use dataclass
use spawn to send read preset response after ATT_WRITE_RSP use public_address to keep info about bonded devices (vs connection) use watcher to be notified of connection / disconnection Fix next_preset logic when selecting the previous preset Use indicate for preset changed operation
In order to check if this is working, I am currently trying to implement an HAP test in avatar I am struggling with having a connection as Android require LeAudio to activate Hap :/ |
Our experience is that most developers prefer to use a standalone app than RPC console or a test script, as it's easier to observe the behavior for debugging. Also, for Bumble contribution, it's better to have an example teaching people how to use this libraries. You can try to copy Unicast examples and integrate it with HAP. |
I have added a run_hap_server but I don't really understand yet how you are making use of these script. |
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.
Could you also provide unit tests? Thanks!
There is no client implemented yet. I am not sure how to test it without and I haven't plan implementing the client part for now |
also add some logs to make it more explicit
We can have a very brief client just for testing like VCP: |
bumble/profiles/hap.py
Outdated
async def _on_set_next_preset(self, connection: Optional[Connection], __value__: bytes) -> None: | ||
await self.set_next_or_previous_preset(connection, False) | ||
|
||
async def _on_set_previous_preset(self, connection: Optional[Connection], __value__: bytes) -> None: |
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.
What is the purpose of using __value__
? An I cannot find what does it mean online
Approved as a milestone. I can merge it when the format/lint errors are fixed. Still, there are still too many TODOs and loud logs. I hope in following PRs we can stabilize most of them. |
Hearing Access Service 1.0 implementation