I have been trying in parallel with other projects related to HA, to setup presence detection in my house. I am interested if there are occupants on the property and not in specific rooms of the house.
For this I have the GPS location and the PING but both are unreliable. On my phone GPS works well and I keep it on all the time so for me it works consistently. For my wife however it doesn’t because she switches her GPS off.
The PING detection doesn’t work either because android will stop responding to ping to save battery. So my wife’s phones never get detected that they leave home or that they come home.
I have searched high and low and it appears that the consensus is that presence detection is unreliable or difficult to do.
My question is: Why can’t we use the Home Assistant app on the phone to sort of send some info to the server about the network we are on? Like from time to time tell the server: hey this is my ip now and wifi ssid, bye! Or something like that so that it is the phone that detects the server and not the other way around (since the phone will stop responding to the ping).
Can this be done? Or what is the most reliable way to do presence detection at this point?
I don’t think there is a consensus on this. My presence detection is pretty much rock solid.
I recommend using the composite device tracker custom component so you can use multiple trackers grouped together. Basically, it reports the state of the last tracker that changed. In my case, it works really well.
I have a combination of Bluetooth, Unifi WIFI, ping, Google location GPS, and the Companion app GPS all grouped together with the composite device tracker. I could probably kill off the Google GPS at this point as the app GPS reporting is very reliable for me.
Also Tom pointed out the app also reports the SSID you are connected to with WIFI. You can make a template sensor that detects if you are home if you are connected to your home SSID.
I came across this the other day, I’m only 1/4-1/2 through the post but so far it looks promising. I’m going to pickup a pi zero my next trip to the comp store to try this.
it seemed to me like a consensus from all the searches but I am glad that there is hope for me!
regarding the composite tracker, I read that it needs the known_devices.yaml file. I thought that the usage of this file has been deprecated. Can I still use it?
I have seen this post in my searches! unfortunately, this post needs extra equipment to be setup and also mqtt automations. I don’t want to setup raspberry pis around the house and also I don’t want to rely on pi’s for anything. the SD card corruption due to power cuts makes them very unreliable to me.
all my automations are setup with esphome and I have no mqtts setup. I tried to do it but I couldn’t wrap my head around mqtt so I gave up and settled on esphome
Yes. known_devices.yaml will be created automatically when you set up any trackers that use it. Some device trackers are using the new method, most are not. After it is created you can go back and edit it as necessary.
I had issues with the HA app (on android at least). My location and my wifes location werent being updated at the same time. Sometimes hours apart even though we were together.
I did use owntracks for a bit but it was draining the battery way too fast. and life360 is too expensive really.
I have noticed the same thing with the HA app. I am hoping to use the ssid reporting to check if the phone is home or not. It appears that I have to register all the wifi networks in the house with the phone and then i will make some tests.
found it! turns out that at the beginning when I started with HA, I have renamed the phones somehow somewhere and the wifi connection sensor has a different name. as long as it works i guess!
do i have to enable location by gps in order for these sensors to send updates to the server? i have just started the HA app on my wife’s phone and a popup appeared asking to enable location. her phone is a samsung a5.