Unable to get any presence detection method to work

I’ve tried the Home Assistant app. I’ve tried OwnTracks. I’ve tried the Netgear router. I’ve tried Bluetooth. While the tracking device (I’m using my iPhone 8) show up in Home Assistant and is assigned properly to my persona, none of them report me as away. All say I’m home, no matter how many miles away I travel. I don’t know what is wrong. I have followed all of the settings to the letter. I set my zones to 100m. My iPhone is reporting my location accurately on the device.

For each new attempt, I’ve scrubbed the system of all instances, using the docs online. I’ve deleted the known_devices file, removed the mobile_app file. Removed all instances in the entities, integrations, configuration.yaml and personas, rebooted, then started with a new attempt with a new presence tracking method. Is there a persistent file somewhere that I’m missing?

I’m unfortunately close to returning to OpenHab. Does anyone have any guidance what to look for or why nothing seems to work? I’ve spent four days now on this with no luck at all. This is so frustrating.

You have a way for these tracking apps to communicate with your homeassistant instance when you’re away from home so that they can actually tell it this information I take it?

@anon43302295, can you elaborate? Is there a communications layer for, say, OwnTracks, outside of the URL and encryption key setting along with assigning the device tracker to a persona in HA? Doesn’t the app handle that side?

If you’re using an internal address in your owntracks configuration (hassio.local or 192.168.1.200 or whatever) then when you go outside of your wifi owntracks can no longer speak to homeassistant, so therefore it cannot update it that you are away and the most recent update homeassistant has is that you are at home.

What I’m asking is, have you setup a way for it to communicate with homeassistant when you’re not at home?

@anon43302295

I appreciate your help, Marc. This has been incredibly frustrating and I can’t seem to get beyond it. It’s literally stifling all of my other plans for HA.

I reinstalled OwnTracks earlier this afternoon after I read a post that said: “The trick is to use Significant” on the map settings. I reconfigured it for that and took off down the road with my son on the phone and NO LUCK. ARGH!

To your question: When setting up OwnTracks, the integration sets up a web link that includes my local IP address, and an API Webhook, along with an encryption key. Isn’t this supposed to provide the link back to home that you’re referring to? I don’t see any other place to configure something back to home on the app. Should I set something up on HA directly to link these together?

This will be the problem.

Can you access your homeassistant frontend from somewhere that is not connected to your home network? If so how?

Many here use a dynamic dns service like duckdns. So say your current owntracks settings (preferences > connection > host) is

http://192.168.1.200/api/webhook/blah_blah_blah

You would then change the ip address bit to the url you use to access your frontend, something like

https://my_amazing_ha.duckdns.org/api/webhook/blah_blah_blah

If you’re using the nabucasa cloud service I guess there’s something similar but I don’t know what it looks like.

@anon43302295

Marc, HA! You must be very intuitive! You guessed my current internal IP address right off the bat. Now I’ll have to change it in case you’re writing me from a Romanian hacker farm!

I never thought of that. I’ll look into it and try to set something up. It makes complete sense, and could be why NOTHING has worked (the Netgear one I think is something else, as I kept getting a weird error in the pynetgear file when setting it up).

Thanks for the help! I’ll ping you again with the result.

No worries, let me know how you get on. It’s bedtime here in Romania the UK so I’ll check back in the morning :slightly_smiling_face:

1 Like

You can also set up the life360 integration (others are available)
The app tracks your position and if you have a data connection, feeds it back to the life360 servers
You feed ha your life 360 account and password and it (ha) connects to the servers to get your position
It will also get all the family members in your group too
I find it very accurate and consumes far less battery than most other device trackers
This does not need duckdns but that is recommended for many other reasons
Phil, wrote the integration so support is excellent. (though I’ve not actually needed any, it’s that slick)
Caution, I think the app has a minimum home radius of 250 feet (73 metres) I’ve set mine to 120m but you should try to ensure your home zone circles match up

Thanks @Mutt. I really want to get this running and accurate. As I learn this system, I find I go a hundred miles and hour and then hit a giant mud hole. I’m looking forward to figuring this out and get moving again. I’ll check life360. iPhone batteries are crappy enough without taxing them further.

Can I check which documentation you read? Quite surprised that any presence_tracker documentation did not mention about the DuckDNS (addons/duckdns/README.md at master · home-assistant/addons · GitHub). So as suggested earlier, when you read the DuckDNS setup, you would also need to setup a port forwarding in your router. If you are not familiar with that setup, go with NabuCasa (Cloud configuration), it is a paid subscription, but the first month is free. This would give you some time to properly setup DuckDNS

@anon43302295, @Mutt, Thanks much for the advice. It does seem that I missed the port forwarding aspect of remote access (a stupid blindspot on my part). I somehow assumed that with OwnTracks and the Home Assistant apps, phone home functionality was baked in through the cellular network of the phone and apps. I’m giving Life360 a try today as an alternative. OwnTracks still seems a little flaky when reporting back. Last night when I tested the new port configuration, I had to manually publish my location in the app before I flipped to “Away” in HA.

I’m still a bit confused why my Netgear or Bluetooth integrations did not work. The Netgear one kept throwing me error codes in the HA log, and the Bluetooth integration setup some weird conflict with my wireless that kept slowing down and locking up my Raspberry Pi SSH access.

@manju-rn, Some of the device tracking methods don’t mention port forwarding or DNS requirements. The Netgear one I refer to – Device Tracker – doesn’t say anything about it. The OwnTracks one – OwnTracks – doesn’t. The Home Assistant app – Home Assistant Getting Started – does refer to the Remote Access doc – Remote Access – but I must have missed it. None of these excuse my ignorance for remote access. It should have been the first route I investigated. You sometimes get so clouded by your frustration when debugging that the obvious slips by you.

Thanks again for all the help!

1 Like

Yeah, there are so many things obvious that gets slipped :slight_smile: Thats why this community is there to help. Also check the discord (there is a link somewhere in HA page I cannot find handy as of now) where various members are online.

So are you able to get the port forwarding work and does it work? I have not tried Owntracks, but I do often use GPSLogger which uses a webhook to connect to HA and report data. Do check that out. But it is a battery hogger and very unpredictable. I am hoping that the Android app improves the location tracking (it currently works but is as good as GPS logger minus the battery hogging).
For tracking Inside the house I use those iTag buttons to track