I’m creating an integration for a bluetooth device and I’m having some issues with auto-discovery and connecting. Here’s a summary of my woes:
- The device regularly changes its bluetooth address
- The only unique identifier is the local name, ending in 6 characters 0-9A-F
- If Home Assistant is configured for passive scanning, the local name isn’t retrieved
The above makes things quite tricky. If I scan for the device name, it will only ever auto-discover if active scanning is enabled. If I scan for the service UUID, I end up with duplicates in auto discovery because there’s nothing to give to async_set_unique_id.
There’s nothing in the manufacturer data (nRF Connect shows 0x0000) to identify the device and I’m not sure that would be available during passive scanning either.
Does anyone have any tips on the best way to deal with this? Is it a common problem?