evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Zaptec Go incorrectly detected as supporting automatic phase switching

Open FuR1u5 opened this issue 3 months ago • 4 comments

Describe the bug

EVCC incorrectly detects/offers automatic 1-/3-phase switching for the original Zaptec Go, although this hardware does not support dynamic phase switching.

As a result, EVCC can request/plan 1-phase charging (e.g. 1380 W at 6 A), while the Zaptec Go remains on 3 phases. This then results in a phase mismatch being reported by EVCC.

Image Image

Steps to reproduce

  1. Add a Zaptec Go (original model) as a charger in EVCC.
  2. Configure the loadpoint with the Zaptec Go integration.
  3. Open the loadpoint phase configuration.
  4. Observe that EVCC offers "Automatic switching" and "3 phases" as phase modes.
  5. Start charging with PV/automatic optimization enabled.
  6. Let EVCC request a low charging power where 1-phase charging would be sufficient.
  7. Observe that EVCC calculates/plans 1-phase charging, while the Zaptec Go remains on 3 phases.
  8. EVCC then reports a phase mismatch because it expects 1 phase but measures 3 phases.

Configuration details

EVCC is configured entirely via the Config UI (Home Assistant Add-on) and runs in database-only mode. There is no evcc.yaml configuration file.

Relevant configuration:
- Loadpoint: Zaptec Go
- Phase mode: 3 phases
- Zaptec Go firmware: 2.6.0.6
- EVCC: v0.316.0-dev.1788350963

Log details

[lp-1 ] DEBUG 2026/09/03 10:17:22 phase timer inactive
[lp-2 ] DEBUG 2026/09/03 10:17:22 phase timer inactive
[lp-1 ] DEBUG 2026/09/03 10:21:21 switched phases: 1p
[lp-1 ] DEBUG 2026/09/03 10:31:23 detected active phases: 2p
[lp-1 ] WARN 2026/09/03 10:31:23 charger logic error: phases mismatch (got 3 measured, expected 1)
[lp-1 ] DEBUG 2026/09/03 10:31:23 start phase scale1p timer
[lp-1 ] DEBUG 2026/09/03 10:31:23 phase scale1p in 3m0s
[lp-1 ] DEBUG 2026/09/03 10:32:03 detected active phases: 3p
[lp-1 ] DEBUG 2026/09/03 10:32:03 phase scale1p in 2m20s
[lp-1 ] DEBUG 2026/09/03 10:32:23 detected active phases: 3p
[lp-1 ] DEBUG 2026/09/03 10:32:23 phase scale1p in 2m0s
[lp-1 ] DEBUG 2026/09/03 10:33:23 detected active phases: 3p
[lp-1 ] DEBUG 2026/09/03 10:33:23 phase scale1p in 1m0s
[lp-1 ] DEBUG 2026/09/03 10:34:23 detected active phases: 3p
[lp-1 ] DEBUG 2026/09/03 10:34:23 phase timer inactive
[lp-1 ] DEBUG 2026/09/03 10:35:24 phase scale1p in 0s
[lp-1 ] DEBUG 2026/09/03 10:35:24 switched phases: 1p
[lp-1 ] DEBUG 2026/09/03 10:35:24 phase timer inactive
[lp-1 ] DEBUG 2026/09/03 10:37:14 set phases: 1
[lp-1 ] DEBUG 2026/09/03 10:37:14 detected active phases: 3p
[lp-1 ] DEBUG 2026/09/03 10:37:23 detected active phases: 3p
[lp-1 ] WARN 2026/09/03 10:37:23 charger logic error: phases mismatch (got 3 measured, expected 1)
[lp-1 ] DEBUG 2026/09/03 10:37:24 switched phases: 1p
[lp-1 ] DEBUG 2026/09/03 10:37:52 set phases: 0
[lp-1 ] DEBUG 2026/09/03 10:38:32 detected active phases: 3p
[lp-1 ] WARN 2026/09/03 10:38:32 charger logic error: phases mismatch (got 3 measured, expected 1)
[lp-1 ] DEBUG 2026/09/03 10:45:29 set phases: 3
[lp-1 ] DEBUG 2026/09/03 10:47:41 detected active phases: 3p

What type of operating system or environment does evcc run on?

Linux

External automation

  • [x] I have made sure that no external automation like HomeAssistant or Node-RED is active or accessing any of the mentioned devices when this issue occurs.

Nightly build

  • [x] I have verified that the issue is reproducible with the latest nightly build

Version

v0.316.0-dev.1788350963

FuR1u5 avatar Sep 03 '26 09:09 FuR1u5

Thanks for the detailed report and log.

Looking at charger/zaptec.go, phase-switching support is decided purely by detectVersion():

if capabilities.ProductVariant == "Go2" {
    return zaptec.ZaptecGo2, nil
}
return zaptec.ZaptecGo1_Pro, nil

Everything that isn't reported as "Go2" falls into the ZaptecGo1_Pro bucket, and for that bucket NewZaptec unconditionally registers the PhaseSwitcher implementation (implement.Has(c, implement.PhaseSwitcher(c.phases1p3p))), regardless of whether the device is an original Zaptec Go (hard-wired, no phase-switching relay) or a Zaptec Pro (which does support it via maxChargePhases). Your log is consistent with that: set phases: 1 is sent and accepted by the API, but the hardware never actually drops to 1 phase (detected active phases: 3p right after), triggering the phases mismatch warning.

The zaptec.CapabilitiesResponse struct already carries a DeviceType and PhaseBalancing field (charger/zaptec/types.go) that are currently ignored by detectVersion() — one of these may be the right signal to distinguish an original Go from a Pro, but I don't have real payload data to confirm which value(s) apply to your specific charger.

Could you provide the raw Capabilities observation (StateId 100) for your charger? You can get this via evcc charger <name> --diagnose (needs shell access to the evcc instance/container), which prints all observations including that one. That will let us see the actual productVariant/deviceType/phaseBalancing values reported for an original Zaptec Go, so the version/capability detection can be corrected without breaking Pro or Go 2 support.

🤖 Generated with Claude Code

github-actions[bot] avatar Sep 03 '26 09:09 github-actions[bot]

I was able to query the EVCC state API from my Home Assistant installation.

For my original Zaptec Go (db:16), EVCC reports:

{
  "name": "db:16",
  "title": "Carport",
  "chargerPhases1p3p": true,
  "chargerSinglePhase": false,
  "phasesActive": 3,
  "phasesConfigured": 3
}

FuR1u5 avatar Sep 03 '26 09:09 FuR1u5

Thanks for the follow-up, but this is the loadpoint status from the evcc API (chargerPhases1p3p, phasesActive, ...), which just reflects what evcc thinks about your charger — it's the incorrect detection result we're trying to fix, not the underlying data needed to fix it.

What's still needed is the raw Zaptec Capabilities observation (StateId 100), specifically the deviceType, phaseBalancing, and productVariant fields as reported by your original Zaptec Go. This comes from the charger's own API response, not evcc's state.

You can get this by running (with shell access to the evcc instance/container):

evcc charger <name> --diagnose

replacing <name> with your Zaptec charger's config name. That command dumps all raw observations reported by the charger, including the Capabilities one. Please paste that output here (redact anything sensitive like serials if needed).

Without it we can't confirm which capability field reliably distinguishes an original Zaptec Go from a Zaptec Pro, so no code changes yet.

🤖 Generated with Claude Code

github-actions[bot] avatar Sep 03 '26 09:09 github-actions[bot]

Pls try nightly tomorrow

andig avatar Sep 03 '26 09:09 andig