Closed conorpwr closed 2 months ago
It might not be easily possible with this library, as it is written to update HA sensors. So you will need to rewrite the part that updates the HA sensors, to something else. For BLE monitor, which is a custom component for HA, I have also rewritten this library a little bit. Perhaps that parser can help you out.
Well it's somewhat of a relief to know I didn't miss something completely obvious then!
Thanks for the link to the other parser, I'll try experiment with that code for a bit and see what I can come up with. If I make something suitably generic (unlikely fwiw) I'll send a pull request.
Appreciate the quick response!
If anyone is digging through issues like me, here is some sample code (https://github.com/conorpwr/homebtble-to-prometheus) to collect and parse BTHomeV2 announcements only based on Ernst79's https://github.com/custom-components/ble_monitor/
Is your feature request related to a problem? Please describe. I have a few ATC thermometers I'd like to start graphing/recording the data but without going to the effort of setting up a full blown HomeAssistant set up. I've tried figure out this library on how to parse data but I appear to be missing something obvious about how to retrieve the data after it's parsed (or if its possible as is).
Describe the solution you'd like Some straight forward sample code on how to take a BLE advertisement from bleak and get the parsed output back assuming this is possible using this library
Additional context I've tried mock up my own attempt based on some of the tests and with liberal print() debugging, it appears to be parsing things but on the flip side, I don't appear to be able to get parsed/clean results back. I can see the raw bytes in various places.
Sample code attached:
Some sample data from me trying to play with this library in interactive mode