question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Location updates sometimes way off (100+ km)

See original GitHub issue

Home Assistant Android version: 2.4.0-full

Android version: 11

Phone model: Google Pixel 3a

Home Assistant version: 0.114.4

Last working Home Assistant release (if known): 2.3.3-full

Description of problem: Location updates is sometimes way off. Today I noticed that Home Assistant reported me in a location about 110 kilometers away. According to the logs HA was convinced that I was located there with several location updates with good accuracy during a period of an hour.

The strange location was set at 09:03, and reset to my real location at 09:54.

The only thing that stands out is that altitude, course and vertical_accuracy is all 0. Can it be some sort of IP geolocation update?

Traceback (if applicable):

2020-09-14 06:31:44 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type update_location: {'location_name': '', 'gps': [N.298841, E.206636], 'gps_accuracy': 3, 'speed': 0, 'altitude': 26, 'course': 257, 'vertical_accuracy': 0}
2020-09-14 06:39:53 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type update_location: {'location_name': '', 'gps': [N.298833, E.2066507], 'gps_accuracy': 3, 'speed': 0, 'altitude': 26, 'course': 96, 'vertical_accuracy': 0}
2020-09-14 07:03:11 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type update_location: {'location_name': '', 'gps': [N.6455586, E.0787489], 'gps_accuracy': 56, 'speed': 0, 'altitude': 0, 'course': 0, 'vertical_accuracy': 0}  << started here
2020-09-14 07:15:04 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type update_location: {'location_name': '', 'gps': [N.6455563, E.078735], 'gps_accuracy': 104, 'speed': 0, 'altitude': 0, 'course': 0, 'vertical_accuracy': 0}
2020-09-14 07:23:08 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type update_location: {'location_name': '', 'gps': [N.645557, E.0787459], 'gps_accuracy': 68, 'speed': 0, 'altitude': 0, 'course': 0, 'vertical_accuracy': 0}
2020-09-14 07:23:08 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type update_location: {'location_name': '', 'gps': [N.645557, E.0787459], 'gps_accuracy': 68, 'speed': 0, 'altitude': 0, 'course': 0, 'vertical_accuracy': 0}
2020-09-14 07:23:08 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type update_location: {'location_name': '', 'gps': [N.6455596, E.0787498], 'gps_accuracy': 45, 'speed': 0, 'altitude': 0, 'course': 0, 'vertical_accuracy': 0}
2020-09-14 07:38:01 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type update_location: {'location_name': '', 'gps': [N.6455588, E.0787488], 'gps_accuracy': 32, 'speed': 0, 'altitude': 0, 'course': 0, 'vertical_accuracy': 0}
2020-09-14 07:50:15 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type update_location: {'location_name': '', 'gps': [N.6455517, E.0787404], 'gps_accuracy': 116, 'speed': 0, 'altitude': 0, 'course': 0, 'vertical_accuracy': 0}
2020-09-14 07:50:15 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type update_location: {'location_name': '', 'gps': [N.6455538, E.0787415], 'gps_accuracy': 122, 'speed': 0, 'altitude': 0, 'course': 0, 'vertical_accuracy': 0}
2020-09-14 07:54:16 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type update_location: {'location_name': '', 'gps': [N.6455568, E.0787363], 'gps_accuracy': 92, 'speed': 0, 'altitude': 0, 'course': 0, 'vertical_accuracy': 0}
2020-09-14 07:54:16 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type update_location: {'location_name': '', 'gps': [N.2989235, E.2072265], 'gps_accuracy': 6, 'speed': 0, 'altitude': 41, 'course': 26, 'vertical_accuracy': 12}

Screenshot of problem: 100km

Additional information:

  • App is excluded from battery optimizations and data management.
  • There are no apps running in background except Home assistant, Opera browser and Spotify.
  • Looking up my Google Maps location timeline it never has reported me there.
  • Background location & Zone Location: Enabled.
  • Android Wi-Fi and Bluetooth location scanning: Disabled

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rs443commented, Nov 1, 2020

@dshokouhi I agree! Also I have not seen this issue for a while.

0reactions
dshokouhicommented, Nov 1, 2020

@rs443 I think we may be good to close this one too? On hindsight it may have been a duplicate of #871 based on the fix in #1119

Read more comments on GitHub >

github_iconTop Results From Across the Web

My GPS location is way off from my current location
On your Android phone or tablet, open the Settings app . · Tap Location. · At the top, switch location on. · Tap...
Read more >
Fused location API return wrong location occasionally ...
The locations are over 8000 km apart! This happens repeatedly. This happens for many days after the move. It affects where Google Maps...
Read more >
android - Google Play Service location API returns wrong ...
The Location that you get from the API will have accuracy in meters. ... calculate distance between that two locations, if distance is...
Read more >
Does my location update when I use my phone? - Quora
Showing different location in Find My Friends app can be caused by wrong retrieval of GPS coordinates. ... Off my 1 meter, off...
Read more >
How accurate is the location detection on the iPhone's Find ...
Your GPS accuracy can change by the second. Satellites are flying around the Earth at thousands of miles per hour, so at any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found