HA android companion app itself has functionality of advertising iBeacon BLE packet.
This packet is detectable in bluetooth integration in latest HA (2022.9.5).
As you know, this packet from android device has random address, so address itself cannot be used to identify device.
So we need to check the ManufacturerData 76 (which means Apple) for iBeacon devices.
When I click ‘download diagnostic’ from bluetooth integration, I can get the json of the detected device.
in the scanner section, the device seems to be detected as below,
"scanners": [
{
"type": "ESPHomeScannner",
"discovered_devices": [
{
"name": "",
"address": "5C:FD:C5:19:F6:F8",
"rssi": -78
},
~~~
"type": "HaScanner",
"discovered_devices": [
{
"name": "",
"address": "5C:FD:C5:19:F6:F8",
"rssi": -78
},
Also in “/org/bluez/hci0”: section,
you can see the detailed content of the iBeacon packet with ManufacturerData 76, which contains major/minor data of the iBeacon packet.
"/org/bluez/hci0/dev_5C_FD_C5_19_F6_F8": {
"org.freedesktop.DBus.Introspectable": {},
"org.bluez.Device1": {
"Address": "5C:FD:C5:19:F6:F8",
"AddressType": "random",
"Alias": "5C-FD-C5-19-F6-F8",
"Paired": false,
"Trusted": false,
"Blocked": false,
"LegacyPairing": false,
"RSSI": -78,
"Connected": false,
"UUIDs": [],
"Adapter": "/org/bluez/hci0",
"ManufacturerData": {
"76": {
"__type": "<class 'bytearray'>",
"repr": "bytearray(b\"\\x02\\x15\\xaa\\xbb\\xcc\\xdd\\xee\\xff\\x11\\x22~~~~")"
}
},
"ServicesResolved": false
},
"org.freedesktop.DBus.Properties": {}
},
However, in the history section, this iBeacon device is not there!
By using async_register_callback(), iBeacon packet from HA companion app is not detected,
bluetooth.async_register_callback(
hass,
_async_update_ble,
BluetoothCallbackMatcher(),
bluetooth.BluetoothScanningMode.ACTIVE,
),
nor, async_discovered_service_info() gives packet for iBeacon from HA companion app.
I tried to get the details of the device using bluetooth.async_ble_device_from_address, but it didn’t give me details of ManufacturerData 76, which contains major/minor data of iBeacon packet from HA companion app.
@bdraco Is there any way to get the details of iBeacon packet from HA companion app, just using HA Bluetooth api?
…
Acutally, I’ve already made custom component for detecting ** iBeacon packet from HA companion app** using aioblescan python library, 2years ago, and it still works well with the latest HA.
but, I want to use newly introduced bluetooth integration api for this, but there seems to be no way.