Skip to content

SoC Vorhersage für zwei parallel betriebene Batterien verläuft nicht parallel #36902

Backlog

Description

@martin123schmid

Description

Fehler / Verbesserungsvorschlag:
Die SOC Vorschau von zwei parallel betriebene Huawei Luna 2000 Batterien sollte als eine Linie mit dem Mittelwert der SOCs dargestellt werden, da die Batterien auf plus/minus 1% parallel geladen und entladen werden. Das sieht man am Verlauf in der Vergangenheit.
Tatsächlich weichen die Kurven stark voneinander ab. Siehe Screenshot.

Steps to Reproduce

  1. Zwei Batterien Typ Huawei hybrid inverter per Modbus konfigurieren.
  2. Im Menü "Batterie" den SoC Verlauf anschauen
  3. Batterien sind im Verlauf nahezu parallel, in der Vorschau laufen die SoCs "zufällig"(?) auseinander.

Version

v0.320.0

System

linux/arm64, CET +01:00

Activity

  1. martin123schmid commented on Dec 4, 2026

    @martin123schmid
    Author
    Forecast 2 Batteries
  2. github-actions commented on Dec 4, 2026

    @github-actions
    Contributor

    The Battery tab forecast is the optimizer's plan per battery (core/site_optimizer_result.go), not an extrapolation of the past SoC. Each battery is planned as its own device, so two batteries can diverge in the plan even if they ran in parallel historically. Averaging them in the chart would hide this planning behavior rather than fix it, so I can't say yet whether this is a defect or a design question. The screenshot alone doesn't show enough to tell.

    Could you add as text:

    • the battery and forecast parts of /api/state while the deviation is visible
    • your battery configuration (evcc.yaml or the Huawei meter/battery setup, including capacities and any limits)
    • a debug log covering an optimizer run
    • the installed build (v0.320.0 or a nightly)

    Related: #36157 (two batteries, forecast SoC diverges), #36768 (two identical batteries planned sequentially instead of in parallel, closed as incomplete).

    🤖 Generated with Claude Code

  3. added
    question
    waiting for feedback
    on Dec 4, 2026
  4. martin123schmid commented on Dec 4, 2026

    @martin123schmid
    Author
  5. github-actions commented on Dec 4, 2026

    @github-actions
    Contributor

    Thanks for the state dump (v0.320.0). It shows two identical batteries (13.8 kWh, 39 % each, same limits). Only Battery-1 carries a non-zero suggestion.discharge (342 W), which is consistent with the optimizer planning each battery separately (core/site_optimizer_result.go) rather than the chart being wrong. Presumably the planner does not split the load evenly between identical batteries, but I haven't confirmed that in the code.

    Still missing to pin it down:

    • a debug log covering an optimizer run (including the optimizer request/response)
    • your evcc.yaml / battery configuration (limits, any tariffs or grid charge settings)

    Related: #36768 (identical batteries planned sequentially instead of in parallel, closed as incomplete) and #36157 (two batteries, forecast SoC diverges, open).

    🤖 Generated with Claude Code

  6. martin123schmid commented on Dec 4, 2026

    @martin123schmid
    Author

    evcc is with database - not .yaml

    Build: v0.320.0

  7. martin123schmid commented on Dec 4, 2026

    @martin123schmid
    Author
  8. github-actions commented on Dec 4, 2026

    @github-actions
    Contributor

    Thanks for the build info (v0.320.0). A database-based setup is fine, the batteries' capacity and limits are already visible in your state dump, so no evcc.yaml is needed.

    What is still missing is a debug log (log: debug or --log debug) covering one optimizer run, including the optimizer request and response. Without it I can't see how the two batteries are passed to the optimizer, so I can't tell whether the divergence is a defect or expected planning behavior.

    Please also tell us whether grid charging or dynamic tariffs are enabled, since that influences how the optimizer distributes load between the batteries.

    Related: #36768 (two identical batteries planned sequentially instead of in parallel, closed as incomplete) and #36157 (two batteries, forecast SoC diverges).

    🤖 Generated with Claude Code

  9. martin123schmid commented on Dec 4, 2026

    @martin123schmid
    Author

    No grid charging
    No dynamic tariffs

  10. github-actions commented on Dec 4, 2026

    @github-actions
    Contributor

    Thanks for the log (v0.320.0, no grid charging, no dynamic tariffs). It does not contain the optimizer request and response, only the optimizer: optimizing 215 slots ... summary lines. So I still can't tell how the two batteries are passed to the optimizer, or why only Battery-1 gets a discharge suggestion.

    What I can say so far: the Battery tab shows the optimizer's plan per battery, not an extrapolation of the past SoC. Both batteries are planned as separate devices (core/site_optimizer.go, core/site_optimizer_result.go). The two curves can therefore diverge even when the batteries behaved identically in the past. Whether this is a defect or planning behavior is still open.

    To go further, please provide a debug log that includes the optimizer request and response. If these lines are missing, the site log area may need to be set to trace. Please also check whether the two batteries have different SoC limits (min/max) or charge/discharge power limits.

    Related: #36768 (identical batteries planned sequentially instead of in parallel, closed as incomplete) and #36157 (two batteries, forecast SoC diverges).

    🤖 Generated with Claude Code

  11. martin123schmid commented on Dec 4, 2026

    @martin123schmid
    Author

    The batteries are configured identically.

    I upload a trace log of "site". I hope it contains what you need.

    evcc-20261204-204614-trace.log

  12. github-actions commented on Dec 4, 2026

    @github-actions
    Contributor

    Thanks, the trace log has the optimizer request. It shows the batteries are passed to the optimizer with identical parameters:

    • Battery-1 and Battery-2 (the two Huawei Luna batteries): s_initial 5382, s_min 2070, s_max 13800, c_max 7000, d_max 7000 Wh/W each
    • the request also contains two other battery entries (s_max 50800 and 13208, d_max 0), which look like vehicles

    So the input is symmetric. If the plans still diverge, the cause is how the optimizer picks one of several equally good solutions for identical batteries. The solve runs on the external optimizer service (optimizer.evcc.io), not in evcc. evcc only maps the returned per-battery plan to the forecast (core/site_optimizer_result.go). The chart reflects what the optimizer returns, so this is not a chart bug.

    Whether evcc should merge or average identical batteries in the forecast, or the optimizer should split the load evenly, is a design decision for the maintainers. I can't confirm the tie-breaking in the service from this repository.

    Related: #36768 (identical batteries planned sequentially instead of in parallel) and #36157 (two batteries, forecast SoC diverges).

    🤖 Generated with Claude Code

  13. martin123schmid commented on Dec 4, 2026

    @martin123schmid
    Author

    Thank you very much so far. I understand, that the optimizer's plannings are "external".
    But it would definitely be helpful to display an additional smoothed curve. The diverging curves may not matter to the optimizer, but it would be beneficial for the user's overall understanding and for making manual decisions.

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

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions