Repository navigation
Victron: add Multi RS battery template (per-inverter minimum SoC) - #35802
Closed
ChrisKoh83 wants to merge 2 commits into
Closed
ChrisKoh83 wants to merge 2 commits into
ChrisKoh83 wants to merge 2 commits into
Conversation
On Multi RS installations the ESS is managed by the inverters, so writing /Settings/CGwacs/BatteryLife/MinimumSocLimit (register 2901) on the GX has no effect. Write /Settings/Ess/MinimumSocLimit (register 4614) on every com.victronenergy.multi unit instead, keeping evcc's existing battery control modes (normal/hold/charge) working on these systems.
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="templates/definition/meter/victron-multi-rs.yaml" line_range="58-66" />
<code_context>
+ set:
+ source: sequence
+ set:
+ {{- range splitList "," (.units | unquote) }}
+ - source: modbus
+ {{- include "modbus-connection" $ | indent 6 }}
+ id: {{ . | trim }}
+ register:
+ address: 4614 # /Settings/Ess/MinimumSocLimit
+ type: writesingle
+ decode: uint16
+ {{- end }}
+ {{- include "battery-params" . }}
+ {{- end }}
</code_context>
<issue_to_address>
**Battery limits diverge after write failure**
When a Modbus write fails after an earlier unit accepted the new limit, the sequence setter stops at the first Modbus error without rolling back earlier writes or updating later units, so the inverters enforce different minimum-SoC limits and some can keep discharging during a hold.
Attempt writes for every configured unit and report partial failures so each reachable inverter receives the requested limit.
</issue_to_address>
2 tasks done
Author
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.
Branch:
victron-multi-rsFile:
templates/definition/meter/victron-multi-rs.yaml(new)Related issue: #34550
Problem
On a Victron Multi RS installation the ESS is managed by the inverters, not by the GX.
/Settings/CGwacs/BatteryLife/MinimumSocLimit(register 2901), which thevictron-energytemplate writes for
BatteryHold, therefore has no effect: the operative minimum SoC lives ineach
com.victronenergy.multiservice (/Settings/Ess/MinimumSocLimit, register 4614) and ismirrored read-only as
com.victronenergy.acsystem/Ess/ActiveSocLimit(register 4925).Result: the discharge lock ("Entladung der Hausbatterie im Schnell-Modus und bei geplantem Laden
verhindern") does not hold the battery; it keeps discharging during fast charging (measured up to
4.8 kW while the car charged at 11 kW).
Change
New template
victron-multi-rs(class meter, usagebattery) that/Settings/Ess/MinimumSocLimit(register 4614,writesingle, one unit id per inverter),implemented as a Modbus
sequenceinsidelimitsoc,so the existing battery-control logic in
meter/usage_battery.go(normal → minSoc,hold → max(SoC, minSoc), charge → maxSoc) works on Multi RS systems without a custom device.
New parameter
units– comma separated Modbus unit ids of the Multi RS units (GX device list).Tested on real hardware
Installation: Ekrano/Cerbo GX + 3 × Multi RS 48/6000/100 (3-phase), Pytes 10 kWh,
evcc 0.318.2. Template loaded with
evcc meter --template … --template-type meter:Battery mode
normalwithminsoc: 17produced exactly three writes (trace):Read-back:
4614 = 17/17/17,acsystem /Ess/ActiveSocLimit (4925) = 17(follows within ~20 s).Setting
normalwithminsoc: 10wrote0x000ato all three and restored4614 = 10/10/10,4925 = 10— i.e. the hold/release semantics of evcc map 1:1 onto the registers the inverter obeys.Notes / limitations
usage: battery; grid/PV keep usingvictron-energy.acsystemhas no writable minimum SoC, hence the per-unit writes.units: 0.Why a separate template
victron-energyintentionally targets the GX/Hub-4 world (2901) and works for VE.Bus systems.A device-family detection inside that template would silently change behaviour for existing
installations, so a separate template keeps both worlds intact (see also issue discussion where
this was classified as a device-specific enhancement).