Skip to content

Polestar trips: end a drive on fresh readings, and read more often #152

Description

@vcanuel

Seen in #149 (Polestar 3).

  • Read the odometer and position again until they are newer than the drive's end. When a drive ends, the settled endpoints are read once. Polestar's backend can still return values dated before the end. The trip then ends at the wrong place and odometer, and the rest of the drive becomes a "reconstructed" trip with 0 kWh. The first part's consumption is wrong too: 19 km at 45 kWh/100 km, then 20 km in 3 min. Expected: read them again, within a time limit, until their timestamp is later than the end of the drive.
  • Measure how often the car updates while driving (car timestamps, metaReceivedAt).
  • Shorten the paces within the 10,000 calls/day. Today it's 10 min parked, so a drive's start is known within 10 min, and 1 min driving.

Activity

  1. vcanuel commented on Oct 27, 2026

    @vcanuel
    ContributorAuthor

    runsten d399789, PR #159: after a trip, the odometer and the position are read again every minute, for 10 minutes at most, until the car sends ones newer than its last reading driving. Remains: measure the car's upload rate while driving, then the paces (the other two items).

  2. vcanuel commented on Oct 27, 2026

    @vcanuel
    ContributorAuthor

    PR #159 does the first item only (the end readings read again); it no longer closes this issue, which stays open for the measure of the car's uploads and the paces.

  3. vcanuel commented on Oct 27, 2026

    @vcanuel
    ContributorAuthor

    Done in runsten 2b97d94 (PR #159): after a trip, the odometer and the position are read again every minute, for 10 minutes at most, until the car sends ones newer than its last reading driving. Remains open: measure the car's uploads while driving, then the paces.

  4. added
    brand:polestar
    on Nov 6, 2026
  5. added theissue type on Nov 6, 2026
  6. vcanuel commented on Nov 12, 2026

    @vcanuel
    ContributorAuthor

    How the Data Portal's car uploads, read from the collector's vehicle upload logs (sent_at, age, since_previous):

    • Driving or charging, about every minute. Read every minute, nearly every read finds a new upload, sent less than a minute before, received a few seconds after it was sent. Reading faster would read the same upload again: the driving pace stays at 1 minute.
    • Parked, only while the car is awake. A sleeping car uploads nothing.

    What we miss is the start of a drive. Only the availability (usageMode) tells a drive, and it is read every parked interval (10 minutes): a trip's start is known only within that interval, and a drive shorter than it is missed, its trip only reconstructed from the odometer. The battery, though, is read every minute parked while the budget is ample, and its new upload is the car waking up.

    Change: parked, a new upload of the battery brings the availability forward to the same pass. A drive is seen within a minute or two of the car waking up, for a call per new upload of a parked car, far fewer than reading the availability every minute (about 1,300 calls a day per car). When the budget runs short, the battery falls back to the parked pace, and the availability with it.

  7. vcanuel commented on Nov 12, 2026

    @vcanuel
    ContributorAuthor

    runsten f500fe7, PR #380: parked, a new battery upload (the car waking up) reads the availability in the same pass (EndpointSpec.Wakes), so a drive's start is seen within a minute or two. The driving pace stays at 1 minute, which matches the car's uploads. Remains: the merge.

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:polestar

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions