3个ESP32搞定室内定位,比GPS还准
有没有一种方案,能像 GPS 一样,在室内实时追踪你的位置?而且还非常简单,还不贵,有点系统配置能力的人就能做?
有。而且成本低到离谱——3个ESP32,几十块钱搞定。

这就是今天要聊的主角:BPS(BLE Positioning System)。
三个ESP32,怎么就能定位了?
先别被「三角定位」这个词吓到。原理其实特别简单。
你想想 GPS 怎么定位的:天上的卫星发信号,你的手机收到信号的时间差,就能算出你在地球上的位置。
BPS 干的活一样——只不过把「天上的卫星」换成「屋子里的 ESP32」。
具体流程是这样的:
① BLE 标签(比如你的手机、智能手表、iBeacon)持续广播蓝牙信号
② 放在屋子角落的几个 ESP32(蓝牙代理)接力接收信号
③ Bermuda 集成根据信号强度估算每个 ESP32 到标签的距离
④ BPS 集成分综合三个距离数据算出一个精确的2D坐标
关键是:至少需要 3 个接收点,才能定出位置。
这就像「三边测量」的概念——你说「我离A点3米」,那是画个圆;再加上「离B点4米」,两个圆有两个交点;再加「离C点5米」,三个圆唯一确定一个点。
BPS 的好处是什么?
它不需要你贴满传感器。3 个 ESP32 覆盖一个楼层,放在客厅、过道、卧室三个位置,基本全屋覆盖。如果你家是复式或者多层,每层放 3 个就行——BPS 还能自动判断你在哪一层。
而且它跟踪的是持续的位置流,不是「有人/没人」的二选一。你在沙发上坐了 20 分钟刷手机,它知道你在那。你从厨房走到书房,它看得到移动路径。
这东西到底能干什么?
聊几个实实在在的场景。
楼层自动识别
住复式、跃层的朋友应该有体会——「我在楼下还是楼上」这件事,传统传感器是分辨不了的。
BPS 通过不同楼层 ESP32 的信号特征,可以判断你当前在几楼。这对多楼层智能家居来说非常实用:楼下的扫地机器人不用跑到楼上去、晚上你在二楼卧室的话,楼下所有灯自动关。
物品追踪
一个很多人问的场景:「我钥匙放哪了?」
在钥匙上挂个 BLE 标签(十几块钱的 iBeacon),BPS 就能在地图上显示它的位置。虽然精度没有厘米级,但告诉你「钥匙在书房桌子上」这种程度完全够用了。
安防与老人看护
BPS 可以设置「无人区域」触发警报——比如不该有人出现的窗户位置出现信号。对家里有老人的来说,可以设置长时间在卫生间/厨房不移动的提醒。

硬件和安装有多麻烦?
如果你已经玩过 ESPHome,装 BPS 花的时间不会超过半小时。
硬件清单:
- HA 主机:废话
- 蓝牙代理:3 个 (我以前的文章也写过不少)
- BLE 标签:你的手机手表就行,或者买几个 iBeacon 小挂牌(¥10-20)
安装步骤:
1. 先装好 3 个 ESP32 的 ESPHome 蓝牙代理固件
2. 安装配置 Bermuda 集成和 BPS 集成
3. 激活 Bermuda 的 Distance 传感器
4. 上传你的楼层平面图
5. 标注 ESP32 位置坐标 6. 安装 bps-map-card 地图卡
详细步骤其实 BPS 的 GitHub 文档写得很清楚了,英文的,但配合浏览器翻译完全能看懂。
作者也在文档里写了,当前还是早期开发阶段,可能有小问题,但这对于非程序员作者来说已经非常不容易了。

最后
从 4 月份出 v0.1.0 到现在,基本上每周都有更新。现在已经是 v0.1.5,修复了不少 bug,加上了多楼层地图卡、区域跟踪、异步 WiFi 扫描等实用功能。
仓库地址:后台私信“BPS”获取(大写不含引号)
最后,更多好玩有用的集成,敬请关注
3 ESP32s Handle Indoor Positioning, More Accurate Than GPS
Is there a solution that can track your location indoors in real time, just like GPS? Simple, affordable, and within the reach of anyone with some system configuration skills?
Yes. And the cost is ridiculously low—3 ESP32s for just a few dollars.

This is the main topic today: BPS (BLE Positioning System).
How can three ESP32s achieve positioning?
Don't let the term "triangulation" scare you. The principle is actually very simple.
Think about how GPS works: satellites in orbit send signals, and your phone calculates your position on Earth based on the time differences of those signals.
BPS does the same thing—only it replaces the "satellites in the sky" with "ESP32s in the room."
Here's how it works specifically:
① A BLE tag (e.g., your phone, smartwatch, or iBeacon) continuously broadcasts Bluetooth signals
② Several ESP32s (BLE proxies) placed in corners of the room relay and receive the signals
③ The Bermuda integration estimates the distance from each ESP32 to the tag based on signal strength
④ The BPS integration combines the three distance readings to calculate a precise 2D coordinate
The key point: at least 3 receiving points are needed to determine a position.
This is the concept of "trilateration"—saying "I'm 3 meters from point A" draws a circle; adding "4 meters from point B" gives two intersection points; adding "5 meters from point C" uniquely determines one point.
So what are the benefits of BPS?
You don't need to cover every wall with sensors. Three ESP32s can cover an entire floor—placed in the living room, hallway, and bedroom, and most of the house is covered. If your home is multi-story, just place 3 per floor—BPS can even automatically determine which floor you're on.
Plus, it tracks a continuous stream of positions, not just a binary "someone is here / no one is here." If you sit on the sofa scrolling your phone for 20 minutes, it knows you're there. If you walk from the kitchen to the study, it can see your movement path.
What can this thing actually do?
Let's talk about a few practical scenarios.
Floor Auto-Recognition
Anyone living in a duplex or two-story home knows the struggle—traditional sensors can't tell "am I downstairs or upstairs."
BPS can determine which floor you're currently on by analyzing signal characteristics from the ESP32s on different floors. This is very useful for multi-floor smart homes: the robot vacuum downstairs won't climb upstairs, and if you're in the second-floor bedroom at night, all the lights downstairs turn off automatically.
Item Tracking
One frequently asked scenario: "Where did I leave my keys?"
Attach a BLE tag (an iBeacon costs just a few dollars) to your keys, and BPS can display its location on a map. The accuracy isn't centimeter-level, but telling you "your keys are on the study desk" is more than sufficient.
Security & Elderly Monitoring
BPS can set up alerts for "no-go zones"—for example, triggering an alarm if a signal appears where no one should be, like a window. For homes with elderly family members, you can set reminders if someone hasn't moved for an extended period in the bathroom or kitchen.
How much trouble are the hardware and installation?
If you've already played with ESPHome, setting up BPS will take no more than half an hour.
Hardware list:
- HA host: required
- BLE proxies: 3 units (I've written about these in previous articles)
- BLE tags: your phone or watch works, or buy a few iBeacon keychains (¥10–20)
Installation steps:
1. First, install the ESPHome BLE proxy firmware on the 3 ESP32s
2. Install and configure the Bermuda and BPS integrations
3. Enable the Bermuda Distance sensor
4. Upload your floor plan image
5. Mark the coordinate positions of the ESP32s 6. Install the bps-map-card lovelace card
The detailed steps are actually clearly written in BPS's GitHub documentation—in English, but fully readable with a browser translator.
The author also noted in the documentation that it's still in early development, so there may be minor issues, which is already very impressive for a non-programmer.

In Closing
Since the v0.1.0 release back in April, there have been updates basically every week. We're now at v0.1.5, with many bugs fixed and practical features added such as multi-floor map cards, zone tracking, and asynchronous WiFi scanning.
Repository link: message "BPS" in the backend (uppercase, no quotes) to get it.
Lastly, stay tuned for more fun and useful integrations.

