Suggestions for best BT Adapter for use w RPi4

Im looking for suggestions from the folks in this group with a similar setup as me. HA 2022-10.x running on a RPi4 with an SSD drive, who have upgraded or extended their BT range. Ive read many of the threads with tips and suggestions and will be relocating my HA pi this weekend to a more central location, Based on initial testing of my recently acquired BuleCharm beacons, I currently need to be within about 20 feet of the Pi4. This test was done before any attempts to optimize reception. The new RPi4 location will be more centrally located in our open concept first floor. I would really like these beacons to be highly dependable as occupancy detectors, so I will try the suggestions Ive seen so far, this weekend. If that proves to be unsatisfactory I will be looking for a better solution, possibly an antenna type adapter or something else. (Note: this beacon is not my only occupancy sector, just another sensor to factor into a Bayesian calculation).
If you are currently running a PI4 with a solidly performing BT adapter, please share your experiences and hardware recommendations. If you have other suggestions, Im open to those ideas as well.
As always, I appreciate the help this forum always seems to provide. Thanks,
Art

The new BT proxy for Esp32 devices sounds like what you need

I personally just bought three to spread around the house.

Hi Art,

Are you trying to just determine whether the beacon is anywhere in your home or you want to know specifically which room?

I wonder if you can add an antenna to your HA? 20 feet range for scanning BLE devices is oddly short.

FYI, you can turn up the TX on the beacon to +4 to extend its range. But that might not be the right thing to do if you want specific room presence.

Thomas,
Thanks for the quick reply. Based on your icon, Iā€™ll assume you are the same Thomas from BlueCharm. Earlier this week I did receive two BC021 multi beacons. They were easy to set up and get recognized in Home Assistant. My HA server is a RPI4 located in a second floor office, which is admittedly not in an ideal location for BT use. My baseline test was to see exactly when it saw the beacon based on the normal arrangement of doors. I had to walk up the stairs, down a short hallway to my office then open that door before it triggered.
Sunday morning I will move the RPI4 downstairs to the common area. This is really the area I want the beacons to be responsive in and Iā€™m hoping that just this will greatly improve what Iā€™d like it to do. Simply at home, not necessary to determine which room. If my keys are home, I must be at home (with probabilities factored in a Bayesian calculation).
I really donā€™t have any complaints about the beacons at this time. They were easy to set up (with NO modifications) right out of the box and Iā€™m glad I still have configuration options to try after I move the RPI. Iā€™m hopefully optimistic that this simple solution will meet my needs. Would you recommend placing the Pi higher or lower in the open shelved entertainment center? Iā€™m thinking high - just under 7 feet is as high as I could place it but I have multiple options. The beacons are attached to our key fobs which usually end up within visual range of where the PI will end up, but most likely in a purse, drawer or jacket pocket.
I welcome any additional ideas or suggestions and appreciate your assistance. Thanks,
Art

Nathan,
Thanks for the response. Iā€™ve not played with ESP Home before, even thought I have Home Assistant experience dating back to version 0.60. Do you have any tips or suggestions for a complete newbie so that I donā€™t do something really stupid. Learning the hard way can sometimes also get expensive. Is there a really simple first project youā€™d recommend before I jump into the solution you suggested. Iā€™m comfortable with the coding and YAML but have ZERO experience with the ESP lingo and requirements. Iā€™ve started doing some reading but Iā€™m sure I will have concerns if Iā€™m ā€˜doing this rightā€™, hopefully before the magic smoke confirms I wasnā€™t.
Any suggestions for a beginner tutorial or website that really lays out the basics? In terms of parts to purchase, any tips for best prices or service. I have used AliExpress before but itā€™s not speedy. Amazon or another parts warehouse? Iā€™m open for anything you can offer. Thank you.
Art

When you move the pi4 you will get data on whether it works ā€˜as isā€™. If it does, job done.

If not, any esp32 has bluetooth. Flash it, plug it in to a usb power supply (like the one you charge your phone with).

Optionally get a 3d printed case to tidy it up.

I assume you are using the iBeacon Tracker integration, right?

What type of automation are you using for your beacon? From what I can tell in my simple newbie experiments, there are three choices:
-trigger when Estimated Distance Changes
-trigger when Signal Strength Changes
-trigger when beacon enters or exits a zone

You mention: ā€œMy baseline test was to see exactly when it saw the beacon based on the normal arrangement of doors. I had to walk up the stairs, down a short hallway to my office then open that door before it triggered.ā€
-What do you mean by ā€œtriggeredā€? Are you triggering a light or what? As you are walking with the beacon, how can you see when it triggers something?
-This is really a key issue: The HA triggers for beacons currently are really really slow. In my experiments, there is sometimes a 20-40 second delay before the trigger starts the automation. Sometimes it is as long as two minutes.
-So if you are walking slowly with your beacon, testing your automation, you might actually already be in range, but the HA is just triggering really slowly. During that delay period, you keep walking closer and closer to the HA, until finally it triggers, so you mistakenly conclude that the range is really short. I think this is the number one suspect for the cause of your ā€œshort rangeā€.

Some random notes and ideas:

My current setup for testing: Using iBeacon Tracker integration, a BC011 beacon (basically the same as your BC021), broadcast interval set to 500ms (default is 1022.5 which should work fine for your situation), TX at 0dBm. My rPi is from Speed Studio purchased on Amazon: https://smile.amazon.com/gp/product/B0899VXM8F/
My rPi does not have an external antenna.

Hereā€™s my automation setup as seen on dashboard:

As you can seem, the current estimated distance is 15 meters, which is actually very accurate. I just measured it with a tape measure, and the distance was around 46 feet. Not direct line of sight, but a couple drywall walls and one open door between the HA and the beacon.

You can also see that I am using ā€œSignal Strength Changesā€ as the trigger. I set it at ā€œgoes below -70ā€ as the trigger for ā€œbeacon is gone, turn off the shelly plug (lamp)ā€. I donā€™t think it matters through whether I use Signal Strength Changes or Estimated Distance Changes (Update: That last statement is wrong; see update below for more info). The HA is just doing some simple math to calculate the Estimated Distance based on the signal strength, so in effect, those two different trigger choices are the same (wrong!). When beacon enters a zone is probably slightly different though. I have not played around with it yet though. If you are using the ā€œenters zoneā€ trigger, you might try the Estimated Distance Changes trigger instead, just to see if there is any better performance/distance. I doubt it, but you never know! (I canā€™t get this type of ā€œenter home zoneā€ automation to work though).

Update: I just tested using Estimated Distance vs Signal Strength Changes. As mentioned before, the HA has a fairly long delay before triggering. It appears from my testing that the typical delay when using Estimated Distance as a trigger (for example, turn on light when beacon is within 3 meters; turn off light when beacon is farther than 7 meters). is between 20-40 seconds. But the delay when using ā€œSignal Strength Changesā€ is much much longer; around 1.5-2.5 minutes. So my comment above about these being basically the same is wrong; the HA code seems to handle them differently.

Signal Strength Issue: Sometimes the signal strength will jump around a bit for no reason (wifi interference, or whatever). This is very common among BLE scanners.

Basically the scanner is falsely seeing that the beacon signal appears suddenly very weak, then it jumps up to normal level one second later, all with the beacon not moving. I donā€™t think this is a unique issue with the HA; pretty much every scanner or smartphone I have used does this. So I have recently experimented with a suggestion from another user (Thanks, Scott R!) to filter the real signal strength numbers (i.e. smooth them to remove these crazy unstable numbers that pop up occasionally) then set the trigger to be based on these filtered numbers instead of the real signal strength numbers. So far, it seems pretty good results but the filter math is still a bit beyond me. You probably donā€™t need to mess with this yet though. First see if you can get a longer distance range from your beacon to your HA.

Some ideas for getting longer range:
-Like you are doing, move your HA to a more central location. 7ft in the air sounds good to me, but you need to test it out.
-Add an external antenna on your HA if possible.
-Increase the TX of your beacon from 0 to +4 (use the config app for that; donā€™t change anything else yet thoughā€¦I know people love to fiddle with all the config settings at the same time and then there is chaos. Lol!)
-Connect some sort of ESP proxy to your HA. According to my understanding, this proxy will act an extension of the HA, allowing the HA iBeacon Tracker to see beacons that would normally be too far from the HA. I am not 100% clear on this though. I will be testing it in a few days.
-Connect an ESPHome to your HA. Basically the same as above, but more of the scanning and processing work would be done by the ESP, rather than the HA. I am not sure though if the iBeacon Tracker integration would still be involved in this case. I think not but I am not sure. Sorry, I am very new to HA!

Tom,
Iā€™m happy to report that moving the PI to the common area of the first floor has resulted in much better results. The beacons are within range and performing well. To answer some of your questions from the previous post; 1. I was walking around with my keys and my iPad watching the sensor status as I moved around. This was my basis for triggered. 2. I was using the device_tracker.state as my sensor and watching for a change from home to away or vice versa. 3. No, I did not pause at any time to see if the sensors would ā€˜catch upā€™. It was a very rudimentary test that was just a seat of the pants trial.
I certainly appreciate your detailed response. It gave me lots more to think about and some ideas to look into over the next couple days as more data becomes available. I have set up a couple filtered sensors to track signal strength. Yes, I have already noticed a little aberrancy in that data but I think filtering will certainly help.
So far the sensors have been reporting for about 10 hours without any dropout. My sensor runs at about -67 for signal strength sitting in a drawer in the living room. My wifeā€™s runs about -70 in her purse in our master closet which is on the other side of an internal wall from where the PI is located. This is at nominal settings on the beacon. Absolutely no changes except for Name.
Overall, simply moving to Pi to a central location has made the beacon sensors extremely stable so far and it looks like this will be a good solution. As this week progresses, I will continue to monitor stability and sensitivity of the beacons as we get back to normal activity. Please let me know if youā€™d like further details as more data is acquired.
Thank you to everyone who contributed to this conversation and I hope that other users can benefit from this experience. For me, it has piqued my interest in ESP Home and opened up other features of HA that I otherwise wouldnā€™t have played with. Thanks to all!

1 Like