Repository navigation
AlphaESS: add holdcharge and discharge battery modes - #36892
Moving4407 wants to merge 2 commits into
Conversation
|
Thanks for the follow-up, and for the detailed measurements. I tried the template on a SMILE-T10-HV with EMS v0.11.67 (BMS v1.61, inverter V0.C6, Modbus TCP, id 85), which is a newer EMS than the V0.00.58 you tested on. I used the template from this PR, rendered as a custom battery on evcc 0.320.0. Mode I can't yet say whether mode 19 really blocks charging on this EMS version. At the time of the test PV (about 700 to 800 W) was roughly equal to the house load (about 650 to 680 W), so there was no surplus that the battery could have charged from. I also have not tested I can only run a proper test once there is more sun again. I'll repeat it with a PV surplus of at least 2 to 3 kW, in the same way as your tests (forced |
|
Quick check on my SMILE-B3 (EMS V1.00.66) with this template on evcc 0.320.0: holdcharge is accepted, the dispatch block reads back 2176 = 1, 2177 = 32000, 2181 = 19 after the first write and after the refresh. No Modbus errors, normal resets it as usual. No effect visible yet though, battery was at its 15 % reserve and there's no PV. I'll test again when there's some sun. |
Follow-up to #36014. Answers my open question in #35785 (is there a dispatch configuration for "no charge, discharge allowed"). Related: #35029, #35388.
What
Adds the two battery modes the
alpha-ess-smiletemplate is missing. Both use the dispatch block with the same registers, write order, 120 s duration and watchdog as the existing modes.holdchargedischargemaxdischargepowerminsoc/ 0.4Why
holdchargeto export PV surplus instead of storing it. Without the mode evcc falls back tonormaland the battery charges against the plan.dischargeis needed for grid discharge at high feed-in prices. evcc only uses it when grid discharge is enabled for the site.Source
AlphaESS "Modbus/Server API Guide V1.0 EN" (2022-11-11), table 1. Mode 19: "The system will be self-consumption mode, the charging power does not exceed the set power", marked "only for specifical EMS version". The document does not name the version, hence the added sentence in the requirements text. Mode 2 is the one
chargealready uses, here with a discharge power.Tested on
--template, optimizer on (automatic: full), Modbus TCP, id 85holdcharge
2026-12-04, SoC 81 %, vehicle not connected. Mode chosen by the optimizer;
normalforced for 60 s throughPOST /api/batterymode/normal, after which evcc returned toholdchargeby itself. Values from the evcc state API (10 s interval), battery negative = charging, grid negative = export.holdchargefrom 10:17 to 10:23 with 4.6 to 5.4 kW PV and 4.2 to 5.0 kW exported, so the 30 s refresh keeps the mode alive.holdchargewith house load slightly above PV, the battery supplied 52 to 78 W and the grid stayed within 15 W of zero. Only seen at this small power so far.discharge
2026-12-04, SoC 82 %,
maxdischargepower1000 W,minsoc4 %, vehicle not connected. Mode set throughPOST /api/batterymode/dischargeand renewed once, then released withDELETE /api/batterymode. PV was producing about 4 kW, so the battery discharge shows as additional export.normalfor one cycle, the battery briefly charges from PV, then the optimizer's mode applies again.No Modbus errors in the evcc log during either run.
Not tested
dischargeat higher power, and the stop atminsoc(evcc switches toholddischargethere).holdchargedischarging under a large load.holddischargeandchargeare unchanged;holddischargehas been in daily use with this template since 2026-12-02.Notes
holdchargewhile the battery charges, since the template cannot read the result back. Feedback from @timigit-pro, @softcat and @praetorianer777 would be very welcome.🤖 Template change and this text were prepared with Claude; tests were run and checked by me.