Accessing BLE advertisement data through some way into sensor or automation #3534
Unanswered
whc2001
asked this question in
I'm not sure
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe your request
Some versions before Home Assistant added the Bluetooth advertisements viewer, which is very handy. It displays all advertisement data nicely for debugging. For example, I have a BLE beacon that I carry with my keychain made by RadioLand. The data sheet gives the advertisement scan response:
Here the last byte is the battery level (0-100% in hex). In the advertisements viewer I can see it without any problem, here it's 0x1E or 30%:
However that's about it. I cannot reference this in any of template sensors or automations. My current solution is to use a ESPHome BLE scanner and write the
on_ble_service_data_advertiseto handle it and present in a number sensor, but I'd like it if I can eliminate the extra node.Why the uncertainty?
I am not sure what's the best implementation to this. A new template sensor type? A new event type to trigger automation? As long as I can grab the raw bytes I should be able to process it with existing templating.
Use cases
I have a couple of devices all work in a similar manner (including a BLE body scale that simply broadcast measure result a couple of times with manufacturer data, which I am also using the ESPHome node with
on_ble_manufacturer_data_advertiseautomation). However this only works on that one single node. Being able to handle it on HA itself means all the BLE proxies can grab those data.What areas might this affect?
New event category? Or a new integration just for this? As I've said I am not really sure...
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions