Can you tell us more about the Bayesian sensor implementation? Sounds interesting!
Re:BPS seems exciting progress for Bermuda, but I really do think that BPS should be merged to Bermuda if possible. I personally didn’t get the BPS working as it crashed my whole HAOS running on Proxmox. Somehow I do believe combining the efforts would eventually be beneficial for both developers and the product itself.
@agittins@Hogster, any reason why these projects should be kept separate, considering both are working towards same goal?
I have two Xiaomi watches. A mi band 8 and a smart band 8 pro.
The mi band 8 is seen by bermuda and advertise when phone’s Bluetooth is turned off. The Smart Band 8 pro is visible by bermuda only when i switch my watch in pairing mode. when the watch is connected to my phone, the device become unknown in bermuda, even when i turn off my phone’s bluetooth. I think there are limitations on this newer model and I haven’t found any workaround.
I’m not sure why you would want a map of your house showing your phone moving around
I agree, for me it’s more of a “shop window” and I know some people do want that. For me its more about placing the proxies. If you have, as I do, an actual floor plan it’s really easy to place the proxies with high precision. The front end is also a good tool to “debug” and see where do I have high precision and vice versa. In the long-term it could also be possible to draw walls on top of the floor plan to be able to adjust for these when calculating distances. Ubiquity has something similar to see where you will have wifi issues.
The zone (room) entity in BPS seems to be “unknown” most of the time
The “problem” is that BPS “only” receives data and if it can’t find the location it gives back unknown. The problem is that since the distances can be quity jumpy this is unfortunately a quite common problem. I was thinking about the Bayesian sensor to “smooth” out values and have more stable results.
@agittins@Hogster, any reason why these projects should be kept separate, considering both are working towards same goal?
No, I have answered this question before and I’m open to anything I just want a stable solution to have precise indoor tracking. That itself has no value but I believe that this will be crucial for doing some really exciting things in the future such as AI solutions.
So I’m not currently at home, otherwise I would just try it and see… buuuttttt…
I have several wall-mounted android tablets in my home. Would I be able to use the android app’s ‘Beacon Monitor’ sensor in a way that could be used here? (instead of esp32’s)
I just recently installed the integration and using two atom m5 for testing.
At first it was working temporarily but now I can’t see any device room that I added.
The scanners doesn’t seem to be active anymore and I don’t understand why. I can see them online on esphome etc…
I am in a similar boat, small house plan area, but 3 floors, it thinks I am 3 floors down.
The Integration seems to work well with x-y Coordinates but absent a GPS-like elevation capability (unlikely) I was wondering if the author (agittins / together with HA) could just do a simple configuration setup for floor levels in mPD (m above a principal datum). Where I currently live mPD is well defined but you could just have it above sea level or it could even be relative datum, with Ground Floor set at 0, 1st Floor level at 3m (say), 2nd at 6m (say).
So as HA allows you to assign floors and you can assign rooms to each floor, surely there is some scope, having defined a floor level, for Bermuda to use (a) the closer (as calibrated) ESP32 sensor in conjunction with maybe (b) the strongest RSSI(s) (assuming weaker RSSI through floors?) to say (guess?) you are in “this room” on this floor?
I wonder if you could isolate the horizontal component of the BT UHF Waves (within a certain angle?) and only use those as then the detected devices would only be detected at one of the (e.g. 3) levels, and the distance calbration would define the room.
Or is this just pie-in-the-sky stuff :-). I read a wee bit about ToF sensors etc but I think that’s not necessary here, just some simple mechanism. Food for thought.
HW question! Has anyone been able to craft a ble proxy + ble beacon “all in one” device? I’m thinking if ble beacon gets located based on fixed proxies and then same device could be used for more accurate location estimation by being a proxy also? Idea is for moving proxies like vehicles, furniture etc. but assigning dynamic area based on the fixed proxies.
Bit wild idea and most likely my logic has a fault in it But in theory it should be doable.
I am playing around with this great integration (thank you) but was curious as to why my Rpi4, iPhone and iPad are shown as “Unknown” Device types, no Manufacturer or Model. These are well known brands, but either I have stuffed something up or it was never there.
Can I attempt to add back this information somewhere and if so where and how please? [EDIT] Private Wifi Addresses off if that helps.
Bermuda supports (and only intends to support) the Bluetooth proxy back-end in Homeassistant. So any integration that implements this interface should work OK with Bermuda, and if it doesn’t, I’ll try to make it work.
So at the risk of sounding glib, the next step is to request the companion app to implement that feature. I don’t know what the android BLE api’s are like, so I don’t know if performance would be as good on a couple-hundred-dollar tablet compared to a $4 esp32, but it probably won’t be worse than the usb bluetooth adaptors!
I’m keen to ultimately integrate possibly multiple trilateration solvers into Bermuda, but I’m not ready to take on those sorts of contributions yet because
Bermuda still has a ways to go in bedding down performance and functionality in its current state
I’m not experienced with coding in a team, combined with raging adhd makes it much harder for me to collab and my initial attempts at “being a dev lead” have been disastrous for my output (this is something I discovered on other work)
and (somewhat selfishly) I still want to implement my original intended solutions for the problem, which I may never get the time to do once I’m also doing user support for other implementations. A year or so of groundwork just so I can get close to doing the fun bit… soon!
We’ve over 4k installs according to the HA telemetry stats, which apparently translates to something like 12,000 users. This means that by working on top of, and currently, separately from Bermuda, @hogster and others can have the freedom of trying out different ideas to see what floats, without being bogged down by my need to move cautiously in ensuring Bermuda works on all supported platforms and with as smooth a user-experience as I can muster.
I think ultimately the ideal solution may be that Bermuda has a few different built-in solvers, at least one that works out-of-the-box on any supported hardware, some others that can be enabled and ideally an API that lets solvers running in an add-on or on another machine with GPU etc do heavy math for fancier results. But being open-source, we can all steal the best bits of each other’s ideas based on our own particular set of chosen constraints - mine happen to be near-zero user configuration to be decently-usable, low-latency, stability and broad platform support, albeit, evidently, at the cost of pace!
If hogster had to wait on my blessing for merging code into Bermuda I think they’d have given up in frustration, with barely 10% of the amazing progress they’ve made by being able to freely explore and experiment. I’m keen to see their work brought in, but there’s architectural stuff I haven’t even got my head around properly yet that would be a precursor to that, and there’s some compatibility problems to solve too… like getting scipy installed on pi’s(!) - I expected that to be a non-issue, but there are multi-year-old tickets on that sucker, it’s a much deeper pot-hole than it looks, I think!
So all to say… I’m excited by the work that hogster has been doing and the results they’ve acheived so quickly, and I’m open to Bermuda incorporating those as both projects mature. Right now I feel both projects are moving faster/better by taking independent paths for the present, and integration is always on the cards for the future.
Upgraded to 0.8.0-rc1 today - with some trepidation after reading the loooong note attached.
Pleased to say that it all went without a hitch. As promised, areas are now slightly slower but less jittery. I now have 200 entities for eight tracked devices - most disabled by default, fortunately.
Where can we find the upgrade notes once it’s done?
Haha I applaud and thank you for your courage! There was a lot in the update and being keen to get it out… I didn’t have time to write a shorter release note
That… that does seem a lot! I have 736 entities over 32 devices, with 7 proxies. The number of proxies has a big effect because each proxy adds 2 entities to each device. I trust that my assumption that disabled entities are not a burden is true
If you have run certain combinations of esphome2025.3, and Bermuda v0.8.0-alphaN then some of those might be duplicates which can be deleted.
Welcome! There’s often no way to derive that information just from the bluetooth data alone. The MAC address (if not a private or random one) will often yield a manufacturer name, but most often this is the chip manufacturer (eg Realtek etc) rather than the device manufacturer. The BLE advertisement sometimes includes “manufacturer data” but this is often the name of the manufacturer who created the particular protocol (eg, all iBeacon packets, regardless of source device or device manufacturer, contain the “Apple” manufacturer code, because they created / assigned the “iBeacon” protocol).
Since Bermuda never actually “talks to” any devices, it doesn’t get to query their details, we only grab what they send freely over the air. Where Bermuda can tie a device to an existing Homeassistant “device”, it will share that info, such as for bluetooth proxies, or other BLE integrations like Xiaomi, Sonof etc.
I’m not aware of there being an interface where you can manually specify these data, as it’s usually just a “nice to have” exposed by other integrations internals.
and it works . I still seem to get pretty reliable single-second advert udpates from the proxy when it’s configured to transmit as well, but I’ve only really tested it on one device.
Bermuda now makes the link between the various mac addresses of the esp32 (the base mac is the WIFI MAC, add two to that for the BLE mac, add another for the Ethernet MAC). So now when Bermuda gets an advert from a proxy it correctly ties that data to the proxy “device”.
It doesn’t show sensors for it yet but it will in a future version.
This has been my plan for determining the inter-proxy distances for some time, but was waiting on esphome to support it simultaneously The fallback is to use successive approximation using triangle inequality, but having proxies tx a beacon is a nice shortcut.
For moving proxies, I’m not sure that it would contribute to accuracy as such, but it is certainly doable providing the algo has a way to know (or rather, knows not to assume) that the proxy is static. My robovac has been keen to try this out ever since I augmented its brain with an esp32
Not quite sure what you are referring to re the mPD, since Bermuda has no way to reference any real-world datum other than the parameters we feed it and the single 7-bit signal strength value we get from each received packet. Currently, everything is worked out using those measly 7 bits, roughly 8 of which are noise.
If you are simply saying “assume each floor is 3m apart” then yeah, that’s what it’ll be doing, for the most part. Each floor in HA is assigned an integer “level”, so Bermuda will assume that all proxies on a given level share a horizontal plane (or a flat mushy “band”, anyway) and proceed accordingly.
Oh that that were possible! Our little $4 devices give us 7 bits, and it’s an amplitude, with an unknown (but approximated) logarithmic scale, from an uncalibrated A/D. The next step up is… I think thousands of dollars (maybe only hundreds now) per receiver and give AoA and/or DoA (angle/direction of arrival).
Oh, and our antennas are neither really vertically nor horizontally polarized, nor entirely circularly polarized. And they’re sort of nearly omnidirectional, but also really not.
The “next best thing” for our purposes is probably mmwave, which can give direction, speed and size, depending on the module, so does so without identity, so we’ve at least still got that going for us!
Apologies for the long multi-quote post, it did not start out that way; alas, here we go…
Maybe this is like a smart phone where you have to get the IRK for it to work properly?
There was also something in the v0.8.0-rc1 release notes (yesterday?) about this, might want to check that as well:
See recent release notes, as I mentioned just above.
I do know this is how Zones work (e.g., your zone.home value will be an integer with the count of the People in that Zone). I am still in the research phase here however, so not sure if Areas work in a similar way or not.
Leave it alone!
Jokes aside, this is exactly what led me here (as I have been unhappy with needing to paw around the HA app to get to what I need, like some sort of animal). I see you figured out a solution already, but I got the idea from this YouTube video (I am not sure how similar this solution is, but there are some nice ideas in there IMHO):
Room Presence Detection with Bermuda BLE and ESPHome
by Smart Home Guy 2024-10-13
(see YouTube or Invidious or bermuda/discussion of same)
Much has already been written about the hows and whys (the approach you describe has essentially already been tried by many previous projects). I guess you didn’t stumble across those discussions yet. For my part, I found them fascinating.
You deserve it, mate!
It seems I’ve been hearing Bermuda mentioned for probably a couple years now, so imagine my surprise when I finally start looking into it seriously (recently) and discover that the main course has not even been implemented yet!
Not a complaint whatsoever, rather a testament to the careful way you are proceeding and the results you are already achieving and how happy many people seem to be with it, even in such an “early” state!
I appreciate the suggestion, but I had the IRK configured from ESPresence for both Apple devices as Private BLE Devices. The iPhone worked reasonably well, although it took an extremely long time - 15 minutes - to go to Away. But apparently this is normal for this integration.
Thanks for pointing this out.
I stopped using Bermuda a couple of months ago since the latest ‘stable’ release because of performance issues. I use an Intel Core i5-13500, but my Home Assistant went from like 2% CPU to 15% CPU at 4 cores minimum with Bermuda running . Like I think I mentioned earlier, I discover about 200-1000 different BLE devices an hour because I live in quite an urban area.
In my case I only want to calculate anything for tracked devices and nothing more. Maybe devices that reach a minimum RSSI threshold for guest detection, but that’s it.
I was looking into rolling my own setup back in February where I would offload distance calculations and filtering to the ESP itself. This worked reasonably well. But I got sidetracked with other hobbies .However earlier this week I picked it back up again when I received some mmWave sensors, which I want to combine with BLE presence detection somehow. However that’s beyond the scope of this thread.
I don’t want to speak for Ashley, but I gather that the idea is to be able to have some separate threads, rather than trying to find information in one of these 600-post long mega threads (like this one), which can be cumbersome.
Thank you for the welcome, I wanted to drop by to say a huge thank you for this amazing integration, it is taking a lot of reading and a lot of tweaking of my 4# esp32c3s (one with a little soldered on 31mm antenna trial), 1# esp32 and the HA Server (RPi4) bluetooth all working on different strengths but I am getting there.
The iPad doesn’t seem to “reach out” (maybe it is just shy) to connect as often as the iPhone so it says “Unknown” a fair bit
Re amending the names, totaally understood, it is probably a cosmetic issue but like anything in HA, it helps identify devices for troubleshooting, I cannot remember so many MAC addresses :-).