android icon indicating copy to clipboard operation
android copied to clipboard

Uniquely identifying (i)Beacons: Beacon Monitor vs HA Core implementation for iBeacons

Open Mincka opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. The current implementation of the Beacon Monitor only shows the UUID as an attribute. As per the upcoming iBeacon integration and its documentation by @dbraco, he suggests the following setup for iBeacons:

iBeacon Devices are tracked by a combination of the following data:

UUID (universally unique identifier) is a 128-bit identifier that is generally set the same for all iBeacons at the same physical location. Major is an integer to differentiate between iBeacons with the same UUID. Minor is an integer to differentiate between iBeacons with the same UUID and Major value. MAC address (except for devices with a randomized MAC address) Consider setting up your iBeacons with a schema similar to the following:

uuid=UUID major=1000 minor=1000 Downstairs Front Room uuid=UUID major=1000 minor=1001 Downstairs Bathroom uuid=UUID major=2000 minor=1001 Upstairs Main Bedroom uuid=UUID major=2000 minor=1002 Upstairs Guest Bedroom uuid=UUID major=3000 minor=1000 Attic

The same logic was also presented in the code of the iBeacon lib:

An iBeacon is identified by a three part identifier based on the fields proximityUUID - a string UUID typically identifying the owner of a number of ibeacons major - a 16 bit integer indicating a group of iBeacons minor - a 16 bit integer identifying a single iBeacon

but was later changed to something more general:

A Beacon is identified by a unique multi-part identifier, with the first of the ordered identifiers being more significant for the purposes of grouping beacons.

So we can see that the general idea is to use major / minor to differentiate iBeacons.

This means that in this case the Beacon Monitor will not be able to differentiate (i)Beacons with the same UUID since the Major / Minor information is not captured by the Beacon Monitor, only the id1 of a beacon (which is the UUID of the iBeacon).

I understand that the Beacon Monitor is a beacon monitor and not an iBeacon monitor. Parsing iBeacons requires more logic to be implemented since we must first identify their specific type and then extract information.

It should be noted that the iBeacon Transmitter can specify the three values (UUID, Major, Minor). So in a sense, from a user perspective, we should be able to identify our device as a iBeacon, but also identity iBeacons with their 3 components.

Describe the solution you'd like I would like to be able to uniquely identify iBeacons using the Beacon Monitor. Maybe it could make sense to identify main beacons types, parse and extract information for iBeacons, getting Major and Minor as additional attributes in the array.

Describe alternatives you've considered, if any Using different UUID for each beacon (when it's possible to change them).

Mincka avatar Sep 23 '22 16:09 Mincka