Fastest and most precise home/away detection?

Hi all,

Ive been looking for ways to trigger automations as soon as i return or leave the home. I’ve tried GPS which can have long delays if my phone is idle (up to 180 seconds), and i’ve tried the unifi integration to trigger when i connect or disconnect from wifi but i’ve found that i also lags, even when i set the consider away time to only 10 seconds it doesn’t actually update 10 seconds after my phone disconnects from wifi - i suspect this is due to the unifi controller not updating it’s connected device list immediately upon losing a link to my phone.

In your opinion what is the fastest and most precise home/away detection? I’m looking for something that will detect me as home as soon as i pull up on my bike/car but not trigger until i’m within 50-100 feet of my garage, and will detect as away as soon as i’m about 150-200ft from my door.

I was thinking maybe a BLE beacon on my keychain which I always have on me, but i’ve never used BLE beacons and i don’t know what their update interval/refresh rate and accuracy is like.

What other sensors can i use to get ultra fast and precise home/away detection? Without going too crazy… I don’t really want to set up cameras in every square inch of the home and use AI to do check if i’m in any room… At least not until i actually own the home i live in.

From my response to your post on Discord:

  1. Passive home/away is Bluetooth (or WiFi) Connected WiFi sensor of the Android app is also very fast. Using a Zone with the android app should be fast (Location | Home Assistant Companion Docs)

  2. With Android you can also switch it to high accuracy mode to force an update every X seconds, and have that handled by an automation

thank you Tinkerer for helping me on the discord! Using the android app wifi connection sensor made it very accurate and quick!

Now I just need to find a solution for the iPhone user of my household.

I use the home AP (Ubiquiti nano). The Ubiquiti integration triggers a change to connected for any device, Android, Apple or otherwise within milliseconds when in range and connecting.
For me it shows up as a device_tracker.unifi_. I just added under Settings/People/Track Device.

Your AP might generate these too.

Espresense devices are pretty quick and work well with iPhones and Apple Watch. And no need to “coerce” them into running an app on their phone.

1 Like

Can you share your automation code?

Thanks :pray:

i actually found Espresense when i was searching around for a solution. I ordered 3x ESP32 to try it out. Going to set it up this week!

the code Tinkerer helped me with is available on their github, Its all explained on their blog here:

1 Like

i tried the unifi network integration but even when i set the “consider away” threshold to 10 seconds it took minutes to update after i was out of wifi range.

Here’s how to do this with iBeacons: Anyone else experience issues with iBeacons? - #5 by BlueCharmBeacons