room-assistant icon indicating copy to clipboard operation
room-assistant copied to clipboard

Add battery information for iBeacons

Open gruijter opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like iBeacons (and maybe other types) report the battery status. Can this be included in the MQTT reports?

Describe alternatives you've considered

Additional context I would like to integrate room-assistant into my own headend (not HASS.IO)

gruijter avatar Mar 29 '20 11:03 gruijter

Unfortunately I can't seem to find the battery level in the iBeacon standard - am I overlooking something? I know that some manufacturers include it in the advertising data though. Maybe we can support some of those specific algorithms, then I would need to know which beacons you're looking at specifically though.

mKeRix avatar Mar 31 '20 21:03 mKeRix

My bad. It seems to be a ble standard, not iBeacon specific. 0x180F is the battery service. Some reading here https://www.andreasjakl.com/read-battery-level-bluetooth-le-devices/

gruijter avatar Mar 31 '20 21:03 gruijter

I was thinking about this as well. My iBeacons use the upper byte of the Minor field to carry the battery level. I contributed the "minor/major_mask" to the legacy version to provide a way to expose this to home-assistance. But this required config on the HA side which kind of goes against the discovery benefits of this new solution.

I havent look at the Tag Override functionality yet - is there any docs on this ? - but I did wonder if it could evolve into something like HA templates, i.e. add a new field to the ibeacon message that is derived from internal variables and logic. Something like battery: "ibeacon.minor & 0xFF00 >> 8".

I think that could have potential way beyond battery level as it would provide a mechanism to access things like advertising data and augment the information available to room-assistant in a very structured way.

I'm guessing one for V3.0 8)

PeteBa avatar Mar 31 '20 22:03 PeteBa

hi, any chance to get it implemented ? that would be great :)

septeven avatar Sep 06 '20 17:09 septeven