Repository navigation
feat(drivers): align Solis + Deye control with Zap reference - #74
Conversation
Previous register layouts diverged from what works on real hardware. Cross-checked Solis Appendix 7 + Deye MODBUS RTU V105.3 against the Srcful Zap firmware control profiles (validated in production on SUN-SG LV/HV and Solis S5/S6) and pulled the working layout over. Solis: rewrite to the Zap-confirmed register set. 43110 carries the mode bit-field (0x60 = forced, 0x21 = self-consume+TOU), 43129/43136 hold charge + discharge power in 10 W units, 43135 selects direction, 43130/43131 seed the per-direction limits at init. 100 ms inter-write pacing. Lazy init with config.rated_w override. Deye: strict HV/LV detect on reg 0 (raw == 6 = HV, matching the Zap reference), 13-register init profile, current-based charge via reg 108 with a live battery-voltage read from reg 587 (A = W / V), power-based discharge via reg 154 with HV ÷10 / LV ×1 scaling, curtailment via regs 143 + 145, 5-register self-consumption revert. 50 ms inter-write pacing. New YAML knobs: rated_w, max_grid_charge_a (reg 128, clamped 0..185), soc_min / soc_max (reg 166 targets, clamped 0..100 with min>max swap guard). host: add host.sleep(ms) to the Lua driver host for vendor-required inter-write pacing. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Nice work — looks like a well-considered alignment with the Zap reference. Read through the full diff (601 lines). A few observations that don't block merge but are worth being aware of: Noted behavior changes
Minor (nothing to fix now)
Everything else looks good: |
## [0.7.0](v0.6.1...v0.7.0) (2026-04-16) ### Features * **drivers:** align Solis + Deye control with Zap reference ([#74](#74)) ([281f4df](281f4df))
|
And a parallel heads-up since you're active in the repo right now: today we had a small history-revision incident where a Claude session on my side did a force-push that accidentally erased PR #71's merge commit from origin/master. The content is restored via PR #75 (cherry-pick with Erik preserved as author), but the |
Summary
43110(mode bit-field),43129/43136(power, 10 W units),43135(mode select),43130/43131(per-direction limits at init). 100 ms inter-write pacing.0, 13-register init profile, current-based charge via reg108using a live battery-voltage read (reg587, A = W / V), power-based discharge via reg154with HV/LV scaling, curtailment via regs143+145, 5-register self-consumption revert. 50 ms inter-write pacing.host.sleep(ms)to the Lua driver host for vendor-required inter-write pacing.rated_w,max_grid_charge_a(reg 128, clamped 0..185),soc_min/soc_max(reg 166 targets, clamped 0..100 with swap guard).Why
Previous register layouts diverged from what hardware actually accepts. Cross-checked Solis Appendix 7 + Deye MODBUS RTU V105.3 docs against the Srcful Zap firmware's control profiles, which are validated in production on SUN-SG LV/HV and Solis S5/S6, and pulled the working layout over. Notable semantic clarification from the Deye V105.3 doc:
108= total max battery-charge current (any source) → the runtime regulator.128= grid-source charge-current sub-cap → static, sized to the install's main fuse / subscription.172= per-TOU charge-enable bit-field (bit0 grid, bit1 gen); value3= both on.Test plan
go build ./...cleango test ./...green (all packages)drivers/solis.lua+drivers/deye.luaload clean in gopher-luadriver_default_modelands the device in self-consumption🤖 Generated with Claude Code