Device Tracker not updateing GPS Location, gecodedlocation does

if your location si being sent then you are probably not looking at the right device tracker entity, unless of course there is an error on the HA server logs.

I just realized something. How can device tracking work when outside the home wifi range? The phone simply can’t communicate with HA to update its location…

I assume I need to setup an external url as well. Weird that the documentation doesn’t seem to explicitely mention this. Unless I completely missed it somewhere.

1 Like

its one of the first things mentioned in the docs getting started page

Shame on me. I started troubleshooting at the wrong place :man_facepalming:

Complete HA beginner here so apologies if this question has an obvious answer. But is it necessary to set up port forwarding like stated in the docs in your reply if you’re using HA cloud?

If you mean Nabu Casa then no.
It shouldn’t be needed.

But you need to make sure the app has the external URL of your HA.
Meaning when you visit Nabu Casa to log in and successfully have your Lovelace in front of you the URL up to nabu.casa is what you need to enter in the app as external URL.

1 Like

@dshokouhi I just had an idea regarding this.

In HA config cloud:

The Nabu Casa URL is visible.
What if when you connect with the app to the local URL, the app retrieves the external URL from this and saves it in the app?
That would make it all work very seamless

Do you have that url configured as an external url in HA core? I believe you set it under general.

I had to check. But yes I have that.
My thought was to get a nice onboarding of the app where everything just happens in the background.

As far as I remember, last time I reinstalled the app I had to add the URLs in the app manually.
Perhaps I didn’t have to but I just assumed and did it because I knew how it worked.
But I just thought if you’re new and have no clue, opening the app to homeassistant.local and then it automatically gets the internal/external URL somehow would be a nice onboarding feature.

we do indeed store the cloud URL if its given to the app by HA core. I believe the URL needs to be active when you login.

When a user is at home and they install the app we perform discovery so all they do is select their instance, login and then HA core will send us the data if it has it. I did this for my parents when I setup HA for them and it worked.

Ok. Perhaps my last install was before this code.
Good work! :+1:

Android 12 on Samsung S21
Companion app ver.: beta-1970-b7f6a732-full
Same issue: device_tracker is not updating, but sensor._geocoded_location is updated.
All steps from this post are done. Nothing has changed.

What about the logs from the post? That’s still part of the steps :wink:

I don’t see any logs with LocBroadcastReceiver :confused:

Even if you force stop the app and reopen?

Yeah, same thing.

Then try these Troubleshooting | Home Assistant Companion Docs and then get the logs if it fails. There is definitely some registration going on so you might be missing it in the logs.

Same thing on Samsung s10e after android 12 update

Hmmm this a weird issue, same here since some days, Geo_code location works fine, but no device tracker update, what means i am 24 hours at home and lots of automations not working :frowning:

Hi everybody, I had the same issue on a S10 after updating to android 12.

I don’t know how does it come from but the sensors in companion app were disable. I just had to enable does again and it came back to normal.
Step to follow go into home assistant in > configuration > application companion > manage sensors > search for location sensor and activate those again.

Hope this will work for you as well

Regards