-
Notifications
You must be signed in to change notification settings - Fork 310
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
Possible to run notification on two different devices at once. #215
Comments
I believe this is due to the use of a single manager on mac os, as discussed here #206 Really hope this could get fixed soon. |
@superfashi Can you try PR #209 ? (This is something I tested on my test devices: 2 notifications and 2 indications) |
@bsiever tried and I don't think it solved the problem for running on different threads. Maybe it solved the problem on multiple devices under a single thread, which is what the issue author needed. Think you might want to take a step ahead and stop using a single |
The PR does not address the threading issue at all. The PR does allow connection to multiple devices at the same time via multiple |
I think this will be solved by the merging of PR #227. It will be released later today in version 0.7.0 of bleak. |
Released version 0.7.0 to PyPI just now. It should solve this problem. |
Thanks @hbldh |
I would like to restart this issue again. I am unable to read notifications from two devices simultaneuously. I am running:
The code I am running is given below based on Issue 345:
I have It would be great if any suggestions/help can be provided. |
Description
I'm trying to connect to some heart rate monitors and I can successfully connect to 1 and read the data properly, but I would like to connect and start notification on more than one device at the same time.
Is that possible with bleak?
What I Did
I defined an aync function
connect_and_record
which connects to a device using theBleakClient
by UUID and starts notification with a handler that stores the data in a database.I tried to run two devices using:
asyncio.gather(connect_and_record(uuid_1), connect_and_record(uuid_2))
.What happens is the first device connects and begins notification, and then the second device connects and it seems to cancel out the first one.
If you have any suggestions I would appreciate it. Thanks.
The text was updated successfully, but these errors were encountered: