Add GoodWe Wallbox (Gen2) charger#29822
Draft
andig wants to merge 5 commits into
Draft
Conversation
Adds a Modbus TCP charger driver for the GoodWe AC EV Charger Gen2, including the GW11K-HCA model. Implements Status, Enable, MaxCurrent (power-mapped), MaxCurrentMillis, Meter, ChargeRater, MeterEnergy, PhaseCurrents, PhaseVoltages, PhaseSwitcher, and Identifier. Protocol details derived from the Home Assistant integration (gen2-modbus branch); the implementation has not been validated on physical hardware. Default device ID 247 (0xF7), port 502. Refs #13970 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
|
@premultiply is this usable? |
premultiply
reviewed
May 12, 2026
Co-authored-by: premultiply <4681172+premultiply@users.noreply.github.com>
premultiply
reviewed
May 12, 2026
| if enable { | ||
| v = goodweChargeStart | ||
| } | ||
| _, err := wb.conn.WriteSingleRegister(goodweRegChargeCommand, v) |
Member
There was a problem hiding this comment.
Unsure if that creates/terminates a session.
Try maxcurrent-zero stragegy?
Member
Author
There was a problem hiding this comment.
Any change you're happy with. Needs testing anyway.
Member
There was a problem hiding this comment.
Let's try it first this way
premultiply
reviewed
May 12, 2026
Co-authored-by: premultiply <4681172+premultiply@users.noreply.github.com>
premultiply
reviewed
May 12, 2026
Member
|
Will fix it later. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Draft charger driver for the GoodWe AC EV Charger Gen2 (e.g. GW11K-HCA) via Modbus TCP, requested in discussion #13970.
Implements the full
api.Chargersurface plus optional capabilities:Status,Enable/Enabled,MaxCurrent/MaxCurrentMillis(current → power conversion, clamped to hardware max)Meter/MeterEnergyPhaseCurrents,PhaseVoltagesPhaseSwitcher/PhaseGetter— dynamically registered at startup if register 10023 (phase-switch enabled) = 1Identifier(16-byte ASCII serial)The constructor reads hardware capabilities from three registers before registering capabilities:
goodweRegPowerSpec): hardware power class (0=7 kW, 1=11 kW, 2=22 kW) — used to clamp the power setpointgoodweRegPhaseSpec): hardware phase count (0=1-phase, 1=3-phase) — initialisesphasesgoodweRegPhaseSwEnabled): whether 1p/3p switching is available on this unit —PhaseSwitcher/PhaseGetterare only registered viaimplement.Capswhen this is 1The constructor also forces
charging_mode = fast(register 10032 = 0) so evcc fully owns the PV-surplus logic — the discussion notes that the wallbox's internal PV mode still draws from the grid when insufficient PV is available.Protocol source
Register map and write semantics were derived from the Home Assistant integration on the
gen2-modbusbranch (wallbox_modbus.py), which documents itself as "AC EV Charger 2nd Gen Modbus Protocol v1.0.15".This implementation has not been validated on physical hardware. Marked as draft pending a hardware test by someone with the device. The discussion author may be willing to test.
Connection prerequisites (also captured in the template description):
Test plan
go build ./...go test ./charger/go vet ./charger/gofmt -l charger/goodwe.go