Skip to content

Bluetooth tracking#964

Open
marcusds wants to merge 20 commits intoleikoilja:masterfrom
marcusds:bluetooth_irk_tracking
Open

Bluetooth tracking#964
marcusds wants to merge 20 commits intoleikoilja:masterfrom
marcusds:bluetooth_irk_tracking

Conversation

@marcusds
Copy link
Copy Markdown

This builds on #891

  • Fixes some issues with newer versions of HA
  • Fixes issues with BT devices never being marked away
    • This is kind of hacky, but we have to a clear and then start a new scan to do so
    • Adds a last seen attr to help with this
  • IRK scanning does not appear to be working
    • This is a big issue. The code seems to be working properly, but I haven't seen a single match from 2 different phones.
    • It seems like the GH's just aren't returning mac's that are random?
    • I am hoping someone else can look into this and see if there is anything I'm missing.
  • Validate IRKs on add
  • Normalize MACs to allow for multiple formats to be entered

Lash-L and others added 20 commits August 7, 2025 00:56
This reverts commit 73165f9.
…then checking the results.

The timeout on the start scan command is actually how long to scan for, so really longer is actually better. But I don't know if there is issues with having it run forever.

The other problem is that you either have it set to clear_results or not, if false it never clears out devices that are no longer visible which doesn't work cause we can't tell if a device is gone. But if its true a device if it misses one scan it will go unavailable right away and might not show up a while later. So to solve this I do a clear_results every minute. But I am also using last_seen to not set a device as gone until that point. I could probably just do the last_seen, but I think both together seems safer at least to start.
…then checking the results.

The timeout on the start scan command is actually how long to scan for, so really longer is actually better. But I don't know if there is issues with having it run forever.

The other problem is that you either have it set to clear_results or not, if false it never clears out devices that are no longer visible which doesn't work cause we can't tell if a device is gone. But if its true a device if it misses one scan it will go unavailable right away and might not show up a while later. So to solve this I do a clear_results every minute. But I am also using last_seen to not set a device as gone until that point. I could probably just do the last_seen, but I think both together seems safer at least to start.
…then checking the results.

The timeout on the start scan command is actually how long to scan for, so really longer is actually better. But I don't know if there is issues with having it run forever.

The other problem is that you either have it set to clear_results or not, if false it never clears out devices that are no longer visible which doesn't work cause we can't tell if a device is gone. But if its true a device if it misses one scan it will go unavailable right away and might not show up a while later. So to solve this I do a clear_results every minute. But I am also using last_seen to not set a device as gone until that point. I could probably just do the last_seen, but I think both together seems safer at least to start.
@leikoilja
Copy link
Copy Markdown
Owner

@KapJI , do you have a capacity to help with the review here?

@marcusds
Copy link
Copy Markdown
Author

@Lash-L Were you able to successfully test IRK based tracking in your PR? Its not working for me and would appreciate any guidance.

@Lash-L
Copy link
Copy Markdown

Lash-L commented Aug 15, 2025

@Lash-L Were you able to successfully test IRK based tracking in your PR? Its not working for me and would appreciate any guidance.

I'm pretty sure i did, as I did most of my testing with my iphone. I can't remember what i did and it has been so long I am not familiar with the code anymore though, so I don't think i would be much help.

@milandzuris
Copy link
Copy Markdown

Something new?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants