I have a problem with presence detection, using the mobile app as device tracker.
My gf left for work today and I spotted on HA that she was still showing as being ‘home’. I checked around to see if she’d left her mobile phone by mistake but she hadn’t. So, to test it I toggled off WiFi on my mobile and I am still showing as ‘home’ too. Checked on the router and we are both showing as disconnected.
I’ve checked which mobile device is being used for each of us and they are named correctly.
Does anyone have any advice as to what could be the problem?
Please have a look first at the following doc. There is a working list that solve most of the problems.
Still, I have the same issue with one of our three mobile divides too, not always, but once in a while. Two devices are exactly the same with the same settings where one is giving problems. Still fingering out what the issue could be with this one device causing problems so now and then.
It’s the phone companion app being used as device tracker as mentioned in my original post. Location is set to always on both devices so I can’t see what the problem is.
I definitely don’t have cloud access but, I assumed the companion app used the router to track a device connection. As I said, it’s always worked fine until the last few days.
Ok. Then use the same magic you used before.
Neither Home Assistant or the companion app will work that way. But if you had some magic working before then keep using it.
Think about it… You are on your wifi network, all is good.
Now you disconnect, how is the app supposed to tell HA on your network that it can’t talk to that it has disconnected?
It can’t know that it has disconnected before the disconnection has happened.
It’s impossible that the companion has worked this way. You must have been using the router device tracker.
Come on… Again, how is it supposed to send location data with it’s mouth taped shut? You need to give them a possibility to talk to each other for it to work.
The docs does not say the phone needs to be on, have reception, in working condition or that your HA server needs to be on, have power and all that either.
The code block is for known devices and that is router tracking.
Maybe I’m missing something here but, surely, the companion app, regardless of cloud/local access will know if the device the app is loaded on is in the zone (i.e.connected to the home WiFi) or not, then updates the status accordingly with no need for cloud access?
In this instance, my gf has left home, her device/companion app is no longer connected to the home WiFi, therefore she should show as Away? Or am I really missing the point?
When you go out of your house, and open the app, does the HA dashboard show up?
In the companion app, do you have enabled the location tracker under the sensors?
In general, when i am getting out of the house, the phone switches to mobile data (so it still has internet connection) and since i have external access enabled to my server, it receives my location from my phone. If that location is inside any zone i have set up, the zone name appears:
But how?
Please look carefully at what you are typing.
Your Home Assistant is not accessible outside the network.
How is the phone, which is no longer connected to the local network, supposed to tell Home Assistant, which it now has no connection to, that it has disconnected from the network?
HA Address is http://192.168.x.x:8123
Dashboard throws up an error
Location tracker is enabled
However, I’ve never had cloud access to HA and until a couple of days ago if I was at home and my gf left the house, checking on the dashboard, her status would show as ‘Away’. I even have an automation to send me a notification when she arrives back home because, I don’t always hear her arriving back when I’m in my home office.
I always assumed, that the status simply changed ‘home’/‘away’ on connection/disconnection to the home WiFi, without need for cloud access.
Very odd! I’m dumbfounded as to why it’s worked absolutely fine previously up until last weekend.
I removed router tracking of the iPhones a couple of years ago because it was causing conflicts and duplications with the companion app device tracking. And I’ve never had cloud access to HA.
I’m even considering going back to a previous back up to check the difference in set up as it may be the only way to resolve this.