ESPresence vs BTProxy/iBeacon

Hi all with the new BT Integrations in the recent iterations of HA, just curious if anyone is now using their ESP 32 boards for ibeacon/ bt proxies for room presence and sensor data?

I currently have mqtt room presence with my ESP32 boards and to be honest it’s not the greatest, but it works okay, so I’m just deciding if I should make the switch and now take advantage of the fact that I can take in sensor/device data with my existing esp32 boards.

Turns out using new the new BT Proxy with iBeacon, has about similar performance as ESPresence, except now, my ESP32 boards can be used to bring in sensor/device data. That some good use of resources!

Looks like I have to create a room presence detector now using the stat and attribute of my iBeacon device (in my case, my Android phone).

Here’s a an example of my phone with iBeacon, as below in the attributes, is the actually ESP32, the last few digits change depending on the which device I’m closest to.

I guess I have to make a sensor with if state that if state is home and source is esp32…-5eb38, then im in room x?

Im looking to make the same switch, so that I can consider adding some other sensors to my ESP32 boards. Right now, I’ve flashed one with ESPHome and left the others on ESPresense. The ESPHome ESP32 has shown up in HA, but no BLE devices are appearing as far as I know, I just have an empty iBeacon integration.

I added the following to the ESP32 yaml.


bluetooth_proxy:
  active: true

esp32_ble_tracker:
  scan_parameters:
    active: true

I also added the bluetooth: entry to the HA configuration.yaml

I don’t have a Bluetooth dongle in the HA machine itself (Docker image on my QNAP NAS). Is that a requirement?

Screenshot 2022-10-21 at 23.30.27
Screenshot 2022-10-21 at 23.30.31

@gadgetbazza that is interesting, I noticed that you don’t have an entity associated with the ESP32 device. For each ESP32 board I have, there is 1 device and 1 entity, perhaps this is why its not pickup any iBeacons?

Once you get that running, it starts pick up the closest iBeacon and lists all their major/minor UUIDs, then once it reaches 10 from the same iBeacon device, it makes it 1 device (automatically).

Once you get that running, then you can try using this sensor below (from this post) as your room presence detector sensor.

noticed the redacted parts will be specific to you and the “esp32-bluetooth-proxy-XXXX” will also be specific to your ESP32 board and its location

    ### Room Presence ##
    - name: "Room Presence"
      unique_id: [redacted]
      attributes:
        friendly_name: "Room Presence"
      icon: >-
        {% set state = "device_tracker.[redacted]" %}
        {% if is_state( state, "home") %}
          mdi:home
        {% elif is_state( state, "not_home") %}
          mdi:home-outline
        {% else %}
          mdi:crosshairs-question
        {% endif %}
      state: >
        {% set source = state_attr('device_tracker.[redacted]', 'source') %}
        {% set mapper = { 
        'esp32-bluetooth-proxy-5eere8': 'Basement Family Room',
        'esp32-bluetooth-proxy-29ercc': 'Family Room',
        'esp32-bluetooth-proxy-5dfga8': 'Bonus Room',
        'esp32-bluetooth-proxy-5fdfg9c': 'Master Bedroom' } %}
        {{ iif( source in mapper.keys(), mapper.get(source), 'Not Home', 'unknown' ) }}

then make a glances sensor like this, based on the above sensor

image

Hmm, I just removed it from HA and re-added it, still no entity. What entity do you have showing? Remembering that I’ve not added any sensors to my ESP32, just merely setup bluetooth proxy and blue tracking thus far?

oh, perhaps you have “adopt it”

If you open ESPhome, it will show up but there should be a button to adopt, do you see that? IF you do, press it and it will reflash the board with software (take about 3 minutes).

Hmm, didn’t see anything about the adopt option. I did already flash the board using the ESPHome dashboard.

Having said that I have devices that have shown up under iBeacon today, so not 100% sure why they weren’t there initially.

Now I just need to work out if the ESP_Home BLE Tracker is able to constantly identify Apple devices like the ESPresense image does… Anyone know?