Record when the server received a request and use that, not the time the
inverter answered, for the cache window, so slow inverter reads no longer
shorten or stretch it for other clients.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Define CLIENT_POLL_INTERVAL (5 s) in app.py, cache a reading for 4.8 s and
pass the interval to the page, so several clients share one inverter read
instead of each triggering their own.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Keep the old card values and show an amber "retrying" status after a single
failed update; only grey out the cards and show the red error after two
consecutive failures (MAX_TOLERATED_ERRORS). A failed first load still
shows the error immediately.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- writable_registers.py: shared whitelist, ranges and defaults (230: 0-115 A,
293: 0-6500 W; defaults 43 and 4500) with strict validate_write()
- app.py: POST /api/registers validates everything before writing, writes
under the inverter lock, reads each register back to verify; also reads
register 230 for display
- index.html: Settings section with per-register Set, Default button,
client-side digit/range checks and a confirm dialog
- read_registers.py: use the shared limits; README documents the feature
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- app.py: scan all 15 pack slots (600-809) on first request and every 5
minutes; packs with zero voltage and SOC are dropped, and later reads
only cover the active packs
- Per-pack byte-swap detection (SOC out of range raw but valid swapped)
instead of assuming pack 2 is swapped
- API now returns bms_packs[] in place of the bms2_* fields
- index.html renders one section per connected pack, none if empty
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- read_registers.py: --read N|START-END|START:COUNT for arbitrary registers
(chunked, shows dec/hex/signed); README documents the tool
- app.py: BMS pack 2 (614-627) is byte-swapped by the firmware; swap back
and scale (SOC 0.1%, temp +1000 offset); pack 1 is unused, so drop it
- index.html: BMS cards now show pack 2 SOC, voltage, current, temp,
charge voltage and BMS charge current limit
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>