You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 703c0e3
Browse filesBrowse the repository at this point in the historyBrowse files
fix(solis): stop trusting SolisCloud's slot metadata, and sweep the probe to a half amp
Issue #5068. The slot current cap was lowered to the smallest sysCommand max
that the API-key route returns with each slot register. That metadata is a
UI definition for a list of model codes (its productModel), and SolisCloud
returns definitions for other models.
An S5-EH1P5K-L (model 3104, 5kW, 51.2V pack, 100A in CID 7224/7226) was given:
- 60A for its slot currents, from the definition for models 3101/3102
- 62.5A for slot 1 charge, from the definition for models 3111/3140/3145
- 70A for CID 7224, which reads 100A
Its slots 2-6 held 100A the whole time. Predbat still capped slot 1 at 60A,
about 3.1kW from the battery, and the customer saw exports of around 3.6kW
on a 5kW inverter.
The metadata is now ignored. The battery-side cap is the register itself.
The probe starts from it and measures what the slots really accept, with
the rated estimate as the fallback until it has run.
The probe sweep now ends with one half-amp step. After 1A up is refused,
it tries 0.5A up, so a ceiling such as 62.5A is found exactly rather than
rounded down to 62A. Candidates are written as the inverter shows them
("60", "62.5").
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
returnawaitself.probe_slot_write(inverter_sn, cid, amps, f"probe {direction} slot {slot} current {amps}A")
1427
+
returnawaitself.probe_slot_write(inverter_sn, cid, amps, f"probe {direction} slot {slot} current {amps:g}A")
1436
1428
1437
1429
try:
1438
-
upper=int(upper)
1439
-
amps=min(int(start), upper)
1430
+
upper=float(upper)
1431
+
amps=min(float(start), upper)
1440
1432
verdict=awaitattempt(amps)
1441
1433
ifverdictisNone:
1442
1434
returnNone
@@ -1447,7 +1439,7 @@ async def attempt(amps):
1447
1439
whilenotverdict:
1448
1440
amps-=SOLIS_SLOT_PROBE_STEP_DOWN_AMPS
1449
1441
ifamps<SOLIS_SLOT_PROBE_MIN_AMPS:
1450
-
self.log(f"Warn: Solis API: {inverter_sn} refused every {direction} slot current down to {amps+SOLIS_SLOT_PROBE_STEP_DOWN_AMPS}A - not a real ceiling, nothing learned")
1442
+
self.log(f"Warn: Solis API: {inverter_sn} refused every {direction} slot current down to {amps+SOLIS_SLOT_PROBE_STEP_DOWN_AMPS:g}A - not a real ceiling, nothing learned")
1451
1443
returnNone
1452
1444
verdict=awaitattempt(amps)
1453
1445
ifverdictisNone:
@@ -1460,9 +1452,18 @@ async def attempt(amps):
1460
1452
ifverdictisNone:
1461
1453
returnNone
1462
1454
ifnotverdict:
1455
+
refused=amps+1
1463
1456
break
1464
1457
amps+=1
1465
-
returnfloat(amps)
1458
+
# Some ceilings sit on a half amp, so one step finer before settling
0 commit comments