I have the HomeAssistant app runing on my Galaxy S10+, and use the data from there for device tracking.
But there seems to be some issues with the updating - and I am not sure why.
Today, I want to a ride in my car - and it seems like the tracking was working very well in one direction, but not the other way (visible on the map as one direction is indicated with a lot of dots close to each other - and the other direction is just a straight line from one location to the other).
I have configured the phone, so that the App always has access to location data, and never should be put into sleep mode.
I had google maps running with navigation in both directions - so the phone/screen was on…
Any hints on what could be the issue ? Or is there another way to do the device tracking, where regular updates works (also if the screen of the phone is off) ?
One thing to check would be whether you need to allow it access to the GPS when running in the background. I’ve had that bite me on Android 10.
I don’t use the official app for tracking though, I use GPSLogger and have for the last few years (since long before the official app was even a twinkle in a developers eye). That’s never let me down, and can be controlled through Tasker too which is a win for me.
I’ve been noticing similar inconsistencies on the app, I’ve actually never used it alone before because I used Zanzito, which worked great but has long since fallen by the wayside for the developer. I just recently got a Pixel 5 upgrading from a 3 year old Z2 Play and figured it was time to give the Home Assistant app a try again, but the low number of location updates is frustrating (I had 3 updates on my 45 minute commute this morning for example). I’ve checked all the power settings (always on, always have access to location even in background, no power management, no data restriction, etc.). I’ve read through several threads and followed guides on those along with the don’t kill my app site. What I’ve noticed is while the location doesn’t update, everything else appears to. The easiest to see this on is the notification sensor, which is constantly changing state and there is no obvious period where it wasn’t getting updated, as seen here:
I’ve had a few trips where it works pretty good, not as good as Zanzito, but good enough to be satisfied. But other times like the commute this morning it’s barely useful, I could be gone from the house for 15 minutes before it updates to run the automations to turn everything off. I’d really like to work out how to get this more responsive, as I’d rather not mess around with getting Zanzito running again and I’d rather not have multiple apps trying to update location data, just seems like a waste of resources on the phone.
Thanks, I did go through that guide as well. I can try the fresh start again, but this is a new phone so it’s already a fresh setup. I had to configure the sensors and everything from scratch for it and deleted my old phone. And it is on 3.0.2.
double check battery optimizations it really sounds like it was not done…you should be seeing updates every few minutes given that location has changed, something there doesn’t sound right as the app uses google services.
you could be in an area where accuracy gets reported very high and in those cases location updaets are skipped. Try to change the accuracy from 200 to 400 if you still have issues.
Oh wait, a higher number allows less accurate updates? I assumed a higher number was more accurate, so I lowered it to 100 to hopefully get updates in the less accurate areas I drive through. I’ll fix that
That helped a lot, it’s definitely better, I set it to 400. But it’s still not what I see what Zanzito as far as frequency of updates. I’m not sure if it’s something I still need to tweak or if it’s just the normal frequency it updates at. The blue is my phone with the app, the green is my wife’s phone still running Zanzito.
I guess something like every 1-2 minutes vs every 5-10, at least if not in a zone. There’s also odd inconsistency in update frequency which you can see here. Sometimes it’s good like near Canton here, other times there’s long stretches of nothing. I just can’t figure out what is different between how the two apps are handling the updates. This is workable though, I’m just curious why there is such a drastic difference in frequency of updates between the apps. If it’s something that could be an option, like max time between updates, that would be awesome.
Just some more info, I set up a state tracker in Node-Red. When away (on the move) Zanzito updates about once a minute, the app is more sporadic, about every 2-15 minutes on average. Oddly, when home, my wife’s phone’s HA app is updating location about 2-3 times a minute, but Zanzito has stopped updating (as I recall there is a minimum location change option, so if you don’t move much it won’t update). I really don’t know what makes Zanzito work they way it does, barely every used any data with frequent updates and the battery hit wasn’t too bad until my phone was about 2.5 years old. Nothing else has compared that I’ve tried (OwnTracks, Ariela, various random GPS apps). Promise I’m not trying to complain as the app is great and all the other sensors update very timely. I wish @MrMep would open source Zanzito or share some info with other devs on how he was doing the location so well (or at the very least update it so it could be installed again).
what did you end up setting for your accuracy? you probably need to set a higher number, you should be seeing updates every 3-5 minutes at the latest given that the location has actually changed. You can’t go by update frequency as we have certain logic in place that wont send a location update if it hasn’t changed for 15 minutes. I honestly think your issue has to do with accuracy.
Hmm, I had it set to 400 for all 3 location settings. I just turned off the adaptive battery to see if that makes a difference on the drive home (I don’t think it should, because I turned of optimization for Home Assistant, but we’ll see). Is the accuracy included as an attribute? I could raise it to like 1000 and then go back and see what it’s reporting.
On Zanzito’s settings, I had high precision turned on and the minimum distance set to 20 meters.
I’m going to take back what I said, I had set it to 400 but changed to 100 after I realized lower settings were “less accurate”. Not sure why my brain won’t wrap around that concept. I’m going to set it to 10 on all 3 settings and see what that does on my commute home. It makes sense that’s my issue since everything else like the phone notifications sensor are updating pretty much instantly.
I’m not sure what Zanzito does, it’s been defunct for a long time, the dev was last active in 2017 saying he was working on some new features and a beta would be released soon, but then nothing. The app dropped out of the store around October of 2019 because of changes in policies and the dev not updating to fit those requirements. The license was still in the store so you could pull the app off ApkPure and license it through the store, but apparently in August the key was pulled as well, so there is no way to use Zanzito now and the dev doesn’t respond to inquiries about it, people show up occasionally in the Telegram channel asking about it when their phone gets updated and they can’t find it.
If you change it to 10 you may never see updates as often as you expect. Here let me try to explain ti a different way. For every location report we get Google sends us data about it, one of those data points is accuracy which means how precise is the location report. Now think about Google Maps and how your location icon has that circle around it. Ever notice how sometimes that circle is larger and other times its smaller? That circle represents the given accuracy at the time. Some locations report very bad accuracy meaning values much higher like 2000 or more. Nobody is saying those accuracy settings are wrong but when you have something set to say 80k, then you may see GPS reporting you as in North America. So the lower the number then your expectation should be fewer reports, the higher the number the potential for more reports.
Ok, so to get more results, you want a higher number, though those results might be “less accurate”? I’ll get there eventually. Thank you for being patient and helping
And that makes more sense now, digging into my MQTT server and watching the Zanzito messages coming in, a lot of them are in the higher 100s up to 1000 range. I guess 1000 is the Zanzito cutoff because I see nothing higher than that.