I have a problem which is affecting a number of areas, but I believe that the root cause is the huge number of device_tracker entities which have appeared. At some point, I think that I enabled the ability to track all new BT devices and this was quickly swamped with hundreds (if not thousands) due to random MACs. It now takes over a minute for the States tab to load in Developer Tools and the option to list entities for integration with Alexa in HA Cloud doesn’t open at all.
On advice, I removed the known_devices.yaml and this has recreated itself cleanly. However, the entities still persist in the DB and I really want to purge them to confirm that this resolves the symptoms I’m seeing. (NB the known_devices file had over 400,000 lines!)
On research I can see that this isn’t the first time that this problem has reared its head, but I could not find a successful solution.
Is anyone able to suggest how I might purge this huge number of redundant entities?
Hi,
i had the same issue with thousands of entries with device_tracker and a MAC address and I can’t use the filter option in Developer Tools > States because the browser gets frozen.
In known_devices.yaml I found that they come from BLE (Blue Tooth Low Energy), but renaming the known_devices.yaml in known_devices.yaml.backup and create a new known_devices.yaml doesn’t help, the entriew where still in the Developer Tools > States.
I deleted the " Passive BLE Monitor integration" in the HACS tab and then the entries in Developer Tools > States also where gone.
At this point Developer Tools > States where real fast again.
Although I disabled the BLE tracking in the configuration.yaml long time ago, the BLE tracking the “Passive BLE Monitor integration” didn’t delete the stored IDs.
I assume that the " Passive BLE Monitor integration" tracked every BLE devices that passed my house outside, mobiles, cars etc from people I don’t know and so I got thousands of the BLE devices.
Seems I have the same problem. Scrolling through my entities I see a lot of device_tracker entities. The count of entities is growing very fast, currently it are more than 70K.
I am using a temperature measuring device connected through a Shelly as Bluetooth proxy, that should be the reason why the integration is active in my installation. Is it possible to repair this problem without removing the integration?
No and no.
Living in a small side street, nearly no unkown traffic nearby, I don’t see reason for more than ten devices an hour for many hours. Didn’t know what iBeacon is until googling. The devices are being added by BLE.
I’ll try removing that integration, maybe re-adding the device later again that needs it. It is not that important, maybe not needed anymore. Thought it would provide support for the Xiaomi thermometer connected via Bluetooth on a Shelly, but it seems there currently is no device marked as created from that integration.
Edit: Hm, the entities are not connected with BLE as source, although I saw that as start of MAC in known_devices.yaml. Strange, and I don’t know how to remove it.
Edit again: Xiaomi BLE is it. This uses BLE, and iBeacon seems to be involved.
I edited known_devices.yaml, removed everything except the first entry, which is my wanted thermometer. Restarted HA, and it is fast again. But it keeps adding BLE entries all the time. Will have a look later, which devices could be nice to track.
Still I am thinking, that some devices rotate bluetooth Mac and in this way generate BLE Mac entries all the time. Devices from outside do not explain this flood. I’ll find out.