bachya/pytile

Get location history

apvd opened this issue · 7 comments

apvd commented

In addition to retrieving the current location, it would be very useful to get prior locations as well. This could be a function that takes a date range and returns all latitude and longitude pairs that are within this span.

I don't see location history anywhere in the API responses I've collected. Do you have the indication that this data exists (in the API, in the Tile app, etc.)?

apvd commented

As I mentioned, I don't see anything regarding history in the API requests I've gathered. Happy to take a further look if you (or someone else) finds something different.

@bachya You need Tile Premium to support that feature.

The app definitely pulls it from some sort of API -- it isn't cached on the device. You can log into a fresh device and see full history.

Appreciate the thoughts, @jonbach. I don't have Tile Premium (and don't plan on subscribing to it), so in this case, someone else will need to submit a PR.

@bachya I'm not a Python DEV so I have limited ability to help. However, I downloaded the Tile App from the Windows MS Store, put the app in debug mode, viewed the log file, and found an API endpoint that might be helpful:

https://production.tile-api.com/api/v1/tiles/location/history/{tile_id_here}?aggregation=False&start_ts=1678329302306&end_ts=1681007702306?

Good find, @jonbach—I can work with that.