Skip to content

fix(solis): stop trusting SolisCloud's slot metadata, and sweep the probe to a half amp - #5314

Merged
springfall2008 merged 1 commit into
mainfrom
fix/solis-ignore-slot-metadata-5068
Sep 30, 2026
Merged

springfall2008 merged 1 commit into
mainfrom
fix/solis-ignore-slot-metadata-5068

Conversation

@springfall2008

@springfall2008 springfall2008 commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Fixes #5068. Follows #5309.

Problem

On the API-key route, SolisCloud's batch read returns a sysCommand definition with each register. Predbat capped slot currents at the smallest sysCommand.max across the six slots. That definition is a cloud UI entry for a list of model codes (productModel), and the cloud hands back entries for other models.

Live on an S5-EH1P5K-L (model 3104, 5 kW, one PureDrive LV pack at 51.2 V, CID 7224/7226 = 100 A):

Register Advertised max Applies to models Held on the inverter
Slots 2–6 charge and discharge, discharge slot 1 60 A f4,f7,f8,3101,3102,3109,3110,3121,3122,f5 100 A (slots 2–6)
Charge slot 1 62.5 A 3111,3140,3145 60 A (Predbat-capped)
CID 7224 70 A long 31xx/5xxx list 100 A

3104 is in none of those lists. Predbat still capped slot 1 at 60 A (≈3.1 kW from the battery), so the customer saw exports of about 3.6 kW on a 5 kW inverter. max_export_power was 99999 (no limit). The 60 A entry does match model 3102, whose real 60 A ceiling #5309 measured by probing.

Change

  • sysCommand metadata is ignored. The battery-side cap is the CID 7224/7226 register itself. The fix(solis): probe the slot current ceiling the inverter enforces but does not report #5309 probe starts there and measures what the slots really accept. Until it has run, the rated estimate is the fallback, as before.
  • The probe sweep ends on a half amp. After 1 A up is refused, it tries 0.5 A up, so a ceiling such as 62.5 A is found exactly rather than rounded down to 62 A. Candidates are written as the inverter shows them (60, 62.5). This adds one write per direction to a probe.
  • The limits log line no longer mentions metadata.

Testing

  • test_slot_current_limits_inputs now covers the 5 kW case, using the real definitions and model lists from the inverter. The metadata does not lower the 100 A battery cap, and the unprobed cap is the 97 A rated estimate rather than 60 A.
  • New test_slot_probe_finds_half_amp_ceiling: a 62.5 A ceiling is found as 62.5 A (62 kept, 63 refused, 62.5 kept).
  • The existing probe sequences now include the half-amp step.
  • Against main's solis.py, run test by test, all three fail: the metadata lowers the cap, 62.5 A is found as 62 A, and the sequence has no half step. All pass with the change.
  • ./run_all --quick passes, and pre-commit passes on the changed files.

Notes

  • Live on the 5 kW inverter with this branch:
    • Before the probe, the cap was the 97 A rated estimate (not the 60 A metadata), and slot_*_power_max/battery_rate_max read 4966 W.
    • The probe then learned 100 A both ways, from disabled slot 6.
    • Slot 6 already held 100 A, so that was taken as accepted without a new write. That is deliberate: a value the inverter already holds is treated as accepted, to avoid extra writes.
  • tools/debug-journal.md's Solis row still describes the sysCommand minimum as a deliberate cap (the GH#5068 paragraph). It can be refreshed once this merges.

🤖 Generated with Claude Code

…robe 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>
@springfall2008 springfall2008 self-assigned this Sep 30, 2026
@springfall2008
springfall2008 merged commit b92fea4 into main Sep 30, 2026
2 checks passed
@springfall2008
springfall2008 deleted the fix/solis-ignore-slot-metadata-5068 branch September 30, 2026 07:22
springfall2008 added a commit that referenced this pull request Oct 2, 2026
…0-01

docs(debug-journal): fold in the 2026-10-01 queue slice (9 candidates); mark GH#5313 fixed by PR #5315, GH#5136 by PR #5293, GH#5222 by PR #5283, the iog-slot-io-adjusted row by PR #5304, GH#5068 reworked by PRs #5309/#5314; add the dynamic-load car cancel row and the GH#2649/#5302/#5324 findings
gcoan pushed a commit to gcoan/batpred that referenced this pull request Oct 3, 2026
…); mark GH#5313 fixed by PR springfall2008#5315, GH#5136 by PR springfall2008#5293, GH#5222 by PR springfall2008#5283, the iog-slot-io-adjusted row by PR springfall2008#5304, GH#5068 reworked by PRs springfall2008#5309/springfall2008#5314; add the dynamic-load car cancel row and the GH#2649/springfall2008#5302/springfall2008#5324 findings

Co-Authored-By: Claude Code <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Battery discharge rate limited to 60A with Solis inverter

1 participant