Esp32 BLE tracker adds 6314 devices for one week!

I launched BLE tracker on my esp32 device

For one week more that 6300 BLE devices have been added to known_devices.yaml!

All devices without names, only MAC addresses, example:

93_ef_61_34_a4_11:
  name: 93-EF-61-34-A4-11
  mac: BLE_93:EF:61:34:A4:11
  icon:
  picture:
  track: true

What the heck?
I live in a big city. Is it real new devices or this is a bug ?
If this is real devices, how to restrict adding new devices by rssid value or you have another idea?

here’s my config for build:

packages:
  esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/esp32-generic.yaml@main
esphome:
  name: esp32-bluetooth-proxy

logger:

captive_portal:

api:
  encryption:
    key: "___________"

ota:
  password: "___________"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.__.__
    gateway: 192.168.__.__
    subnet: 255.255.255.0

web_server:
  include_internal: true
  local: true
  ota: true
  port: 80
  auth:
    username: ___________
    password: ___________

esp32_ble_tracker:
  scan_parameters:
    window: 30ms
    interval: 2600ms
    active: false

bluetooth_proxy:
  active: true

ble_client:
  - mac_address: __:__:__:__:__:__
    id: ocean_x_pro
  - mac_address: __:__:__:__:__:__
    id: ocean_x

sensor:

  - platform: xiaomi_hhccjcy01
    mac_address: '__:__:__:__:__:__'
    temperature:
      name: "Xiaomi Flora Temperature (esp32 ble)"
    moisture:
      name: "Xiaomi Flora Moisture (esp32 ble)"
    illuminance:
      name: "Xiaomi Flora Illuminance (esp32 ble)"
    conductivity:
      name: "Xiaomi Flora Soil Conductivity (esp32 ble)"
    battery_level:
      name: "Xiaomi Flora Battery Level (esp32 ble)"

  - platform: xiaomi_miscale
    mac_address: __:__:__:__:__:__'
    clear_impedance: true
    weight:
      name: "Xiaomi Mi Scale Weight (esp32 ble)"

binary_sensor:

  - platform: ble_presence
    mac_address: __:__:__:__:__:__
    name: "Mi Band 6 CN (esp32 ble)"   

  - platform: ble_presence
    mac_address: __:__:__:__:__:__
    name: "Tile (esp32 ble)"   

  - platform: ble_presence
    mac_address: __:__:__:__:__:__
    name: "Redmi 9T (esp32 ble)" 

  - platform: ble_presence
    mac_address: __:__:__:__:__:__
    name: "Apple Watch (esp32 ble)"  

  - platform: ble_presence
    mac_address: __:__:__:__:__:__
    name: "iPhone Pro Max (esp32 ble)"

  - platform: ble_presence
    mac_address: __:__:__:__:__:__
    name: "HB03 1 Tracker (esp32 ble)"

  - platform: ble_presence
    mac_address: __:__:__:__:__:__
    name: "HB03 2 Tracker (esp32 ble)"

  - platform: ble_presence
    mac_address:  __:__:__:__:__:__
    name: "LifeSmart Tag (esp32 ble)"

  - platform: ble_presence
    mac_address:  __:__:__:__:__:__
    name: "Amazfit Band 5 (esp32 ble)"

switch:
  - platform: restart
    name: "ESP32 Bluetooth Proxy Restart"

By default the setting for adding newly discovered devices is activated for integrations. :smiley:
Its under the system options for the integration.

And also check that your devices do not have randomization for Bluetooth mac addresses enabled.
Modern mobile phones have this set as standard.

i can’t find how to do that, could you please help with this?

i turned off before on devices where i found it
but generally makes sense for cases like mine, thanks

I think its the bluetooth_proxy: that does it in combination with an integration like BlueTooth Low Energy Monitor, if you have that installed.
That one have done the same for me in the past.

The option to deactivate newly discovered devices automatically is in the 3 dots on the integration page and the System Options.

doesn’t help
new devices keep adding

image

Do you set up the devices in the ESP configuration or do you let HA handle that?

If it happens on the ESP, then you might have to ask in the ESPHome forum.

1 Like