GPS Timeline — unlimited location history for your trackers, stored in your own SQLite file

Hey all,

For the past year I was running Dawarich to keep a long-term location history, because Home Assistant’s recorder deletes entity history after 10 days (purge_keep_days is global, there’s no per-entity retention). It worked, but it was one more container to maintain just for location data, so I ended up building the thing I actually wanted: the same “never lose a point” idea, but living entirely inside Home Assistant.

What it does

GPS Timeline is an integration that archives every GPS fix from your trackers into a dedicated SQLite database (/gps_timeline/gps_timeline.db) and serves that history back to dashboards through a WebSocket API. Points stay there until you delete them — removing a tracker asks for confirmation first, nothing disappears behind your back.

  • Track device_tracker., person. or any entity exposing latitude/longitude
  • Every accepted fix is stored with all its attributes (accuracy, battery, speed, altitude, course…) as a full snapshot
  • Fixes with worse accuracy than a threshold you set are skipped; coordinates are rounded to 6 decimals (~11 cm)
  • One entry per device; each entry can also archive its Places labels and activity sensors, so old days still show proper place names after the recorder purges them
  • Renaming or reconfiguring the tracked entity moves the whole archive with it — no gap, no orphaned history
  • Optional “subject” field (what the device tracks: a person, a car…) exposed as attributes
  • A backfill service imports your existing recorder window at install, so you start without a hole in the timeline
  • Zero dependencies (pure sqlite3), no internet access

Installation

Via HACS (add the repo as a custom repository, category Integration), or copy custom_components/gps_timeline into your config folder. Then Settings → Devices & services → Add integration → GPS Timeline.

Using it with the Location Timeline Card

The Location Timeline card by @konewka17 is a beautiful way to view this — it’s actually why I built the integration. The card normally reads from the recorder, so I added an opt-in history_source option in my fork of the card that redirects its history queries to GPS Timeline:

type: custom:location-timeline-card
history_source: gps_timeline
entity: device_tracker.my_phone
places_entity: sensor.places_my_phone

With that flag set, days older than the recorder window come from the archive instead. I submitted this upstream as a PR; to keep the project’s scope tight it’s staying as a fork for now, and everything else in the fork is identical to the original card.

Backfill example

action: gps_timeline.backfill
data:
entity_id: device_tracker.my_phone

Links

Feedback very welcome — especially from OwnTracks/Traccar/Dawarich users, since that’s who this was built for.