-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Example for using this as library #46
Comments
You can just mod the current binary for that, if you add quit() after the print line in line 114 it will quit after printing the json, you also have to comment out logger on line 73. Then you can call it from other stuff to grab your info. |
I did that and it still keeps running.. i put those changes in scanner.py |
I wanted to do the same thing. I believe the readme assumes that you have acquired the Bluetooth advertisement data separately (e.g. with the Bleak library), and now want to parse it. But if, like me, you don't care to learn how Bleak works, here's a hacky script to grab the data:
Note that while this should work with v0.9.0, it is grubbing into the guts of victron_ble, so future updates may break it. I'm also not familiar with asyncio; this is likely not the ideal way to go about this, but it does work. |
Hey,
I tried using this library through the CLI and it worked fine.
Now as I would like to further process the information from my device, I would like to write my own python script and use your library as a library.
But sadly I don't really understand how to, based on the example given in the readme.
The readme says:
But what's not clear to me, is: Where to get the BLE Advertisement Data from?
I tried using ID / MAC-Adress ("AA:BB:CC:DD:EE:FF") as ble advertisement data and the encryption key as "", but apparently that did not work.
In the end, I would like to end up with the same JSON / Object, that I get from the CLI, so that I can persist that information in a database.
The text was updated successfully, but these errors were encountered: