Skip to content

Import from Rivian Roamer, with drivers, places and destinations - #97

Merged
2 commits merged into
mainfrom
roamer-import
Nov 8, 2026
Merged

2 commits merged into
mainfrom
roamer-import

Conversation

@blike

@blike blike commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Adds Rivian Roamer as an import source under Settings → Import, and brings drivers, saved places and navigation destinations across.

Rivian Roamer

  • Upload the data copy as one .zip, from Account → Data → Download a copy. It's read in place, without unpacking it to disk.
  • The vehicle is matched by VIN and shown read-only. The time zone only sets where each chosen day starts, since Roamer's times are exact.
  • Drives and charges are Roamer's own sessions. Sessions Roamer flagged as corrupted are skipped.
  • Charges keep Roamer's energy breakdown and a charging curve built from its charging readings.
    • A charge RivianMate already has gets only what it's missing.
    • Undo puts it back exactly as it was.
  • History comes from the vehicle metrics Roamer kept as Rivian sent them. Metrics Roamer recoded (seat heat, service mode, range thresholds) are skipped rather than guessed back.

Drivers, places and destinations

  • Drivers: each drive gets the driver profile the export recorded. ElectraFi keeps the active profile's name in Tesla's autopark_state_v2 column, so ElectraFi drives get drivers too.
    • A name is matched to a driver RivianMate already knows.
    • An unknown name becomes a driver without a profile. The car's profile takes it over once the car reports that name, so there are no duplicates.
  • Saved places from Roamer are added unless one is already saved there. Roamer's Home is marked as home only if none is set yet.
  • Destinations: each drive gets its navigation destination, picked the same way live recording picks it.
  • Undo removes drives, charges and history, but keeps any drivers and places the import added.

Import pipeline

  • The shared parts move from services/electrafi to services/imports: drafts, planning, writing and undo. Each export plugs in as a format (electrafi/format.ts, roamer/format.ts).
  • The preview counts readings left for live tracking separately from ones already recorded, and names the places it adds.
  • The flow's rows keep their size as files and dates load, the step buttons match the rest of the app, and the text is shorter.
  • Adds the yauzl dependency for reading the zip. There's no schema migration.

Also

  • On the set-password screen, Tab now goes from one password field to the next instead of stopping at the Show toggle.

Testing

  • Server: 645 tests pass, including the database tests. New tests cover:
    • Roamer parsing and scanning, from small built test zips
    • an end-to-end Roamer import, and undo of an enriched Rivian charge
    • driver matching and the later profile takeover
    • places, and ElectraFi drivers
  • Web: 299 tests pass. Typecheck, lint and formatting are clean.
  • Tried against a real Rivian Roamer export (Oct 29 – Nov 7) in a throwaway instance:
    • 47 drives, 4 charges with curves and breakdowns, and 11,116 history changes imported.
    • Re-importing found nothing new, and undo restored every table.
  • The same export's drivers (18/31 drives) and 7 places are read correctly; a real ElectraFi export gives all 70 drives a driver.

blike added 2 commits November 7, 2026 20:19
… across

Rivian Roamer is now the first source under Settings → Import. Its data
copy is one .zip, read in place, and matched to your Rivian by VIN.

From a Rivian Roamer copy:
- Drives and charges are Roamer's own sessions; ones it flagged as
  corrupted are left out.
- Charges keep their energy breakdown and a curve from Roamer's charging
  readings. A charge you already have only gets what it's missing, and
  undo puts it back as it was.
- Vehicle history comes from the metrics Roamer kept as Rivian sent them;
  ones it recoded (seat heat, service mode, range thresholds) are skipped.
- Each drive gets the driver profile and navigation destination Roamer
  recorded, and the account's saved places are added unless one is
  already saved there.

ElectraFi drives now get their driver too: ElectraFi keeps the active
profile's name in Tesla's autopark_state_v2 column.

Drivers are matched by name to ones RivianMate knows. A name it doesn't
know becomes a driver without a profile, which the car's profile takes
over once it reports that name. Undo keeps drivers and places.

The import itself:
- The shared steps (drafts, planning, writing, undo) move to
  services/imports, with each export as a format that reads its files.
- The preview counts readings left for live tracking apart from ones
  already recorded, and lists the places it adds.
- The flow's rows hold their size as files and dates load, and its text
  is shorter.
The show-password toggle sat between the two fields when choosing an
app password, so Tab went to it before the confirm field.
blike added a commit that referenced this pull request Nov 8, 2026
Merges main, track-fix-precedence (#95) and roamer-import (#97) into trips so all three ship in one merge to main, and one Docker Hub publish.

Trips now uses the import code where Roamer moved it: isTimeZone from imports/time-zone and rangeOf from imports/plan. The import flow uses Trips' shared btn-secondary and btn-danger classes and the plural from lib/format.
@blike blike closed this pull request by merging all changes into main in 9e2baec Nov 8, 2026
@blike
blike deleted the roamer-import branch November 10, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant