Easiest Presence Detection?

Owntracks with iBeacons works like a dream… however they are removing beacon support from the android version soon, hence why I am now looking at the bluetooth tracker combined with Netgear (Orbi) and Monitor (I hope) and GPS Logger and maybe all wrapped up in a Bayesian sensor.

I want it to mark us home before we open the front door, so hall lights come on when dark etc… so a RPi zero (wired not wireless) with HASSIO an BT tracker, and MQTT statestream to my main HA

Just to jump in again, As you can see there are a lot of opinions on here as to what is the easiest presence detection. Easiest is not necessearily the “best”, or 100%. It takes some work and probably multiple detectors to get closer to 100%, and even then you’ll probably still only get 98%.

But, it looks to me that are still kind of new and begining to learn, so focus on one “win” at a time.

Get ANY presence detector working, even if its only 90%, it will teach you how presence sensors work, and how to create a simple lighting automation, which I think is all you’re looking to do at this time.

After you get that working, then you can decide if you want to set up multiple RPIs, or different custom trackers, etc.

I have to say that for me, this iPhone detection has bee working really well.

Both my wife and I have iPhones, and I’ve combined that with Bluetooth tracker, NMAP, Ping and UDP. I also have a FingBox that does a great job tracking what’s online. So I ave created a Baysian sensor to combine all of them and haven’t had any issues for presence.


Hi @berniebl, how do you get the info from the FingBox?

I followed this guide, this is another setup that has worked flawlessly.

I am using MQTT with Zanzito for a long time now, very happy with it!

1 Like

Thanks for the info.
I looked at this thread before and although I like the fact that it tracks all devices (and not just the wireless ones as my Unifi Controller does) I did not want to go through this complicated workaround - plus, it’s yet another ‘cloud’ solution.

QQ, though:
How long does it take for the device state to change to e.g. not_home in your UI as soon as you’re off your LAN/Wifi?
I know the FingBox has a setting where you can determine how quickly it considers you to be offline (‘State change timeout’) but how much does the sending and receiving of the email and recognition time add on top of that.

I believe, leave it to a connected wifi if I am home or not is simply not a good solution. If my phone e.g. restart e.g. because of an upgrade and I am off the wifi for a minute, then the lights would turn off in the house, because “I am not at home”?

A presence detection I just posted above is much better. It can tell not just if you are home or away based on the location of your phone but even if you are getting close to home from somewhere…

I have a Samsung Galaxy S7 and I’m not under any threat to have this phone upgraded any time soon :cry:

I am not sure that I would consider fetching information from your email a ‘cloud’ solution per se. It’s pretty much the same as getting your calendar information from Google. It looks a little more complicated on paper than it is to implement. I found it pretty easy to setup.

Response if very quick in my opinion. I have my delay in Fingbox for 3 minutes, as soon as this gets triggered I receive an email and within seconds it picks up the change. Works very well

Thanks - seems to be working quickly then, I am impressed.

I’d still take the liberty to consider a solution that relies on reading emails from a Google IMAP-server a cloud solution, though.

Although the interface is very clunky, I like Zanzito and use it for testing when I set up something new that relies on MQTT.

But I don’t need to / want to track anything else than home vs. not_home and I hate having ports open on my router with a vengeance - so Zanzito would not be my first choice.

So, it depends very much on what the OP wants to do with presence tracking (just home vs. not_home or more detailed info) and how comfortable they are with opening ports on their router.

@ptdalen Could you please share on github or pastebin also for the rest of the code.


And some automations built on that

Sure. Here is my repository

1 Like

Thanks a million!!! Now im trying your solution :slight_smile:

1 Like

Oops, sorry, I didn’t realize it was an ancient post. The dangers of using the google now feed; sometimes it thinks you want/need to see old stuff, and you don’t even realize it before it’s too late.

Just to add, and echo a bit, the best is likely many different ones.

Currently, I’m using a combination of:

  • Life360 (all phones)
  • Google maps (my phone)
  • iOS device tracker (the iPhone users)
  • Ping (all phones, but due to iOS device putting wifi to sleep, I’ve set it so ping can only determine that someone is home, a “away” in a ping tracker does nothing)

I set them all up in an appdaemon app (heavily inspired by an app by arsaboo, but modified to suit my needs better). It prioritized sources, and updates the “meta tracker” in a way that makes sense. And you can easily add more trackers, or change how you want a specific tracker to report/behave (like not having the Ping tracker be able to report someone as away).

However, it seems to me that the life360 is the most useful single component (and as luck would have it, the Life360 custom component becomes a home Assistant standard from next release)

Hi, I’m new on HA. I would track presence in my home only using wifi connection. We have all android phones. Ping is the best way to check phones connected to wifi? There are other ways?

Depends on what you have. You can use e.g. Netgear or openwrt if you have those types of routers (one or two other integrations exist as well, brand/OS-dependent).

But ping would be the more “generic”, afaik.

I will say, though, even with Android, ping is not reliable enough as the only thing (for me). At least, I’d set a fairly long timeout (not detected for XX minutes before setting your status to “away”) to avoid false negatives.

Try life360. Fantastic app on your phone and works like a flaw in HA

Yes, tried multiple as well.
Life360 is the best one I tried so far