Skip to content

v0.155.1-beta.1 (#1799): EV loadpoint with min=max below 3-phase minimum silently charges 0 W #1861

Open

Description

@Leitet

Summary

On v0.155.1-beta.1 (behaviour introduced by #1799), mode planner_arbitrage, a 3-phase EV loadpoint whose configured min = max is below the computed 3-phase minimum never charges. Every planned charge slot is snapped to 0 A, yet the logged reason stays plan, so nothing indicates a problem. A car plugged in on Friday was never charged through the weekend.

Details

  • 3-phase minimum is computed as max(3800, 18 * 230) = 4140 W.
  • Loadpoint config: min = max = 3800 W, steps [0, 3800], 3 phases.
  • SnapChargeW returns 0 when max < min, so every planned charge becomes 0 A.
  • The decision reason is still logged as plan, so the loadpoint looks like it follows the plan while delivering nothing.

Workaround

Set the loadpoint's min/max to 4140 W with steps [0, 4140]. After that change, charging started as planned at 21:15 CEST on 25 Oct 2026 (about 3.9 kW across 3 phases).

Suggestions

  1. Validate the config, or at least warn, when a loadpoint's max is below the phase minimum (on save and at startup).
  2. Clamp to the phase minimum, or surface a clear reason (e.g. below_phase_minimum) instead of plan when the snapped power ends up 0.
  3. Log a warning when a non-zero plan is snapped to 0 W because of max < min.

Activity

  1. Leitet commented on Oct 26, 2026

    @Leitet
    MemberAuthor

    Follow-up (overnight 2026-10-25/26, same RAV4 on loadpoint rav4): FTW keeps an energy-integrated SoC estimate even though the vehicle source reports a fresh SoC.

    What the car reported (Toyota integration in HA, forwarded to FTW over MQTT on ftw/vehicle/rav4-ha/state every 30 s and on state change):

    • 03:57 UTC: 95 %, charging_state: Complete
    • 04:33 / 04:39 UTC: 94 % then 92 %
    • New car report timestamp at 04:35 UTC, picked up by HA at 04:57 UTC

    Payload actually on the broker (observed ~05:10 UTC):

    {"available":true,"soc_pct":92.0,"observed_at":1792989325.0,"source_age_s":2195.4,"charging_state":"Complete","plugged":true,"at_site":true}

    What FTW shows (~05:10 UTC):

    • cars_list: socPermille: 1000, socEstimate: true, socAgeS: 29844 (i.e. still anchored to the ~20:55 UTC report)
    • chargers_list: socPermille: 1000, socSource: inferred, sessionWh: 16588

    So FTW is at 100 % from integrating session energy, while the vehicle reported 92 % about 35 minutes earlier with available: true.

    Expected: a fresh SoC reported by the vehicle must always override an energy-integrated estimate, and socAgeS should track observed_at of the latest accepted report. If the report is being rejected (e.g. staleness or plausibility gate against the estimate), please log why.

  2. Leitet commented on Oct 26, 2026

    @Leitet
    MemberAuthor

    Correction to my previous comment: the root cause was mostly our own observed_at mapping on the Home Assistant side, not FTW ignoring a fresh value. Our template used the Toyota integration's "status last reported by car" timestamp, which stayed at 20:55 UTC all night while the SoC sensor kept updating (37 → 95 %). Every message was therefore a repeat of the same observation, and when a new timestamp (04:35 UTC) finally arrived, source_age_s was already ~1300 s. home_assistant_vehicle.lua (v0.1.0, bundled in v0.155.1-beta.1) accepts a reading as fresh only if observed_at is newer than the last one and source_age_s < MAX_AGE_S (300 s, lines 133 and 246), so /api/drivers/rav4-ha kept soc: 0.37 and the loadpoint integrated session energy up to a 100 % estimate.

    We have now fixed the mapping on the HA side (observed_at = the newer of the car report time and the SoC sensor's last_changed). FTW now shows socPermille: 920, socEstimate: false, socSource: vehicle.

    Feature request: let a vehicle source declare SoC confidence instead of a hard 300 s freshness cut-off

    1. A measured SoC that is 20–60 min old is far better than an energy-integrated estimate anchored 8 h earlier. VehicleAnchorMaxAge (1 h) suggests it should at least re-anchor the estimate, but here it didn't.
    2. The MQTT/HA vehicle schema has no way to describe quality. Proposal: optional fields such as soc_accuracy_pct (± percentage points) and/or soc_confidence (0–1), plus an optional per-driver max_age_s override (default stays 300 s). Core would then fuse the reading with the energy-integrated estimate, weighting by declared accuracy and age, instead of a binary fresh/stale choice. A reported SoC newer than the current anchor should always re-anchor the estimate.

    Happy to test with our Toyota RAV4 via the HA Toyota integration (cloud, polled ~6 min).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions