Skip to content

no-data room post repeats on service restart; persist the epoch marker and restart once in update.sh #31

Description

@ThinkOffApp

Seen 2026-09-06 right after #30 landed via the dashboard Update button: @eclass posted the same "OBD: adapter/link present but no engine data yet - adapter asleep or car off ..." line twice, 15 s apart (15:37:56Z and 15:38:11Z). Journal: update.sh restarted carwatch-obd.service at 16:37:37 and again at 16:37:51 (unit install pass), and no_data_posted in obdwatch.run() is process-local, so each fresh process spent its one allowed no-data post. No crash, no flap loop.

Wanted: persist the "no-data epoch already announced" marker under ~/.carwatch/ (for example obd-nodata-posted holding the adapter path and the time), read it at start, clear it only on a successful reading post, exactly as the in-memory flag does today. Then a restart, an update, or a reboot with the ignition off produces zero repeat posts.

Also worth doing in the same change: update.sh restarts the OBD service twice on every update (restart pass plus unit-install pass); one restart is enough.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions