I had an iPhone 6s up until recently and was using the bluetooth tracker of Home assistant as a presence sensor.
I never got it working on my wife’s phone but on my phone it worked perfectly, triggered me as away when I drove away, triggered me as home when I was parking my car.
Now, however, I cannot seem to get it working correctly on my new iPhone X. Home Assistant has picked up the device without issue in it’s known devices list. I’ve set it to track, given it a name etc etc. However, Other than that “first encounter” to set it up, it isn’t picking up any state changes anymore.
I managed to make it pick up a change by going into my bluetooth settings and scanning on my iPhone + opening a terminal on my Pi and manually triggering a bluetooth scan.
After I noticed Home-assistant had lost my phone, I rescanned in the terminal but nothing showed up.
Anyone else had similar issues? And were you able to resolve them?
Some additional info:
Yes, my bluetooth is on 24/7
Running on a Pi 3 with the Hassbian setup.
It worked before, the only difference is a different phone
If you would noticed that you have to allow tracking for ios by install home-assistant app in iphone. then this will generated .ios.conf<-- , I cannot remember the name exactly of the file, hidden in home-assistant config folder.
Secondly, you can manually add the device to the known_device.yaml, then you will see in entity_id and you can track home or not home status.
I assumed you already have bluetooth_tracker.py in you home-assistant because they can track your phone.
I have excatly the same issue and haven’t been able to solve it yet. I’ve been using bluetooth tracking with an iPhone 5 with perfect results. Then I’ve migrated to a new iPhone 8 and detection still works flawlessly. However, a week ago I have tried to track my girlfriend’s new iPhone X with no luck. I’ve been able to auto detect it and configuration seems to be ok in known_devices. Home/Not home tracking seems to work well for a while, but after some time it is unable to detect “not home” state.
I have Hass iOS app installed in both devices, but I have the tracking option disabled, for it is not needed by bluetooth tracker in order to work. Only difference between my girldfriend’s setup and mine (beside iPhone model of course), is that I have an Apple Watch. I’m thinking that maybe watch forces the iPhone Bluetooth active, and somehow this is why detection works with my phone. I’m trying to totally remove the watch from iPhone config when I get home and see if the problem appears. If it doesn’t, maybe it’s an iPhone X hardware related problem, or at least the way it handles bluetooth.
After a while trying to detect presence with bluetooth tracker and iPhone X with no success, suddenly it has started working! But I realized that Hass was changing state home/away several times per minute. It seems like bluetooth activates and deactivates very often in order to save battery. So, I have set 180 seconds for “consider_home” parameter in known_devices.yaml and everything is working perfectly know.
Tinkerer
(aka DubhAd on GitHub)
Split this topic
8
I’ve come across this thread while searching for a similar pattern to what is happening to me and bam! your post describes my very same scenario. My iPhone 6s Plus is perfectly tracked by HA whereas my wife’s iPhone 6s isn’t. Both of us are running 11.4. Whatever I do, HA tracks me well, but doesn’t track her at all, and it had worked well for both of us in the past. Have you had any success addressing this specific case?
One small detail that may be relevant: my wife has an Apple Watch linked with her iPhone 6s. I believe smart watches use a specific profile of Bluetooth but I may be wrong. I’m on hassio by the way.
Hello @MrBramme, did you ever managed to sort this out? I’m sort of in the same bot I believe… I just now realised that I did not mention something relevant in my post: HA won’t track my wife’s phone at all during regular usage, but it will track it if the Bluetooth menu is open in the foreground. Can you try that?
A simple sensor that’ll flag me as home if one of the 3 sensors finds me as home. first sensor is owntracks, second is bluetooth & third is nmap. you can read up on the bayesian sensor and play around with it to, for instance, set it to only flag home if 2/3 state that you’re home … but this works for me!
I know it sounds weird, but even when one would point a finger at the iPhone, it turns out the culprit was not my wife’s iphone but an extremely large database of 2GB. After removing the database and starting one anew, I now see my wife’s iphone’s presence.