BLE iBeacon from app not detected by HA iBeacon Tracker integration

Has anyone managed to have the companion app BLE iBeacon detected by iBeacon Tracker integration?

  • Currently the integration detects my dog’s PawScout beacon and it works great.
  • The three android devices I have running the Companion App can detect each other’s UUID properly as well as the PawScout beacon.

However, the iBeacon Tracker on my Raspberry Pi4 is not detecting the phones.

I am stumped and appreciate anyone’s feedback.

I am having the exact same problem. I was going to open a bug report, but eventually found out that the advertisements are not being picked up by the Linux bluetooth stack itself and if you can’t see the advertisments with the bluetoothctl or btmon command then homeassistant can’t do anything about it.

Other Android iBeacon transmitting apps are not working as well, but might be sharing the exact same android library as the Companion app.

The problem is one of the following.

  • The linux bluetooth stack is wrongly ignoring the advertisements.
  • The USB BLE dongle firmware is wrongly ignoring the advertisements.
  • The android bluetooth stack is transmitting the BLE advertisements in a manner incompliant with the BLE advertisement specification, or the default protocol is deliberately munged to be visible from android-to-android only.
  • The AltBeacon library used by the Companion app isn’t formatting the advertisements properly.

It would be worth trying a ESPhome BLE remote receiver to see if those receive the iBeacons from the android app. It might be using a different bluetooth stack that doesn’t ignore them.

Fixing the bug is a very deep dive as the problem is almost certainly upstream.

Same here!

While the ibeacon integration sees my NUKI door lock beacon, no joy on the beacon provided in the companion app on android phone.

Thanks for the explanation above, but it still seems odd that a native HA integration (ibeacon) does not pick up the native HA Android App beacon ?!?

try adjust the transmit power and advertise power in teh companion app settings.

Unfortunately, that doesn’t do it. Even putting the two devices 10cm from each other…

Did you try adjusting the measured power setting?

I would not suggest adjusting the measured RSSI setting as it really should be a fixed figure that always stays the same for each specific device. I am assuming it was set correctly by the app builder (in this case where the app is acting like a beacon) or the beacon manufacturer (if using an actual physical beacon).

If you do adjust the measured RSSI, the result will be that the estimated distance will change. It won’t make the beacon easier to scan or increase the actual range from which the beacon can be scanned.

For example, if the beacon had a measured RSSI of -59 at 1 meter, and then the scanner saw the beacon signal with strength of -59, the scanner would conclude that the beacon was 1 meter away from the scanner.

Now imagine changing the beacon’s measured RSSI to -30. Now, when the scanner sees the beacon signal with strength of -59, the scanner will estimate that the beacon is farther than 1 meter. There’s a standard formula for this measurement, but let’s just guess and say that the scanner would conclude that the beacon is 3 meters away from the scanner. In reality, the beacon is still 1 meter away, so this estimate would be incorrect. All we did was adjust the measured RSSI; we did not change the actual distance from the beacon to the scanner. But in the end, the scanner made a different estimate of the distance from the beacon.

By the way, “measured RSSI” is a really confusing term. What they really should call it is “this is a fixed figure that was calculated and set by the factory after the factory measured the beacon signal strength when the beacon was 1 meter away from a scanner”. Not every easy to remember that long name though. Maybe a better name would be “Factory calibrated RSSI”.

1 Like

in case you are curious this PR links to the history of why this setting exists in the first place :slight_smile:

1 Like

Yep, same for me, I can’t seem to get this working no matter what I tried. I’m guessing it works for someone especially if there is a PR for the rssi?
Unless the app only works with other iBeacon software and not directly with the integration…which would still seem odd…

According to my knowledge, the companion app acting as a “virtual beacon” should definitely work with the iBeacon Tracker integration. Like you said, that would be very odd if it didn’t.

I haven’t setup the companion app as a virtual beacon yet (so I don’t have first-hand experience), but you can try testing it with a second phone to see if it is broadcasting:

Just download the LightBlue app (free) onto a second phone, then use that app to scan for beacons. Put the two phones side by side so the the RSSI signal strength will be really strong, then tap the Sort button on the LightBlue app to sort by RSSI. Your companion app phone should then show as the first “beacon” on the list.

If it is not showing there, then you need to work on the companion app to figure out what’s wrong.

If it is showing there, then the problem is your iBeacon Tracker integration.

Re the integration: I have personally tested it out and it works well for me. Somewhat slow reaction time, but I think that’s about the best you can expect from this sort of “shared hardware” beacon scanning system.

The android companion app as an iBeacon is very spotty for me. Constant away/home state changes. Using other iBeacon software is much better.

Jumping on an old(er) thread, but I just recently moved my HA server to my office and figured I’d try setting up my phone as an iBeacon in the app so it could tell when I’m in my office. Same issue as with others where it’s not showing up in the iBeacon Tracker integration.

I downloaded a BLE scanner to a second device and can confirm that my phone is transmitting (my second phone easily found my main phone and correctly labeled it as an iBeacon). Still nothing from the iBeacon Tracker integration, even though I’m a few feet from the Bluetooth sensor and it is picking up an actual iBeacon device I have on my trashcan outside without any issues.

Is the fix really as bad as @eyager indicates? Maybe it’s just an android issue? I’m all-android myself, so can’t confirm. I’ll also toss out that I’m using a Pixel 6a, so it’s up-to-date stock android. Any possibility other folks having issues are also running a newer version of Android? Just seems very weird that there’s a feature in the app that clearly doesn’t work (at least for some folks)…

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.