Commit a1cbe22
committed
Handle B2500 pass-through at 100% SoC (#338)
Reported by the repo owner as a follow-up: when the B2500 is at 100%
SoC any incoming DC solar flows straight through as AC output, so it
reports positive power regardless of commands. Against the pre-fix
balancer this pins the Venus around -340 W via the balance-correction
+ sign-clamp interaction, leaving ~160 W of sustained feed-in — and
reproduces the user's symptom without any Venus startup-threshold
assumption.
The earlier commit fixed the split-evenly deadlock but the strict
``grid_total < 0`` guard let go at the exact zero-crossing during
pass-through equilibrium (Venus at -500 W, B2500 at +500 W, grid at
0 W): the balance-correction fired, pushed Venus positive by one
max_correction_per_step, and the system oscillated.
Extend the charge-blind mask to also fire at ``grid_total == 0`` when
any AC-chargeable battery is currently charging (``power < 0``).
That signals pass-through equilibrium specifically, and keeps the
discharge path untouched — a pure-discharge equilibrium at grid=0
has both batteries at positive power, so the extension doesn't
activate.
Adds ``B2500PassThrough`` to the test harness and a regression test
verifying Venus converges to -500 W and grid to 0 W under the
500 W pass-through scenario.1 parent 726e202 commit a1cbe22
2 files changed
Lines changed: 97 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
840 | 856 | | |
841 | 857 | | |
842 | 858 | | |
843 | 859 | | |
844 | 860 | | |
845 | 861 | | |
846 | | - | |
| 862 | + | |
847 | 863 | | |
848 | 864 | | |
849 | 865 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
143 | 174 | | |
144 | 175 | | |
145 | 176 | | |
| |||
317 | 348 | | |
318 | 349 | | |
319 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
320 | 395 | | |
321 | 396 | | |
322 | 397 | | |
| |||
0 commit comments