-
-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
owntracks sends same GPS data twice causing duplicates #1928
Comments
Can you post a (location redacted) example of the messages? I'm wondering if they've got the same More generally, is it just the same latlng, or the exact same message. The latter's probably a bug. The former, less certainly so. |
Here are 2 JSON payloads that happened consecutively. The lat land lon for each is the same, as is the tst but the created_at is different. Is it possible that if a new GPS update has not happened, the current cached point is used? [{'_type': 'location', 'BSSID': 'xx:xx:xx:xx:xx:xx', 'SSID': 'xxxxxxxx', '_id': '2b650581', 'acc': 20, 'alt': 258, 'batt': 100, 'bs': 3, 'cog': 0, 'conn': 'w', 'created_at': 1733083629, 'lat': xxxxxxxxx, 'lon': xxxxxxxxx, 'm': 2, 'tid': 'S6', 'topic': 'owntracks/----------/S6', 'tst': 1733083629, 'vac': 0, 'vel': 0}] [{'_type': 'location', 'BSSID': 'xx:xx:xx:xx:xx:xx', 'SSID': 'xxxxxxxx', '_id': '87a06f27', 'acc': 20, 'alt': 258, 'batt': 100, 'bs': 3, 'cog': 0, 'conn': 'w', 'created_at': 1733084157, 'lat': xxxxxxxx, 'lon': xxxxxxxxx, 'm': 2, 't': 'p', 'tid': 'S6', 'topic': 'owntracks/------------/S6', 'tst': 1733083629, 'vac': 0, 'vel': 0}] |
The difference here is that they have different triggers. The second is The Does that explain what's going on? |
Thanks @growse, yes that explains what is happening. I assume the ping is done because the device has not moved and therefore not sent a location for a period of time, so the ping is generated to let the server know that the device is still alive. A keep alive sort of thing. The location information could be the same as the previous location because the device has not moved or it could be different so I can't just use this packet as a check-in as it could also indicate the device has moved. |
I just installed owntracks. I made a 10min 1.8mi drive from approx 17:25 to 17:35 from home to school. But I also observed that all updates had the exact same location from 14:50 until 17:37:54. Note that Google Maps encrypted Timeline was no better; it shows an instantaneous trip from home to school at 17:38 and cannot show data points anymore. This is unexpected behavior because I thought that Owntracks should not send data points that are incorrect and indistinguishable from real location updates. excerpt of rec/yonathan/oriole/2024-12.rec:
(I have redacted the 10-digit home location and school location using find and replace. But the exact same HOME_LAT, HOME_LON was present for the duration of the drive). I’m using monitoring mode: Significant Changes, Location Interval: 60s, Minimal location displacement: 0. config.otrc:
|
Correct. The device generates locations from the configured providers (GPS, Network, Passive etc.) and supplies them to apps along with a timestamp that the 'fix' was made. There's nothing stopping the device supplying the same Location (with the same fix time) multiple times - OT tries to ignore locations where the timestamp hasn't changed. Ping is a bit of a special case. As you say, it's a little bit like a keepalive, and it just reaches into the cache to fetch the last known location - this may have the same latlng / tst as a previously sent one, as you're seeting. One option here is to allow people to ask for 'pings' to be "high accuracy". This means that periodically, if in Significant Changes mode, the device will switch into high accuracy mode for a single point and then dispatch that. It's a little complex though, as the very act of switching to a high accuracy mode will generate a fresh location, which will be delivered to OT via the usual mechanism and then published (not as a ping). I guess what I'm saying is that it might be unusual for a ping to have a never-before-seen location attached to it. 🤷 --
The fact that the Some devices do this. OT has no way of knowing that the device is lying to it, sadly :( |
I have owntracks sending data to my own system but I'm seeing some strange behaviour that I can't seem to identify if it is normal or not?
At random times, owntracks sends the same GPS point through to my system. The owntracks logs show that a new packet has been created but with the same GPS point as previously sent successfully. There are no errors in the owntracks log nor any errors in my system but it seems like some data goes missing after the duplicate GPS point is sent through.
The dual points are sent one after the other (anything up to 10 minute apart) but doesn't seem to matter if the device is moving or not.
The text was updated successfully, but these errors were encountered: