BLE iBeacon from app not detected by HA iBeacon Tracker integration

I think it might take some time for the integration to see the virtual beacon uuid being broadcast from ten different MACs (which is weird because iBeacon MACs are usually stable).

At that point, the integration will correctly conclude that this fishy looking iBeacon with many different MACs is in fact a virtual iBeacon being broadcast by a smartphone (with rotating MACs). It will then mark that iBeacon as a legitimate iBeacon to be tracked by the integration.

I’ve had my phone broadcasting for the last couple days and it still hasn’t shown up. I’ll give it a few more just for grins…

I’m not an expert, but this theory doesn’t really make sense to me. Shouldn’t it show-up immediately, and then disappear once the MAC address changes before showing back up once it decides it’s ‘real’ if that was the case?

I have had trouble in the past getting ESPHome to show me devices that it thinks have generated/rotating MAC addresses but that actually have a stable MAC address, but I presume aren’t tied to hardware so therefore are ‘fake’ and somehow broadcast that info too. I wonder if this is a similar issue? In those other cases, I ultimately had to use a BLE scanning app to find the device and then tell ESPHome to specifically track it.

Yeah, I’m also not sure why the iBeacon Tracker coders made it work like this. The integration docs say:

Randomized MAC addresses

iBeacons with a randomized MAC address will be combined into a single set of entities once the integration discovers the same UUID, Major, and Minor combination has been seen coming from 10 or more MAC addresses. This allows distance and presence detection based on the last reporting data. When using randomized MAC addresses, only one device must broadcast the unique UUID, Major, and Minor combination.

In the world of iBeacons outside of HA, very few people use MAC addresses for anything. Just let the scanner look for your target UUID/Major/Minor and then trigger some action if it is close enough or far enough or gone. That’s it.

My guess is that this is a security feature so that someone can not simply configure another iBeacon with the exact same UUID/Major/Minor. In other words, making another iBeacon with the same UUID/Major/Minor and MAC address is not something that your basic local thief easily can do. So I suppose that’s why they added MAC scanning into the process.

Your question about how they actually implemented this is a good one. Might be nicer if the “beacon” appeared on the list when it first gets scanned, then later when it shows up again with a different MAC, it should get an asterisk with a note like “this beacon is under security review due to multiple MACs being associated with the same UUID/Major/Minor. If you are using a virtual beacon on your smartphone, this is normal. Please wait until the system confirms”…something something.

Of course, I don’t know how to code an integration, so I’m basically being a Monday morning quarterback here. I’m sure the coders put a lot of hard work into building this.

That said, from the forums, this issue seems to be causing 99% of the problems with this integration. Solution? Just use one of my actual iBeacons and don’t use your phone to badly emulate an iBeacon! :rofl: :rofl: :rofl:

Re ESPHome: The way the ESPHome beacon setup process scans for beacons and then lets you select your target beacon is weird too. It seems like a user friendly way, but in practice, it causes lots of problems (at least from what I have heard). Why not just let users manually enter the UUID/Major/Minor of their target beacons? Some manual typing of long numbers will be involved, but I think it would be easier in the end. Maybe this manual entry is actually possible in ESPHome? If so, I would suggest ESPHome users skip the “scanning for your beacon” setup feature and just enter it manually.

By the way, be careful when using random BLE scanning apps to try to get your beacon’s actual UUID/Major/Minor. Almost all of them will NOT show you the correct info; in fact, they will show you data that looks very similar to the UUID but is not correct. It’s always best to use your beacon’s specific configuration app to get that info. That’s the only way you can be sure you are entering the correct data in ESPHome.

Apologies if my post seemed flippant; I honestly thought you grabbed the 10 MAC addresses out of thin air. Ha

Seeing it in the docs actually makes me feel better; at least I have a good idea why it didn’t seem to be working. I’ll plan to just leave my phone transmitting for the long haul to see if it ever actually picks it up and works as intended. I’ll also be sure to report back if it does to help the next person having the same issue.

In regards to ESPHome, manual entry is exactly what I had to do. The ‘suggested’ way of auto scanning literally showed no devices and it took a bit of digging before I realized that no, I wasn’t doing something wrong. I absolutely LOVE ESPHome, but I’ve had more than one situation where the suggested methods in the docs simply don’t work and I’ve just had to find alternative methods on my own. Don’t ask me how much time I spent initially trying to compile YAML files on the raspberry pi 3 I had running HA before I figured out you need something beefier to handle it…

Thanks again for the help and info!

I didn’t find it flippant at all. Maybe my response gave that impression? :man_shrugging:t2:

Internet communication is complicated sometimes. :blush:

I may have “overanswered” your post. I usually do that for the sake of other people having similar or related issues.

I may be a silent listener but I appreciate your detailed responses :slight_smile:

1 Like

Hi,

Although I still don’t understand why one companion app is capable of detecting beacon from the other and HA iBecon can’t, I now feel better after reading this thread. I thought I was too dumb to understand the docs and was not doing something properly. :smiley:

I still did not had success with EspHome Bluetooth proxy as well.

Regads

Hi JR,

To do some “troubleshooting by elimination”, you might try using a different app to send out a virtual beacon signal. In other words, don’t use the HA Companion app.

If everything works and the virtual beacon shows up in the HA iBeacon Tracker integration, that should confirm to you that the HA Companion app is the problem. If not, then not.

For iPhone, there is an app called iBeacam (for using a beacon to click the camera button on your phone) that has a feature allowing you to send out a virtual iBeacon broadcast. I just downloaded it and confirmed it works.

For Android, you can trying searching in the Play store for “virtual iBeacon” to find an app to do this.

Also, JR, for your reference, this is how I set up the HA side of things to create an automation that runs when the beacon (or virtual beacon in your case) gets within a certain range or leaves range of the scanner (in my case, the rPi base unit running HA):

Hi Thomas,

Thanks for reaching out and try to help.

I’ve tried (in the past) the virtual beacon app from another app, can’t remember its name now, and no luck. However, you remind me that I did not tried it with esp bt proxy. In any case, I can find the virtual beacon (from third part app or ha companion app) using a scanner on my phone or laptop Bluetooth. I tried (send and receive) with android and iphone, works between them but never received by the HA. That lead me to believe something was wrong with my dongle (ha runs on a miniPC with external dongle), the dongle is in the list of compatible devices and works with bt thermometer around the house. I am still not convinced that it is not the dongle, but seeing so many people with similar behaviour around leads me to believe that the integration is, at least, not clear in its documentation.

Anyway, I am running some tests with esp bt proxy, so I will take the opportunity to do more extensive test on the bt dongle as well. One thing catching my attention is the logs from ha, the Linux kernel does not have the proper firmware files for this dongle and it warns that on boot. However this is a flaw of ha kernel, my laptop does not produce the same error. I will signal that in the hassos ticket system. But even without the firmware files available, it works with ble thermometers…

I’ve ordered another dongle from Amazon to have comparisons

Thanks again
Jose

So I’ve had my phone broadcasting via the HA app for nearly 3 weeks now. From what I found on Google, it sounds like Android cycles through MAC addresses daily so it SHOULD have been plenty of time for the ‘10 addresses’ that the docs say are required. Nothing has ever shown up.

I previously tried a dedicated beacon app with no luck (and confirmed with another device it was broadcasting correctly), but didn’t let it run for the 10 days. Anecdotally, it seems that every post I’ve read of someone who got it to work is on an iPhone. I’m wondering if there’s something about Android (or at least certain versions, since it’s so fragmented) that keeps it from playing nicely with HA.

Finding this integration very mysterious!! Previously I’ve used monitor.sh and I’ve TOLD Monitor.sh the MAC address of my bluetooth beacon and it’s instantly found it.
The way this works is confusing me.
I can see my beacon appearing in the debug logs but so far it’s not appeared as a device_tracker.

However, if this has a “killer feature” of being able to detect iphones with their randomised BT MAC addresses that would be amazing!

An additonal data point that seems to point to something specific to the HA Companion App. I’m not using the HA iBeacon integration. Using a Shelly, I’m scanning and printing out all BLE advertisements. I can see a PawScout beacon and BlueCharm beacon but I cannot see the beacon from the HA app. However, from another Android device, I can see the HA beacon using a number of different apps. With the nRF Connect Android app, I’m not only able to see the HA beacon advertisement but I can also clone it. When I readvertise that cloned beacon from the nRF Connect app, I am able to see it from the Shelly.

Has anybody found an easy solution?

The CSR8510 A10 bluetooth dongle I am using has no issues integrating some Govee bluetooth lights. After loading the iBeacon Tracker integration no devices show up there… (espicially no the BLE transmitter of the companion app).

However using the bluetooth_le_tracker I have no issue discovering my the BLE transmission of my phone/companion app…

I had the same issue as you. My HA server is not detecting anything in the iBeacon tracker. Although the iBeacon monitor in the android app is showing beacons…

They have a bug report there: https://github.com/home-assistant/core/issues/80357
Not sure if this will get fixed or if this is brought to maintainers attention.
There are so many issues (2.2k+) opened there, and this is just one of them.

An iBeacon from somebody else got integrated showing everything works fine. Just not integrating my phone.

Do you have an iPhone? My wife’s iPhone is not picked up by HASS, but my Google Pixel 7 works fine.

Maybe a really stupid question… But do I need to keep my Bluetooth on my phone enabled for this to work? Or is it enough yo have the BLE transmitter enabled in the companion app settings?

Yes if you turn it off the state of the sensor will tell you to turn it on.