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

Hi!
I had a Chipolo tag at home and I said to try the Bermuda integration and it worked very well. Then I tried another Bermuda version and found that it no longer detects the tag. I went back to version 0.6.8 and it still doesn’t detect it.
I have reset the tag countless times but without success.
I mention that the LightBlue ios application sees it and I can connect to it (I can see the uuid and various parameters that I don’t understand)
Can you advise me with a solution to this problem?
Are his data saved somewhere in the config?

I worked it out…
The attribute of the area of the sensor needs to be set as “Area ID” (not name)
Triggering beautifully!
Go Bermuda!

1 Like

This seems to work:

alias: Test
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.bermuda_phone_area
    to: Living room
    id: enter
  - platform: state
    entity_id:
      - sensor.bermuda_phone_area
    from: Living room
    id: leave
condition: []
action:
  - if:
      - condition: trigger
        id:
          - enter
    then:
      - action: script.play_music
        metadata: {}
        data: {}
  - if:
      - condition: trigger
        id:
          - leave
    then:
      - action: script.stop_music
        metadata: {}
        data: {}
mode: single
1 Like

Anyone please? :slight_smile:

I have a couple of those on my pool of devices with Bluetooth Proxy (used by Bermuda) and I haven’t seen any issue so far, but you must be aware of the limitations of an ESP32-C3, as it is single-core, which is totally fine for a relay control, you may face some performance issues when adding more components (and the Bluetooth is far from being light).
I’m pretty sure the firmware from Athom was Arduino based, but with a couple of entries on my plug’s yaml I got it to work with esp-idf, which is definitely recommended in this case.
I can share my yaml tomorrow (I’m on my phone now). I have disable the uptime sensor as they used some string manipulation from Arduino, but if you really wanna that it’s something feasible with a few minutes of work).

1 Like

Cool !

I just want to use the plugs to switch on/off a device (no big consumer) and see how much energy it uses , but also the bluetooth presence on it… nothing more.

I will use it in belgium so i dont think the plug is an issue… (EU) also its safe to use?

I’m in Sweden…
The plug is quite well made. I haven’t opened the device, but it doesn’t looks cheap and worked very well so far. I have it for many months now, using basics (turn on/off and power monitoring) and the Bluetooth proxy.
One is installed in a place with pretty bad wifi, but it is still working fine.

1 Like

cool looking forward for the yaml
I ordered them, so im in the same boat now :slight_smile:

1 Like

There is:

substitutions:
  name: "spa-lights"
  friendly_name: Spa - Lights
  relay_restore_mode: ALWAYS_OFF

packages:
  Athom_Technology.Smart_Plug_V3: github://athom-tech/esp32-configs/athom-smart-plug.yaml

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

esp32:
  framework: 
    type: esp-idf

text_sensor: !remove

time:
  - id: !remove sntp_time
  - id: homeassistant_time
    platform: homeassistant

bluetooth_proxy:

captive_portal: !remove

esp32_improv: !remove

Please note I’ve removed a bunch of things that are not important for my use case. You can certainly try to return some of those if you want.
I would suggest you first adopt your plug using Inprov (it come from factory with that) and then you replace the yaml entirely with whatever is important for you. :wink:

2 Likes

ok thank you a lot, will try it

1 Like

Hi
I just received the plugins.
Now, what should i do? Is this correct order?

  • Install esp home addon in home assistant
  • Add esp home integration in home assistant
  • Plug in the first plug
  • Add it to the integration and see what i get?
  • Then flash the first plug with your yaml by using esp home addon?
  • See if it comes up in HA again?
  • Repeat steps for all plugins
  • Then add the bermuda integration?

Basically, that’s it.
The plugs are delivered with ESPHome pre-flashed, and that implementation includes “Improv”, which will enable you to “Adopt” that device on your ESPHome dashboard… It’s quite straight forward…

Crap think i did something wrong
I added the plug to the wifi
Then i could adopt it inside esp home dashboard (addon)
When i did, it prompted me to update, so i did…
And now its offline… and cant connect to it anymore
Nor do i see its own wifi anymore
Tried to reset it, but still no own wifi and offline

Now what? lol

Edit: fixed it; phew :slight_smile: it was on test wifi ssid

2 Likes

It’s worth pursuing. Bermuda is the best!

2 Likes

Ok just before reflashing the device.
Do i need to add it (the esp32 oplug) to HA integration first and then reflash with correct yaml and then do bermuda integration

OR

Do i flash it, then add it to HA esphome integration and then bermuda

OR do i dont need the HA esphome integration at all?

If i dont add it to the HA integration, i wont have the ability to turn on/off the plug and have the powermeting, right?
AM i correct?
So if i only do bermuda integration i wont have the things esp home integration sensors and stuff right? they dont replace eachother but live side/byside ?

You just need to set up basic ESPHome integration on the ESP32 board.
This has to be flashed once via USB
Once you can do that you then will see it (or add it manually) into ESPHome dashboard
You then add the necessary yaml code to set it up how you want. Via wifi.
If you want it to broadcast itself as a “beacon” for Bermuda you add the specific yaml code found in the BT (Bluetooth) “Beacon” section in HA github and generate a specific BT uuid
You then search for that uuid from the Bermuda integration directly (Configure > select device) and then configure it to the room that you want the beacon in. :grinning:
The BT “beacon” property becomes an additional function on top of what else you have the board doing (sensing, providing a BT proxy, listening for voice or whatever else you have programmed into the YAML) bearing in mind the more you have running the less responsive the board will be…

1 Like

ESPHome is quite friendly, so it’s not that important the order yiu do things as usually you can redo easily. You just have to make sure you don’t brick your switch as these devices are difficult to open if a flash with cable is required. Maybe you should remove that line where captive_portal is removed, as this component may help you if you lose contact between your plug and Home Assistant and ESPHome dashboard. But again, 8f you don’t have that, it still feasible.

I’m not sure, but I think the Improv process you used to adopt the plug will guide you to add an api encryption. My yaml doesn’t encrypt the api.
When you change encryption, the communication to Home Assistant will fail, but you still can access the device via Web or ESPHome dashboard. If that happens, just remove the device integration from Home Assistant and it will detect it again, so you add the device back and it will work.
Again, those plugs are not the best to play as they are hard to open if you mess it up, otherwise I would say to just play and learn in the journey… :wink:

Yeah, i figured that out too
I changed yaml to this, is this ok to flash?

substitutions:
  name: "Woonkamer Plug"
  friendly_name: Woonkamer - Plug ESP32
  relay_restore_mode: ALWAYS_OFF

packages:
  Athom_Technology.Smart_Plug_V3: github://athom-tech/esp32-configs/athom-smart-plug.yaml

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: "ESP32 Fallback Hotspot"
    password: !secret esp32_ap_password

esp32:
  framework: 
    type: esp-idf

text_sensor: !remove

time:
  - id: !remove sntp_time
  - id: homeassistant_time
    platform: homeassistant

bluetooth_proxy:

captive_portal:

esp32_improv: !remove

You probably will have an issue with that captive_portal line, as that is already defined in the remote package, so just remove that line entirely.
Also, esp32_improv maybe beneficial if something goes wrong. If you wanna keep that, just remove that line with the command to remove it.

Ok so things were working great for about 2 -3 weeks, then all of a sudden my beacon sensors (the Shelly and ESP32 devices I have set up trilaterally in the corners of each room) keep swapping out of the room I have dedicated them to in HA, to a room next door…

I have 4 rooms with BT Beacons installed. All on the one floor.

This is not just the apple watch not being stably detected in the appropriate room - this is the beacons themselves “moving”

Is there a setting in Bermuda that absolutely fixates an ESP32 device you have set up as a stable uuid beacon to always be located in a set room. To stop a beacon itself wandering?

I tried a reboot of HA - didn’t work

I have disabled the integration for now until a fix (yes pun intended) is done

Anybody know what could be going on?

Thanks