Skip to content

Polling: Infotainment is polled every 10 s whenever the car is awake, which may keep it from sleeping #112

Closed

Description

@dzid26

Problem

Every VCSEC status reply with asleep == false triggers a charge-state request (TeslaBleController.kt#L1370-L1377). Status is polled every `POLL_MS = 10_000` ([L632-L640](https://github.com/dzid26/TeslaBatteryBLE/blob/18f1b464d84c65a0de00261ea02a2a48334532f9/app/src/main/java/com/dzid26/teslable/ble/TeslaBleController.kt#L632-L640),`` L1456).`` So whenever the car is awake, the app sends an authenticated Infotainment GetVehicleData(charge) about every 10 s, regardless of state: parked, unplugged, or finished charging.

The project's own docs say otherwise:

  • ADR-0001: "Infotainment charge state only while the car is awake, ~10s while charging."
  • docs/research/tesla-ble-capabilities.md (Constraints → Polling): "Faster polling keeps the car awake and drains battery — back off when vehicleSleepStatus says asleep / charge complete." docs/compatibility.md gives the same warning.

If 10 s Infotainment polling resets the car's inactivity timer, a parked car that stays connected never falls asleep. The app would then cause the parked drain it exists to measure, and distort the discharge projection and the planned vampire-drain alerts. "Never wake the car" holds to the letter but not in effect.

Proposal

  • Check on the car: connect, park, and leave it alone. Measure time-to-sleep with the current cadence and again with Infotainment polling turned off. The app already logs VCSEC sleep transitions.
  • Add an explicit cadence policy. For example: charging → every 10–30 s; awake and parked → one read after waking, then every N minutes or only on request; charge complete → stop; asleep → VCSEC only.
  • Write the policy as a pure function in core (inputs: charging state, time of the last reads, user activity), with unit tests.
  • Record the measurement in ADR-0001 or a new ADR.

Activity

  1. dzid26 commented on Oct 10, 2026

    @dzid26
    CollaboratorAuthor

    Fixed in #161

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

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions