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

First, I want to thank you for the hard work of creating this implementations. Over the last 3 years, I have tried different ways to track room presence and this implementation is very straight forward and uses EspHome, so I can use my existing devices. My setup works fine with a beacon. It gives me the correct distance when in I am range to the proxy.
For some reason I cannot make my smart watch to work. This is a generic smart watch that in the past has worked (using other implementations) connecting to a Raspi 3 running Hass. The watch has a single Mac Address.

Would you please guide me on the steps to follow in order have the proxy and Bermuda recognize the watch? Thank you in advance

Someone willing to explain how to calibrate?
I got 2 sensors but my smartwatch is jumping between the two sensors…

1 Like

You need to find it’s bluetooth UUID in Bermuda Trilateration>Configure>Select Devices

Anyone looking for guidance on basic setup, take a look here: https://youtu.be/-fmBwINdsxQ?si=haytTzs25nAmwh9q

2 Likes

Hello! I’m really enjoying Bermuda so far… So much easier than past room presence options I’ve attempted in the past.

It seems like I am seeing a lot of the same issues that others have seen… Devices showing “Unknown” areas a lot. I have seen the remedies suggested and most I’ve either tried, or they don’t work for my needs. (I have some bluetooth proxies in my house with obviously stronger radios that will read much closer than others, so I have to keep the max distance down.

A suggestion I would make would be to have a separate configuration setting, an “Unknown Timeout”, which would be a minimum amount of time in seconds before an old value for area or distance would be replaced by the Unknown status. This would only affect flipping to the Unknown status and not switching from one known area/distance to another known value.

Have you tried the beta version with proxy specific calibration settings? This fixes the issue of differing hardware BT signals.

Oh wow, no I haven’t, but I’m trying now!

Also while I tried suggestions in this thread, I had not gone through everything in the Wiki. Changing my ESP32 config to align more to the recommended values at least seemed to eliminate a lot of the “Unknown” values… Hopefully this beta fix will help with my false reporting too.

Awesome support! Thank you :slight_smile:

1 Like

I’ve been away with limited internet for the last few days, so catching up a bit…

As long as your watch is transmitting something, Bermuda should be able to track it. Since you know it has a stable MAC address, you should be able to go into the Bermuda integration, “Configure”, “Select Devices”, and find the MAC in the drop-down box. You can type in as much of the MAC as you need to to filter the devices, which should help if there’s a lot of stuff in there.

If your watch doesn’t appear in the list then either it’s not sending adverts, or perhaps bermuda (or HA) is filtering it out for some reason. If that’s the case, install an app like NRConnect and find the watch’s broadcasts in there, and send screenshots of the raw advert so I can see what’s going on.

You can also send a “download diagnostics” which will let me see what the backend is seeing, so I can perhaps identify why it’s not showing up.

You’ll need the v0.6.9rc2 version that’s in “beta”. Then in the “Configure” menu you’ll see buttons to take you through the proxy and device calibrations. There should be enough info in there to guide you through it, but let me know if it’s confusing or if the wording is off.

If your issue is jumping between two proxies there are also some other things to check:

  • What is your esphome config on the proxies, and what hardware are they running? A well-tuned esphome config will give you more reliable reports at closer intervals. Bad config will cause bouncing because of big gaps between advert reports or device reboots.
  • How are your proxies and watch physically located, typically? If the distances are similar (and for rssi measurements, the definition of “similar” can be surprisingly loose) then it will bounce between them. Eg, if Watch to proxyA is 2m and watch to proxyB is 3m, i’d expect you’d see a lot of bouncing, since a “noisy” signal at proxyA is going to be weaker than a “lucky” signal at proxyB. But if proxyA is at 2m and proxyB is at 6m, I’d expect far fewer bounces, all else being equal.
  • Have you altered the other settings from their defaults? They typically work OK but it’s easy to get into the weeds when trying to improve things.

If you are still having trouble you can raise a ticket on github and include a “download diagnostics” so I can take a look at the internals. If you haven’t restarted HA (or reloaded Bermuda) for a while it can take a long time to generate the diagnostics, so you might need to be patient for that bit.

Ooh, well spotted! That’s a great tute.

Awesome!

1 Like

Thanks for your response. The issue with the ‘generic’ smart watch and other watches is that they stop broadcasting a signal once they connect to a device (phone)
If I turn off Bluetooth on my phone then I can see track my watch with Bermuda. If I turn on BT on the phone, once the watch connects to the phone I cannot track the watch anymore. :frowning:

In the last 24 hours I saw a video on setting this up using ESPHome, and got 5 boards I had laying around setup around my home and I’m SUPER impressed so far. I even managed to get my Apple Watch added using the Private BLE Device option!

Only issue is my house is very small, and not much separates 4 of those rooms, so detection in my kitchen works pretty well as it’s in an extension, but when I’m sat in my living room the other 3 rooms are right above me, and it often briefly considers me in a room upstairs.

Do you have any tips for making room detection more accurate in this situation?

Thanks for the awesome integration!

1 Like

I’m also having this issue. Since I don’t need BT on the phone when I’m at home I created an automation where HA switches off BT on the phone when I arrive home. I prefer that Bermuda tracks my watch rather than my phone.

1 Like

Would you please share your automation? Thanks!

Sure! I have HA Companion installed in my phone (called p20). Please, be aware that it will not run in all phones:

alias: Switch off BT on p20 when arriving home
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.p20_wifi_connection
    to: YOUR_ESSID
condition: []
action:
  - action: notify.mobile_app_p20
    metadata: {}
    data:
      message: command_bluetooth
      data:
        command: turn_off
mode: single
1 Like

Yeah, it’s a bit of a pain. I configure my phone’s watch app (Gadgetbridge) to not stay connected to the watch so it only connects to it when I want it to - but that won’t be convenient for everyone as you miss notifications etc.

You might be able to find an iBeacon app for your watch - I think there’s one for the Galaxy, I was using one for infinitime at one point. A dedicated beacon app should still broadcast even while the watch is connected.

Nice! And thanks for sharing!

Another option might be to tell your watch app to disconnect, rather than turning off bluetooth altogether. Of course that would depend on support from the watch app (I think Gadgetbridge can do this as it fully supports control via “intents”, and the ha companion app can define and trigger those on-device).

Awesome!

Yeah, that’s pretty difficult when you’ve got rooms directly above, since the real distance can be quite similar. Adding another proxy in the lounge might help, the idea being that when the main lounge proxy is unlucky enough to get a weak signal, the hope is that the secondary one will get a clear ping, so that a moderate signal received by one of the upstairs proxies won’t be strong enough to “win”.

You can also try placing your upstairs proxies higher up on the walls (not at floor level) and the downstairs ones at waist-height, so that you increase the actual distance difference that they’re reading against. It’s always likely to be a bit of a battle though. You could experiment with placing foil below the upstairs proxies, that might reduce the amount of signal they receive from below - this sort of thing can be very hard to do with confidence though, RF stuff is dark magic, and it’s quite possible to accidentally build an aerial when you think you’re creating shielding!

2 Likes

I have the huawei p20 pro phone.
This doesnt work anymore.

You could use tasker on android to turn on/off bluetooth too.
BUT
Since 2023 this is also not possible anymore

Newer versions of android doesnt allow turning off bluetooth etc anymore.

So its getting really hard to do this.

I’m actually planning to buy a samsung smartphone cause of this… In samsung , you have the bixby routines, to do this:

I wanted a oneplus device though, but routines/commands arent available there… nor is tasker or HA able to toggle bluetooth on it.

I have an issue where the devices become “unavailable” (not “unknown”) after some time and are then unusable again until I reload the Bermuda integration when standing next to a proxy

Here you can see it clearly: I reloaded bermuda with the bottom device next to a tracker, then I reloaded it with the top device next to a tracker a bit later. Then bot devices where available for some time, until at the same point in time they stopped being. I reloaded it later that day and again they became unavailable.

What I noticed:

grafik

Home Assistant shows that the bermuda integration isnt providing that device anymore.

I also noticed that it seems to be at ~9AM that the devices are not reported anymore, except for the weekend. Is it possible that Bermuda thinks its not working when there are no devices in the area, even though that might just be because everyone is working and no phones are in the home anymore?

is it possible to track the occupaceny off a area, i would like to turn off the light when the room is empty.

You’ll have to compile /respond to that yourself. Areas don’t maintain occupancy like zones do.

Over on the github spdustin made a pretty good suggestion on how to do this: feature/question: area occupation sensors · Issue #203 · agittins/bermuda · GitHub

Yeah labels have really changed how I do automation. It’s basically the same thing I do for multiple things now

The ability to target pretty much anything for any reason is gamechabging. Want all the xyz that are also lmnop but tagged ‘Trakker’? A couple selectattr statements later and you’re there. Could even extend it and make a template sensor that behaves exactly like zones do but for a given room…

1 Like