Bermuda - Bluetooth/BLE Room Presence and tracking [custom integration]

Hi all!
Hoping you can share your expertise. I’m having difficulty setting up my Bermuda. I have two ESP32s flashed with ESPHome, I have everything configured in home assistant. I am using my android phone (Xiaomi 13) as a beacon, with the Home Assistant App transmitting signal.

In the Bermuda Device for my phone, the Distance entity seems to be somewhat accurate and updates relatively quickly. The Area entity tends to only read “Unknown”. If i put my phone right up to either ESP32 board, it seems to accurately update the Area, but shortly after removed more than ~50cm away it seems to go to Unknown again (even though the distance is updated accurately for a few meters).

Any idea why the distance is accurately reported but it can’t seem to identify the Area? I’ve tried fiddling with a range of Configurations but nothing seems to change this

Yeah might be helpful to show a single value instead (or something that tells me I’m doing it right) when I was calibrating I didn’t fully understand the signals and why some were way off.

1 Like

Howdy!

From what you’re describing - that the area works within 50cm but not beyond that, would imply that maybe you’ve set your “max radius” setting to 0.5m.

If that doesn’t solve it, can you take some screenshots of the Bermuda config page, and of the device page showing the problem occurring and not occurring?

Thank you!

The phone basically needs to be touching register the right area.

I’ve tried a variety of Max Radius configurations from 1m - 1000m and none seemed to be helpful and I keep getting an Unknown reads even a meter away from the ESP

It’s driving me nuts and I hope this can be resolved otherwise unusable :frowning:

image

hi! first of all amazing!! job;)

Any idea some times my beacons show unknown? this is because the beacon can’t reason any tracker?

I’ve got everything setup and working, the only problem is I can’t get areas to return from the bermuda entity. When I use the entity in visibility to have a section of my dashboard appear based on the room I’m currently in the only options that show up for all bermuda entities, including sensors, only show home / away / unavailable / unknown.

Does anyone know how you go about having the entity return the current area?

hello
i want to migrate from espresense to bermuda.
and i have a question.
Its posible to change the firmware of the espresense remotely from espresense to bermuda??

some of my espresense are in a not easy accesible area, and i dont know if i can flash esphome with bluetooth proxy remotely and not need to conect phisically to a pc for flashing

Do you have all of your proxies assigned to areas? That’s the only way I can think of that might cause the area to be unknown while still showing a distance. It’s not something I recall seeing before.

If that doesn’t solve it, can you do a “Download Diagnostics” from Bermuda, preferably after moving your phone close enough to register an area, then moving it away so it goes “unknown” (and take the diags within 5 seconds or so, if possible). Please do a “reload” before starting, so that you don’t get a big slow-down in HA when creating the diags.

Another thing to check, but I don’t know if it will help, is to see what power level your HA companion app on your phone is using to transmit the beacon. It may not be the problem though, since you are still getting a distance measurement.

Yes. It means those proxies have not recently received any signal from that device - which is quite normal and expected, as Bluetooth only has limited range.

I think you’ll need to describe more accurately what you are trying to do, and what is happening. If the dashboard thing is expecting a “device tracker” entity, then yes, it can only support home/away. Are you using a particular guide for setting this up?

Device tracker entities only support home/away/zones - not areas. The area sensor is what you need to use to track areas.

Are you doing something like this?

I don’t know. It might be possible, depending on what espresense accepts for OTA firmware files.
However there are some ESPHome changes to how the internal flash is laid out that were implemented a year or so ago, which makes a big difference to how reliable the bluetooth proxy setup is. OTA updates typically can’t apply those changes, so even if you can flash it remotely you might find the results to be not very reliable.

My recommendation would be to try things out with one or two devices that are easy to access, and make a decision from there - but I would probably plan for having to pull them out and do a reflash via USB-serial for the best odds in getting a good result.

My integration has been correctly determining which floor that I am on so I haven’t been paying much attention to details. However, I have been watching more closely over the last 2 weeks and the sensors are predominantly Unknown. There are typically only 1-2 distances shown and the rest are Unknown. Fortunately, the one or two showing distances are typically from the floor that I am on so, overall, the integration is providing the information I need. However, it didn’t used to be like this.

Any suggestions on what might be issue? I have changed the Attenuation among other Global settings but not having much luck.

I’ve just discovered this after using ESPresence around the house for several months.

Having installed this, it is showing 4 scanners - I have 3 Shelly Plus 1 devices and an ESP32 BT Proxy. I have an ESP32 flashed with ESPresence in every main room. Would I need to reflash them as BT Proxies before they would appear as scanners in Bermuda?

ESPresence has been okay for room presence, but if I can improve our room presence detection with Bermuda then I’m happy to reflash them as BT Proxies.

FYI Bermuda has discovered 577 devices, 60 of which are active :grinning: (yes, I have quite a few BT devices).

Do you have all of your proxies assigned to areas? That’s the only way I can think of that might cause the area to be unknown while still showing a distance. It’s not something I recall seeing before.

Hi. I am with stan . pas. I only have one proxy setup and have tried to assign to an area. It shows unknown all the time.

I’m away until the new year with limited Bermuda-time and limited internet, but will check in from time to time.

Bluetooth has limited range, so this is normal and expected. The “max radius” setting might also affect this, so you could increase it to possibly let more proxies report a distance. In your particular case you might find this makes the area sensor jump around more, so it’s a bit “adjust to taste” :slightly_smiling_face:

Welcome! Yes. The wiki has recommended esphome settings for this. I’d recommend doing the first flash to esphome using usb (not over-the-air) but subsequent flashes/updates can be done OTA. This is because esphome uses a filesystem layout that improves bt performance but can only be applied during a usb/serial flashing.

I suspect that maybe you have added your proxy to the “configured devices” list, then tried to set the area for the resulting Bermuda device, which won’t work.

You need to go to the actual proxy’s device (for an esphome that’s in the esphome integration, for Shelly’s in the Shelly integration) and set the device’s area there.

FYI Bermuda sends notifications to the logs if a proxy doesn’t have an area assigned to it, but of course that only helps if you already know to go looking for it :sweat_smile:

2 Likes

You need to go to the actual proxy’s device (for an esphome that’s in the esphome integration, for Shelly’s in the Shelly integration) and set the device’s area there.

You’ish correct. I was all confused what device, integration is doing what. After adding the area name to the esphome proxy device, name popped up. Thanks.

1 Like

i need some help, i get lost in the calibration…
i’m trying to implement bermuda with a bunch of shelly blu gateways.
I’m not sure if i have a hardware issues with those, because there are no tweaking settings like in ESP32. But i also tried my atom lite as Bluetooth proxy and this didn’t changed the overall situation.

My global problem:
I can calibrate the 1 m distance with one reference device. But then tweaking the Attenuation Value doesn’t lead to a increase of the distance. It remains a 1 m.
But this is not the only problem. Then trying to get my other two shellies into the mix, also doesn’t work. i thought the calibration offset is for different devices with different specs to get them in sync.

But i have three times the same devices, same firmware. But i’m unable to get the other proxies to a reasonable distance measurement.

this is the shelly in the living room , iphone 1m away.
then this measurement with completely off values

and then the other shellies without offset

shelly a842 is the kitchen and the iphone is lying 1 meter away from the proxy in the kitchen.
The distance from the kitchen proxy a842 to the living room proxy b0b21 is about 10m. Why is the living room proxy measures 0,68, when the device is lying in the kitchen? (wall in between) just a open door.

The third proxy in the other room fcb64 is about 20 m away from the living room with two stone walls, no open door. the other room is about 30 m away from the kitchen with three stone walls.

My measurements are completely off…
For test i’ve changed one proxy to an ESP32 atom lite, but i had the same measurements.

My other global settings are:

i was playing around with the radius value from 1 - 100. not sure what to put in here. Low values lead to unkown location.

My main problem with this calibration frenzy is, that the iphone device then stays at one area and never changes, often telling it is in a room which is 10m away and has two stone walls in between.

Help :slight_smile:

I don’t believe changing the Attenuation affects your reference device. Instead, it affects the distance value that your other devices are reporting.

really? The explanation regarding this settings reads to me “this is related to the current device you’re configuring”.

But if you’re right, then what is the correct task then?

  • Measure 1m with reference Proxy
  • put phone 5m away from reference proxy
  • fiddle around with Attenuation value to get (what?) 5 m to the other proxies? I have several other proxies. How should this work then. 1 value for two proxies?

No worries, if you take it very deliberately, step by step, it will work out.

No, the attenuation affects all devices. But it has no affect when the calculation comes out as 1m, which is why the first step is to use a 1m physical distance, then use ref_power to get the reading to 1m (we choose 1m because it is not affected by the attenuation setting, thus allowing us to isolate just the ref_power parameter).

When that’s done, physically move the device to a further distance, then adjust attenuation so that distance displays correctly.

Adjusting attenuation when the device reads 1m away will have no effect.

At all times you’re looking for the “repeatable minimum” distance, rather than an average.

IGNORE the measurements to other proxies while you are calibrating, as those measurements might be stale if that proxy is currently out of range.

Once you have your reference pair calibrated reasonably well, then test each proxy at 1m and a longer distance and if necessary, adjust the per-proxy offsets so they each read reasonable distances when the device is at a given distance from THAT proxy.

Leave it at 100m.

  • put your attenuation back to 3 (good values will be between 1 and 4, typically 2.6 to 3.6 in my experience. Never anything like 300).

  • get your ref_power sorted by testing the iphone and kitchen proxy at 1m separation. Save.

  • get your attenuation sorted by moving the phone away, and getting the reading to match the new physical separation. 5m or more is good for this.

If all your devices are the same hardware, this should now result in all proxies showing reasonable distances (eg 1m if the device is 1m from it, etc). Again, look out for stale values, you might be out of range of a given proxy.

Also, note that Shelly devices only send an update every 3 seconds at best, be patient :slightly_smiling_face:

But first calibrate your expectations. Within a few metres, don’t expect reliable sub-metre precision. And the longer the distance, the more the reading will vary.

Also if you are holding the phone you’ll get lots of variation, because of the hairy sack of water interfering with the signal :sweat_smile:

1 Like

Sorry, I misunderstood your post because you didn’t mention that you were doing this before adjusting the attenuation values so I thought you were adjusting values while leaving your phone one meter away from the reference proxy.