Presence detection - but properly?

Greetings,

first I thought, presence detection would be something everyone is doing first, but I’ve already read (and watched) a lot, but still cannot figure it out properly.

My plan was to build a group adding a lot of sensors, like whether my phone is connected to my router, my companion app says my GPS position fits and stuff like that.

Then I read the first (and more) tutorial(s) and they simply add the name of the registered mobile (device_tracker) to the person, combine all persons to a group and when this group reports I would not be at home, it should work.

But my questions is, what does this device tracker do? I mean, what makes it think that I’m at home or away? Are there additional ways to make this detection more robust? I mean, does it makes sense to add more conditions or sensors or…?

Thanks a lot,
Fridolin

This is what I do and it’s been working great for months and months.

This depends on your device. I have mine set up to track both my phone via the companion app and nmap_tracker (or iphonedetect addon, if you use iPhones). The redundancy by tracking two means I get a little bit quicker signal on home vs away changes. To answer your question: the nmap_tracker knows I’m away if my device is no longer on the wifi network; the companion app uses GPS to determine if I’ve left the “home” zone.

I suggest having at least 2 ways to track presence per person, if possible. You don’t need more conditions or sensors.

Thanks a lot for your answer.

I just had to park my car and left my house. Unfortunately, the automation to turn off all lights has not been triggered.
I guess it is because this tracker is just considering the GPS position. When I see the entity itself (development tools), it looks like this:

Entity: device_tracker.sm_g965f_F
 
State: home

State attributes (YAML, optional)
source_type: gps
latitude: 12345
longitude: 12345
gps_accuracy: 12
altitude: 270
course: 0
speed: 0
vertical_accuracy: 2
friendly_name: SM-G965f_F

And my companion app looses connection to my HA, once I leave the house. It’s still on my list to enable access from the outside, so the assistant did not know, that I left. I could have turned on my VPN to let the app talk to the assistant, just to verify my idea, but did not think about it.

So, as you said, it might not be enough to simply add this tracker to the person and I still need to figure out, how to add more ways of detecting presence properly.

Thanks,
Fridolin