if you have an issue then you need to get us yoru logcat, another user cant produce your own error log, you are asking about why its not updating and the answers to help you are in there.
its not a general issue, its an issue to do with a users GPS accuracy which is why we made this a setting, not all users have this issue.
I’m having the same issue on my Pixel 3XL and my wife’s Oneplus 5T. Both are allowed to access location in the background all the time, battery optimization is disabled, minimum accuracy is set at 200. Both device trackers report the last location was 2 days ago, even though I can see HA is updating sensors when I am using the app, and the geocode location (which I understand is different) updates with high accuracy. The time the sensors updated in the last week, the accuracy was < 25, so I think leaving the min at 200 isn’t hurting it. In short, my phones are accurately placed to within 20m, but I can’t get HA to update the sensor more than once a week. The min update time is at the default 1 minute.
How do I go about troubleshooting? It appears I need to install some sort of logcat app to capture the logs to determine what’s going on in the background. Is that correct?
According to the Play Store my Android app 2021.1.1-full is the latest version, and HA is on 2021.1.4. I followed the troubleshooting steps in the documentation, some of which I very generally referenced in my post. I will try clearing the cache and/or uninstalling the app next. If that fails, what is the next step to determine why the location is updating only every few days or so?
I’m having the same issue. I upgraded from version 2020.12.2 to 2021.1.4. No issue previously. I checked the sql and found that the gps info in device tracker entity is now missing. Not sure why.
Anyone else facing the same issue with version 2021.1 4?
Get us the logs from the device. Follow the steps outlined in the following link and when you do a filter add a tag for LocBroadcast (skip the home assistant search mentioned) and make sure to grab about 15-20 min of logs to look at the decision making process. You will see what I am talking about when you see the log statements.
HA core versions are not the same as the android app version. Check the integration screen for the device to see all attached entities, maybe the name changed and you didn’t expect it?
Ensure the app has location permissions granted, all the time. - Done
Ensure that location (GPS) is enabled on your device. - Done
Turn off battery optimizations for the app. - Done
Ensure that all 3 of the Location toggles are enabled in App Configuration > Manage Sensors in the Android app. - Done
Turn on unrestricted data for the Android app. - Done
Check that background access setting under App Configuration shows the app has proper access. - Done
All of those were already enabled. I will read the link you posted and respond here with the logs.
EDIT: I meant to point out that I had to restart HA earlier for the first time in awhile. After that restart both phones updated their location, but they haven’t updated since. Is it possible the error is on the server side and not the app side?
I restarted again, and both phones immediately updated. This seems to point to a server-side issue since the clients are already properly configured. I don’t see any location errors in the logs, just the device_tracker components being setup during startup.
I read your response, and in mine I said I was working on getting you the right logs. In the meantime, since I don’t have the ability to install ADB and enable logcat right this minute, I decided to add additional information that restarting HA immediately updates both phones’ locations. My second reply wasn’t meant to be a reply to you with the correct logs. It’s a reply to myself that I can force location update without touching the app just by restarting HA. Still planning to get the companion logs when I get a chance, maybe tomorrow.
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?
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.
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
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.
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.