Home Assistant Android version:
2.2.1-29-g5ee23a7-303-full
Android version:
9
Phone model:
Motorola G7 Plus
Home Assistant version:
0.114.4
Last working Home Assistant release (if known):
Description of problem:
As a continue of #698.
I've just built the latest master to check if the location issues are fixed. I've upgraded from 2.0.0-3-g11982f9-238-full to 2.2.1-29-g5ee23a7-303-full.
When using the old version, location updates were received every 2-3 minutes if the app is opened in the background or every 15 minutes (sensors update interval) if the app is closed.
After some time the opened app stopped receiving location updates. This is pretended to be fixed by commit 63ded1a1d35b75adf7fa6cbeaf217947c802c0cd Hopefully fix the background location updates randomly stopping.
Now I'm using the latest version and what I see..,
Location updates are received exactly every 15 minutes (sensors update interval) and not more often irrespective of that the app is opened or closed. Or on forced sensors update (charger connection, bluetooth connection and so on). Location updates every 2-3 minutes are gone.
Is this a bug or am I missing something?
BTW, as I see from the log, on the app opening the location sensor update is requested multiple times:
08-27 16:03:22.170 6734 6780 D LocBroadcastReceiver: Registering for location updates.
08-27 16:03:22.173 6734 6820 D LocBroadcastReceiver: Removing all location requests.
08-27 16:03:22.180 6734 6780 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:03:22.187 6734 6820 D LocBroadcastReceiver: Registering for location updates.
08-27 16:03:22.191 6734 6820 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:03:22.192 6734 6821 D LocBroadcastReceiver: Removing all location requests.
08-27 16:03:22.194 6734 6824 D LocBroadcastReceiver: Removing all location requests.
08-27 16:03:22.204 6734 6821 D LocBroadcastReceiver: Registering for location updates.
08-27 16:03:22.204 6734 6824 D LocBroadcastReceiver: Registering for location updates.
08-27 16:03:22.210 6734 6824 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:03:22.212 6734 6821 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:03:23.347 6734 6821 D LocBroadcastReceiver: Removing all location requests.
08-27 16:03:23.353 6734 6780 D LocBroadcastReceiver: Removing all location requests.
08-27 16:03:23.356 6734 6821 D LocBroadcastReceiver: Registering for location updates.
08-27 16:03:23.358 6734 6780 D LocBroadcastReceiver: Registering for location updates.
08-27 16:03:23.362 6734 6821 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:03:23.362 6734 6780 D LocBroadcastReceiver: Registering for zone based location updates
And even on the scheduled sensors update it is requested twice:
08-27 16:18:24.211 6734 6780 D LocBroadcastReceiver: Removing all location requests.
08-27 16:18:24.218 6734 6780 D LocBroadcastReceiver: Registering for location updates.
08-27 16:18:24.219 6734 6820 D LocBroadcastReceiver: Removing all location requests.
08-27 16:18:24.224 6734 6820 D LocBroadcastReceiver: Registering for location updates.
08-27 16:18:24.227 6734 6820 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:18:24.231 6734 6780 D LocBroadcastReceiver: Registering for zone based location updates
Can't be there some kind of race condition because of that?
The full log is below. The app was opened at 16:03 and kept running.
Traceback (if applicable):
08-27 16:03:22.170 6734 6780 D LocBroadcastReceiver: Registering for location updates.
08-27 16:03:22.173 6734 6820 D LocBroadcastReceiver: Removing all location requests.
08-27 16:03:22.180 6734 6780 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:03:22.187 6734 6820 D LocBroadcastReceiver: Registering for location updates.
08-27 16:03:22.191 6734 6820 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:03:22.192 6734 6821 D LocBroadcastReceiver: Removing all location requests.
08-27 16:03:22.194 6734 6824 D LocBroadcastReceiver: Removing all location requests.
08-27 16:03:22.204 6734 6821 D LocBroadcastReceiver: Registering for location updates.
08-27 16:03:22.204 6734 6824 D LocBroadcastReceiver: Registering for location updates.
08-27 16:03:22.210 6734 6824 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:03:22.212 6734 6821 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:03:23.130 6734 6734 D LocBroadcastReceiver: Got single accurate location update: Location[fused 55,637364,37,357052 hAcc=58 et=+19h2m41s167ms alt=201.90000915527344 vel=0.1477595 bear=189.81027 vAcc=2 sAcc=1 bAcc=??? {Bundle[mParcelledData.dataSize=52]}]
08-27 16:03:23.130 6734 6734 D LocBroadcastReceiver: Location accurate enough, all done with high accuracy.
08-27 16:03:23.130 6734 6734 D LocBroadcastReceiver: Last Location:
08-27 16:03:23.130 6734 6734 D LocBroadcastReceiver: Coords:(55.6373635, 37.3570516)
08-27 16:03:23.130 6734 6734 D LocBroadcastReceiver: Accuracy: 57.53
08-27 16:03:23.130 6734 6734 D LocBroadcastReceiver: Bearing: 189.81027
08-27 16:03:23.347 6734 6821 D LocBroadcastReceiver: Removing all location requests.
08-27 16:03:23.353 6734 6780 D LocBroadcastReceiver: Removing all location requests.
08-27 16:03:23.356 6734 6821 D LocBroadcastReceiver: Registering for location updates.
08-27 16:03:23.358 6734 6780 D LocBroadcastReceiver: Registering for location updates.
08-27 16:03:23.362 6734 6821 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:03:23.362 6734 6780 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:03:23.537 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:03:23.537 6734 6734 D LocBroadcastReceiver: Last Location:
08-27 16:03:23.537 6734 6734 D LocBroadcastReceiver: Coords:(55.6373635, 37.3570516)
08-27 16:03:23.537 6734 6734 D LocBroadcastReceiver: Accuracy: 57.53
08-27 16:03:23.537 6734 6734 D LocBroadcastReceiver: Bearing: 189.81027
08-27 16:03:23.539 6734 6734 D LocBroadcastReceiver: Got single accurate location update: Location[fused 55,637364,37,357052 hAcc=58 et=+19h2m41s192ms alt=201.90000915527344 vel=0.1477595 bear=189.81027 vAcc=2 sAcc=1 bAcc=??? {Bundle[mParcelledData.dataSize=52]}]
08-27 16:03:23.539 6734 6734 D LocBroadcastReceiver: Location accurate enough, all done with high accuracy.
08-27 16:03:23.540 6734 6734 D LocBroadcastReceiver: Last Location:
08-27 16:03:23.540 6734 6734 D LocBroadcastReceiver: Coords:(55.6373635, 37.3570516)
08-27 16:03:23.540 6734 6734 D LocBroadcastReceiver: Accuracy: 57.53
08-27 16:03:23.540 6734 6734 D LocBroadcastReceiver: Bearing: 189.81027
08-27 16:03:23.603 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:03:23.612 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:03:23.612 6734 6734 D LocBroadcastReceiver: Last Location:
08-27 16:03:23.612 6734 6734 D LocBroadcastReceiver: Coords:(55.6373635, 37.3570516)
08-27 16:03:23.612 6734 6734 D LocBroadcastReceiver: Accuracy: 57.53
08-27 16:03:23.612 6734 6734 D LocBroadcastReceiver: Bearing: 189.81027
08-27 16:03:23.629 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:03:23.636 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:03:23.640 6734 6734 D LocBroadcastReceiver: Last Location:
08-27 16:03:23.640 6734 6734 D LocBroadcastReceiver: Coords:(55.6373635, 37.3570516)
08-27 16:03:23.640 6734 6734 D LocBroadcastReceiver: Accuracy: 57.53
08-27 16:03:23.640 6734 6734 D LocBroadcastReceiver: Bearing: 189.81027
08-27 16:03:23.649 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:03:23.661 6734 6780 D LocBroadcastReceiver: Removing all location requests.
08-27 16:03:23.680 6734 6780 D LocBroadcastReceiver: Registering for location updates.
08-27 16:03:23.691 6734 6780 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:03:23.811 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:03:23.811 6734 6734 D LocBroadcastReceiver: Last Location:
08-27 16:03:23.811 6734 6734 D LocBroadcastReceiver: Coords:(55.6373635, 37.3570516)
08-27 16:03:23.811 6734 6734 D LocBroadcastReceiver: Accuracy: 57.53
08-27 16:03:23.811 6734 6734 D LocBroadcastReceiver: Bearing: 189.81027
08-27 16:03:23.830 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:03:23.837 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:03:23.837 6734 6734 D LocBroadcastReceiver: Last Location:
08-27 16:03:23.837 6734 6734 D LocBroadcastReceiver: Coords:(55.6373635, 37.3570516)
08-27 16:03:23.837 6734 6734 D LocBroadcastReceiver: Accuracy: 57.53
08-27 16:03:23.837 6734 6734 D LocBroadcastReceiver: Bearing: 189.81027
08-27 16:03:23.843 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:03:23.903 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:03:23.904 6734 6734 D LocBroadcastReceiver: Last Location:
08-27 16:03:23.904 6734 6734 D LocBroadcastReceiver: Coords:(55.6373635, 37.3570516)
08-27 16:03:23.904 6734 6734 D LocBroadcastReceiver: Accuracy: 57.53
08-27 16:03:23.904 6734 6734 D LocBroadcastReceiver: Bearing: 189.81027
08-27 16:03:23.921 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:03:24.070 6734 6734 D LocBroadcastReceiver: Got single accurate location update: Location[fused 55,637364,37,357052 hAcc=58 et=+19h2m42s124ms alt=201.90000915527344 vel=0.1477595 bear=189.81027 vAcc=2 sAcc=1 bAcc=??? {Bundle[mParcelledData.dataSize=52]}]
08-27 16:03:24.070 6734 6734 D LocBroadcastReceiver: Location accurate enough, all done with high accuracy.
08-27 16:03:24.071 6734 6734 D LocBroadcastReceiver: Last Location:
08-27 16:03:24.071 6734 6734 D LocBroadcastReceiver: Coords:(55.6373635, 37.3570516)
08-27 16:03:24.071 6734 6734 D LocBroadcastReceiver: Accuracy: 57.53
08-27 16:03:24.071 6734 6734 D LocBroadcastReceiver: Bearing: 189.81027
08-27 16:18:24.211 6734 6780 D LocBroadcastReceiver: Removing all location requests.
08-27 16:18:24.218 6734 6780 D LocBroadcastReceiver: Registering for location updates.
08-27 16:18:24.219 6734 6820 D LocBroadcastReceiver: Removing all location requests.
08-27 16:18:24.224 6734 6820 D LocBroadcastReceiver: Registering for location updates.
08-27 16:18:24.227 6734 6820 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:18:24.231 6734 6780 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:18:24.439 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:18:24.441 6734 6734 D LocBroadcastReceiver: Last Location:
08-27 16:18:24.441 6734 6734 D LocBroadcastReceiver: Coords:(55.6373635, 37.3570516)
08-27 16:18:24.441 6734 6734 D LocBroadcastReceiver: Accuracy: 57.53
08-27 16:18:24.441 6734 6734 D LocBroadcastReceiver: Bearing: 189.81027
08-27 16:18:24.445 6734 6734 D LocBroadcastReceiver: Got single accurate location update: Location[fused 55,637364,37,357052 hAcc=58 et=+19h17m42s527ms alt=201.90000915527344 vel=0.1477595 bear=189.81027 vAcc=2 sAcc=1 bAcc=??? {Bundle[mParcelledData.dataSize=52]}]
08-27 16:18:24.446 6734 6734 D LocBroadcastReceiver: Location accurate enough, all done with high accuracy.
08-27 16:18:24.446 6734 6734 D LocBroadcastReceiver: Last Location:
08-27 16:18:24.446 6734 6734 D LocBroadcastReceiver: Coords:(55.6373635, 37.3570516)
08-27 16:18:24.446 6734 6734 D LocBroadcastReceiver: Accuracy: 57.53
08-27 16:18:24.446 6734 6734 D LocBroadcastReceiver: Bearing: 189.81027
08-27 16:33:39.918 6734 6780 D LocBroadcastReceiver: Removing all location requests.
08-27 16:33:39.924 6734 6780 D LocBroadcastReceiver: Registering for location updates.
08-27 16:33:39.927 6734 6820 D LocBroadcastReceiver: Removing all location requests.
08-27 16:33:39.928 6734 6780 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:33:39.933 6734 6820 D LocBroadcastReceiver: Registering for location updates.
08-27 16:33:39.938 6734 6820 D LocBroadcastReceiver: Registering for zone based location updates
08-27 16:33:40.159 6734 6734 D LocBroadcastReceiver: Got single accurate location update: Location[fused 55,637364,37,357052 hAcc=58 et=+19h32m58s259ms alt=201.90000915527344 vel=0.1477595 bear=189.81027 vAcc=2 sAcc=1 bAcc=??? {Bundle[mParcelledData.dataSize=52]}]
08-27 16:33:40.159 6734 6734 D LocBroadcastReceiver: Location accurate enough, all done with high accuracy.
08-27 16:33:40.160 6734 6734 D LocBroadcastReceiver: Last Location:
08-27 16:33:40.160 6734 6734 D LocBroadcastReceiver: Coords:(55.6373635, 37.3570516)
08-27 16:33:40.160 6734 6734 D LocBroadcastReceiver: Accuracy: 57.53
08-27 16:33:40.160 6734 6734 D LocBroadcastReceiver: Bearing: 189.81027
08-27 16:33:40.174 6734 6734 D LocBroadcastReceiver: Received location update.
08-27 16:33:40.175 6734 6734 D LocBroadcastReceiver: Last Location:
08-27 16:33:40.175 6734 6734 D LocBroadcastReceiver: Coords:(55.6373635, 37.3570516)
08-27 16:33:40.175 6734 6734 D LocBroadcastReceiver: Accuracy: 57.53
08-27 16:33:40.175 6734 6734 D LocBroadcastReceiver: Bearing: 189.81027
Screenshot of problem:
Additional information:
bug location-tracking