Presence by Nutale BLE tag

I have a Nutale BLE tag on my keychain and I want to use it for presence detection. It works very well in Gladys but I can’t figure out how to make it work in HA.

I tried it with the iBeacon add-in and after downloading the log file and searching for “Nutale” I found evidence iBeacon had sniffed out the device but it was not made available as an device or entity.

I installed Bluetooth Proxy on an ESP32 and it seems to be working. Again I downloaded the diagnostics file and searched for “Nutale” and found the string.

Maybe it’s a matter of my expectations. Do I need to somehow write a template or yaml to make that device available to use in automations?

Below is a section from the diagnostics file where I found the string:

{
            "name": "nutale",
            "address": "A4:C1:38:68:75:E8",
            "rssi": -64,
            "advertisement_data": [
              "nutale",
              {},
              {
                "00000900-0000-1000-8000-00805f9b34fb": {
                  "__type": "<class 'bytes'>",
                  "repr": "b'\\xa4\\xc18hu\\xe8\\x16\\x01\\x00\\x01\\x01\\x00'"
                }
              },
              [
                "00000900-0000-1000-8000-0080

There is my Bluetooth proxy apparently scanning periodically for devices:

[08:07:20][C][api:141]:   Address: esp32-bluetooth-proxy-861f60.local:6053
[08:11:24][D][esp32_ble_tracker:273]: Starting scan...
[08:16:24][D][esp32_ble_tracker:273]: Starting scan...
[08:21:24][D][esp32_ble_tracker:273]: Starting scan...
[08:26:24][D][esp32_ble_tracker:273]: Starting scan...
[08:31:24][D][esp32_ble_tracker:273]: Starting scan...
[08:36:24][D][esp32_ble_tracker:273]: Starting scan...
[08:41:24][D][esp32_ble_tracker:273]: Starting scan...
[08:46:25][D][esp32_ble_tracker:273]: Starting scan...
[08:51:25][D][esp32_ble_tracker:273]: Starting scan...
[08:56:25][D][esp32_ble_tracker:273]: Starting scan...
[09:01:25][D][esp32_ble_tracker:273]: Starting scan...
[09:06:25][D][esp32_ble_tracker:273]: Starting scan...
[09:11:25][D][esp32_ble_tracker:273]: Starting scan...
[09:16:25][D][esp32_ble_tracker:273]: Starting scan...
[09:21:25][D][esp32_ble_tracker:273]: Starting scan...
[09:26:25][D][esp32_ble_tracker:273]: Starting scan...

You can probably use the MAC address to track it with your BT Proxy:

Does you iBeacon integration page show any devices and entities?

Something like:

IIRC, by default new entities are set to be ignored so that users in BT-dense locations aren’t inundated with constant discovery messages.

iBeacon shows no entities.
I did allow one which seems to be the UID of mu Nutale.

I went with the idea that my ESP BT Proxy was not setup right.
I reflashed the device. I got it up on the network.
I am having trouble figuring out the yaml.
This doesn’t look useful.

Right now it looks like this is not going to work.

Hoping I can find some cut and paste yaml that maybe with a little tweaking will make this work.

I think I may have this working.
My yaml contains these 2 sections and I don’t know if the first one is needed.

binary_sensor:
  - platform: ble_presence
    mac_address: A4:C1:38:68:75:E8
    name: "David's keys"

esp32_ble_beacon:
  type: iBeacon
  uuid: '00000900-0000-1000-8000-00805f9b34fb'

And now in my list of entities I find the UUID.

The device logs suggest it scans every 20 seconds.
I would be fine with a scan every 5 minutes or so.

[08:23:22][D][esp32_ble_beacon:078]: Setting BLE TX power
[08:23:22][D][esp32_ble_beacon:115]: BLE stopped advertising successfully
[08:23:32][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[08:23:32][D][esp32.preferences:114]: Saving 1 preferences to flash...
[08:23:32][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[08:23:42][D][esp32_ble_beacon:078]: Setting BLE TX power
[08:23:42][D][esp32_ble_beacon:115]: BLE stopped advertising successfully
[08:24:02][D][esp32_ble_beacon:078]: Setting BLE TX power
[08:24:02][D][esp32_ble_beacon:115]: BLE stopped advertising successfully
[08:24:22][D][esp32_ble_beacon:078]: Setting BLE TX power
[08:24:22][D][esp32_ble_beacon:115]: BLE stopped advertising successfully

I would like a friendly name on the UUID
I would like less frequent scanning.

I tool my tag to the bedroom, and then inside a metal box.

This graph of the estimated distance is reflecting the changes.

But the entity seems to be stuck on “10 ft”.

image

This is interesting. :slight_smile: