Device Tracker not updateing GPS Location, gecodedlocation does

Is it just me or has request location updates stopped working?
Notification Commands | Home Assistant Companion Docs (home-assistant.io)

A few months ago, when I sent that request I could see on the phone that HA was requesting GPS location in the notifications menu.
Now nothing happens, not even the actual GPS update.
It could be my phone, it’s getting so slow it can hardly use Waze anymore. I just want to know if this is just an issue I have or if it actually has stopped working?

Try checking the logs you should see the notification come in then a location update in a few seconds

I can see it in the log.
And it actually works now.
It has not worked earlier.
I mean if I use Waze and have GPS position fixed, sending this request should make the position update immediately, right?
That has not happened in the past. Let’s see what happens when I drive home from work today.

Thank you for the hint about the log, didn’t know that was visible there.

Yea so we actually had a bug about passively received location requests that was fixed in a beta build and pushed out with 2021.1.1 release so it should update as n eeded.

Yea we added a lot of logs to help users see the decision making process to adjust the settings to their liking if they need to.

Much better!
image

I made an automation in node red during the day that detected my status if it was in_vehicle and phone was charging then it requested a new update every 15 seconds I believe.
That made a big difference…

Ok I’m not going to be able to check this for a few days. My job is keeping me in the same lockdown location for 3 more days, so it seems even though the system receives an update, it’s not sending it to HA. My wife usually travels miles away from home, but her app displays the lat/long of our house for days on end while she’s out every day. I’ll have to troubleshoot her phone and mine when I’m out of here and can actually leave the area.

01-19 09:34:03.464 19991 19991 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
01-19 09:34:03.464 19991 19991 D LocBroadcastReceiver: Received location that is 14 milliseconds old, 1611081243450 compared to 1611081243464 with source fused
01-19 09:34:03.464 19991 19991 D LocBroadcastReceiver: Duplicate location received, not sending to HA
01-19 09:34:03.484 19991 19991 D LocBroadcastReceiver: Received location update.

EDIT: At least now I know the companion app doesn’t send a new location when it’s the same as the old, which makes sense. That means my phone might be working correctly because for the last week I’ve been traveling from lockdown hotel to lockdown hotel. As far as I recall, it correctly updated my location at least once each time in every new city. That means I might have been chasing my tail learning to use adb logcat (the Play Store logcat reader barely shows any logs compared to the thousands of lines adb logcat generates). At least it’s giving me something to do while staring at the walls :slight_smile:

When I leave I’m two-hopping home. I’ll try to check HA at each airport and my house to see if it seems to be keeping up with me.

I have checked a few times, i have also removed the integration and add back. Issue persists.

It seems that the gps location is updated. However, device tracker just set my location as unknown.

if you feel you have an issue check the logs as previously mentioned.

Just to close the loop here, my phone doesn’t actually have a problem. Yesterday I went from the hotel to three different airports then home. Oddly the last updated time under my name didn’t change (ie, it said last updated 10 hours ago when I landed from my first 6-hour flight), but the location on the map was correct. I’m now turning my attention to my wife’s 1+5T, which I’m assuming is battery optimization.

if you add a map card to lovelace then you can add history also, that way you can see how many times it records new locations

Are you sure that’s the correct integration? Maybe try clearing data and start over in the app. Something is not right there. Check the docs for the steps to reset the app properly and start fresh.

Will try that.

Issue resolved after i revert to last known working snapshot and upgrade straight to 2021.1.7. Thank you for your help.

:flushed:Ok, so when you setup the Companion App, using the externally available IP is probably the way to go. I had my wife’s 1+5T on a local IP address, and surprisingly it never updated when away. I have it set to the correct address now and will check to see if her app updates.

EDIT: Even with the proper server entry, her app shows Home even though she’s been away over an hour. I had her open the app and leave it for a few minutes in case that would force an update, It’s still showing her home and the last location update 2 days ago. To make matters more complicated, an unrelated error caused us to factory reset the phone 3 days ago. Since then I haven’t had a chance to run through the troubleshooting steps to ensure the permissions and location are 100% correct. I’ll try to do that when I can get my mitts on it again.

I just restarted the server, and now her location shows it was updated 58 seconds ago, but still home instead of where she is. Clearly a location error on her phone I need to troubleshoot.

Rebooting HA server does not magically get the app to send a location update. All you see is that the entity was added back to HA.

definitely double check all the location troubleshooting steps.

Keeping this updated in case it helps anyone else. I followed the troubleshooting steps for her phone. All required permissions and settings were already in place. We went out tonight, and I opened the app on her phone 3 or 4 times in case that would force a location update. My phone showed me away within a few minutes, but hers was still at home after 3 hours.

I captured some logs with logcat and read the homeassistant entries, but I didn’t find anything that looked like the location was being captured or failing.

I decided to start over with this phone by clearing the app storage/cache and deleting the phone from the integration. I setup the HA app again and made sure the permissions/location steps were correctly completed. I re-added the tracker to her person in HA, and it immediately had a GPS location at home. Time will tell if it detects when she leaves the house next time.

You can also disable and then enable the background location sensor while watching logcat to see the home assistant entries.

You should see the following log lines

followed by:

Then a few minutes later you should see the same log lines appear that you posted earlier Device Tracker not updateing GPS Location, gecodedlocation does - #44 by tanderson1992

Hi,
I tried to use script, but I get a NoneType error at line 6. Seems like inputStateObject.attributes cannot return anything.
Can you help me out?

Seeing this problem on iOS now too. Only on one device. Can’t figure out what’s going on and how to get this functionality back. No matter what, I’m stuck “away” :frowning:

Sorry to bump this relatively old thread but I am also experiencing this issue.

I have only setup Home Assistant this week (running on a VirtualBox VM) and everything is working perfectly. The Android app is installed on both my and my wife’s phones with all location stuff enabled. Despite being at work all day, both phones are showing Home constantly. Re-installing the app or rebooting the server don’t resolve the issue unfortunately.

Geocoded location is being reported accurately.