Root cause of the grid-calibration auto-revert silently failing: lvx-control and flash.py encode output_priority solar_battery_utility as "POP01", but PI18 POP is single-digit — the inverter silently rejects "POP01" (raw "POP1" works, matches the POP_PIRI decoder). Compounded by powermon's adhoc queue wedging, which dropped commands entirely until a restart. So the monitor logged "revert done" while the cluster sat in SUB/grid mode for ~1.5h (no harm: battery full, just running loads on grid). - lvx-control + flash.py: POP_MAP "01" -> "1" (also patched the live /usr/local/bin/lvx-control + restarted; verified it now emits POP1). - grid-cal-monitor: revert now VERIFIES via behavior (line_power_direction leaves 'input'), and on failure restarts powermon and re-sends raw POP1/PCP0,0, with a loud manual-fallback message. No more trust-the-publish. Recovery for the live run: restarted powermon (unstuck adhoc) + raw POP1 + PCP0,0; confirmed POP=Solar-Battery-Utility, PCP=Solar First, mode=Battery, line_dir=donothing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
30 KiB
Executable File
30 KiB
Executable File