Skip to content

Vehicle without a Volvo connection: created by hand, fed by imports and pushed readings #45

Description

@vcanuel

Today a vehicle exists only through a Volvo connection: vehicles.connection_id and vin are NOT NULL (0001_init.sql), and the model sheet (variant_id, ADR 0022) is recognised from the API. A driver who does not want to link their Volvo account, or whose data comes from elsewhere, cannot use Runsten at all.

ADR 0035 already made the Volvo API one source among others. A vehicle without a Volvo connection is the same thing with no API source: it is fed by imports (#4, #43) and, later, by pushed readings (ADR 0035 §6). It also takes nothing from the Volvo API's quota.

What the driver gets depends on what feeds the vehicle

  • Summaries (Aximote, the Volvo Cars app's CSV): trips, charges, costs, statistics. No battery state, no live state of charge, no capacity estimate (ADR 0023).
  • Readings pushed or imported (Home Assistant first): everything, the derivation runs as for the API.

Decided (2026-10-11)

  • Schema: vehicles.connection_id becomes nullable. NULL is a vehicle created by hand, which the collector never polls. Linking a Volvo account later fills the column. No placeholder connection.
  • VIN: optional, still unique per account when given. Without a VIN, linking a Volvo account later is the driver's explicit choice of vehicle, never guessed.
  • Makes: Volvo and Polestar only, through the model catalogue (ADR 0022). Other makes are out of scope; the question can be reopened on its own later.
  • Next source: Home Assistant is the first source of pushed readings, in its own issue.

Scope of this issue

  • An amendment to ADR 0035 recording the decisions above.
  • Migration: nullable connection_id, nullable vin (unique per account when not null); the collector and everything reading connection_id skip vehicles without one.
  • Store and API: create, rename and delete a vehicle without a connection.
  • The model chosen by hand from the catalogue (ADR 0022), so that capacity, costs and statistics work.
  • Web: create a vehicle without linking a Volvo account, saying what it will and will not show.
  • The imports of Store and show imported trips and charges #4 work on it unchanged (the cutoff already says: a vehicle without a snapshot accepts what starts before now).

Linking a Volvo account later (to design here, may be built after)

  • The driver picks the vehicle created by hand that matches, or it is matched by VIN when both have one. Never guessed.
  • From then on, summaries starting after the first snapshot are skipped by the cutoff (ADR 0030 §3); the import screen must say so.

Out of scope, their own issues

  • Pushed readings from Home Assistant: the write scope for personal access tokens and the idempotent batch route (ADR 0035 §6).
  • A periodic synchronisation of summaries from a third-party app.

Activity

  1. added
    enhancement
    on Oct 11, 2026
  2. vcanuel commented on Oct 11, 2026

    @vcanuel
    ContributorAuthor

    Decisions (2026-10-11):

    • Schema: vehicles.connection_id becomes nullable; NULL is a vehicle created by hand, which the collector never polls. Linking a Volvo account later fills the column. No placeholder connection.
    • VIN: optional, still unique per account when given. Without a VIN, linking a Volvo account later is the driver's explicit choice of vehicle, never guessed.
    • Makes: Volvo and Polestar only, through the model catalogue (ADR 0022). Other makes are not in scope; the question can be reopened later on its own.
    • First pushed source after this one: Home Assistant (its own issue, with the write scope and the batch route of ADR 0035 §6).
  3. added theissue type on Nov 6, 2026
  4. added
    brand:any
    on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    brand:anyenhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions