You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Collector: a Volvo without the Energy API fails on energy-state at every poll #433
energy-state (Energy API) is not among the collector's optional endpoints (optional() in internal/collector/collector.go): only brakes, engine and fuel are. A Volvo without the Energy API (a combustion or mild-hybrid car) answers it with a plain 404, which fetchFailed records as the vehicle's latest failure (not_found) at every poll of the endpoint.
Consequences:
a call spent at each poll, counted against the Energy API's quota, for an answer that never changes;
the vehicle's last_failure is always newer than its read_at, so anything reading the status as "the latest call failed" sees a car that reads fine as failing. The web UI does not (collectionState ignores not_found), but the API's collection.last_failure does tell it.
Proposal
Treat energy-state's plain 404 as a missing endpoint, like the optional ones: left out for a details interval, logged once, not recorded as a failure. The market refusal stays apart: its 404 carries does not belong to allowed markets (marketMessage) and keeps KindMarket.
energy-state's 404 (not the market's) goes through the missing-endpoint path
a test: a vehicle whose energy-state answers 404 has no failure and is not polled for it at each pass
runsten ff01253: energy-state's plain 404 is left out as a missing endpoint (details interval, logged once, no failure); the market's 404 keeps marking the market; the charging state is cleared while the endpoint is missing. Tests in TestFailures. In review: #434.
Done in runsten eb97676: merge of #434. A Volvo without the Energy API no longer fails on energy-state at every poll; its plain 404 is left out as a missing endpoint, the market's 404 still marks the market.
Activity
vcanuel commentedon Nov 19, 2026
runsten ff01253: energy-state's plain 404 is left out as a missing endpoint (details interval, logged once, no failure); the market's 404 keeps marking the market; the charging state is cleared while the endpoint is missing. Tests in TestFailures. In review: #434.
vcanuel commentedon Nov 19, 2026
Done in runsten eb97676: merge of #434. A Volvo without the Energy API no longer fails on energy-state at every poll; its plain 404 is left out as a missing endpoint, the market's 404 still marks the market.