Presence detection is always set to home

Hey there,

I’m trying to get some simple presence detection going to get a boolean when someone is home or not. I installed the homeassistant android app on one of my phones and gave it location permission. The app is pointing to a raspberry pie which is only accessible inside the network and I don’t want to expose it to the outside.

My assumption was that as soon as my phone is disconnecting from my network (by disconnecting from the wifi for example) the presence changes to not home. For some reason the status stays at home. Am I doing something wrong or can I configure it somehow to behave this way?

Thanks

If you gave the app location permissions then it will have created a GPS device_tracker for you. When you leave home the gps tracker updates homeassistant with your GPS location.

Unfortunately for some reason you do not allow the app to speak to homeassistant when you are outside of your own network, so the most recent GPS position you have for you is the GPS coordinates of your house, so therefore you are marked as home.

If you don’t want to use GPS tracking, turn it off in the app and disable the sensor in homeassistant.

2 Likes

As @anon43302295 said, if you aren’t going to allow a method of GPS tracking outside of your home, GPS is mostly worthless.

You can use Network/WiFi based tracking instead, though, some implementations are not accurate.

If you’re worried about the trouble (or security) of opening up your network to external traffic, consider the Life360 app and the Life360 Integration in Home Assistant. It’s worked well for me for quite some time.

Have you looked at life360 I have that working and its been quite good and accurate even allows for geofences via zones but I have nabu casa so that might be an issue if you do not

For home/away without remote access, you need to use Bluetooth and/or WiFi based detection.

For example bluetooth_tracker and nmap_tracker, though I prefer monitor for Bluetooth.

I don’t think there is anything the companion app can do for you if you don’t allow it to communicate with your pi from the outside.

The wifi sensor is really great in the app, but that too needs to communicate from the outside when it disconnects.

1 Like

I use the build in device tracker(gps), but it never gets updated… 1 hour ago at last update.

if your device is android, you can follow these steps https://companion.home-assistant.io/docs/troubleshooting/faqs/#device-tracker-is-not-updating-in-android-app if the steps dont work proceed to the logs