Files
shaggy-solar/LVX6048/lvx-flash/profiles/eg4-lp4-v2-calibration.yaml
noise 76765a95ed Grid calibration: correct lever is output-priority SUB, add grid-cal-monitor
Discovered live 2026-06-25 driving an actual grid calibration: forcing a full
grid charge is done via OUTPUT PRIORITY, not voltage thresholds.
- SBU (everyday) won't grid-charge unless the bank is critically low; setting
  charger_priority=solar_and_utility alone does nothing at 52V.
- SUB (output_priority=solar_utility_battery) runs loads on grid AND charges the
  battery to full. Combined with charger_priority=solar_and_utility, grid charging
  engages (device_mode->Hybrid/Line, line_dir->input, pack current jumps to ~120A).
- Both POP/PCP set via lvx-control (all-mode-safe, atomic, no flash/USB). Revert
  POP->solar_battery_utility, PCP->solar_first when done.

The re_discharge/flash.py approach is dead (firmware NAKs stop_charge>float);
profile eg4-lp4-v2-calibration.yaml marked DEPRECATED.

- grid-cal-monitor: supervises a SUB grid charge, safety aborts (cell>3.60V/
  temp>45C), detects re-anchor (all 6 packs ->100%), auto-reverts POP+PCP (trap).
- calibration-charge skill §3 rewritten to the POP lever.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 12:35:51 -04:00

68 lines
3.6 KiB
YAML

# LVX6048 settings profile — TEMPORARY calibration charge for the EG4 LP4 v2 bank.
#
# Purpose: re-anchor drifted EG4 pack SoC counters (and top-balance) by letting the
# bank reach a FULL charge with absorption hold. The EG4 BMS resets SoC to 100% only
# on a real full-charge termination (high cell voltage + low taper current); the
# conservative everyday profile stops grid charging at 54.0 V (mid-knee), so on cloudy
# / high-load stretches the bank may go weeks without a full charge and the coulomb
# counters drift (e.g. pack 6 read 76% while physically at ~53% on 2026-06-24).
#
# !!! DEPRECATED 2026-06-25 — DO NOT USE. The re_discharge lever does not work for
# grid calibration: firmware NAKs stop_charge_voltage above float (56 > 54), and it's
# the wrong mechanism anyway. The CORRECT grid-charge lever is output priority -> SUB
# (solar_utility_battery) via lvx-control — see the calibration-charge skill §3 and
# memory project_lvx6048_grid_charge_lever. Kept only as a record of the dead end.
#
# !!! 2026-06-24 FINDING — grid-assist lever corrected, still UNVALIDATED !!!
# The original idea (stop_charge_voltage: 0 = "Full") was REJECTED by the firmware:
# `flash.py apply` got an inverter NAK on `BUCD480,000` on BOTH units (no change made).
# The field flash.py calls `stop_charge_voltage` is really the inverter's
# **battery_re_discharge_voltage** (HA: sensor.lvx6048_*_battery_re_discharge_voltage) —
# the voltage at which the inverter switches loads back to battery after grid charging.
# At 54.0 V, grid tops the bank only to ~54 V. Raising it (below) lets grid charge
# higher, BUT it may band-oscillate near the setpoint rather than hold a clean
# absorption, so it's NOT guaranteed to give the full-charge termination the BMS needs
# to re-anchor. SOLAR-ONLY is the known-good method (solar follows the full CC/CV curve
# to bulk + absorption); use this grid profile only as a supervised experiment.
#
# Corrected (candidate) change vs canonical: stop_charge_voltage 54.0 -> 56.0 (was 0).
# bulk_voltage stays 56.4 (absorption target).
#
# USE: this is a TEMPORARY profile driven by the `calibration-charge` skill. Apply to
# BOTH inverters, run the full charge, verify all 6 packs hit 100%, then REVERT to
# eg4-lp4-v2.yaml. Do not leave this profile applied — it removes the everyday
# grid-charge ceiling.
#
# sudo systemctl stop powermon.service powermon2.service
# ./flash.py apply --device /dev/lvx6048-1 --profile profiles/eg4-lp4-v2-calibration.yaml --confirm
# ./flash.py apply --device /dev/lvx6048-2 --profile profiles/eg4-lp4-v2-calibration.yaml --confirm
# ./flash.py compare --device-a /dev/lvx6048-1 --device-b /dev/lvx6048-2
# sudo systemctl start powermon.service powermon2.service
# # ... drive + verify the charge (see calibration-charge skill) ...
# # REVERT when all packs read 100%:
# sudo systemctl stop powermon.service powermon2.service
# ./flash.py apply --device /dev/lvx6048-1 --profile profiles/eg4-lp4-v2.yaml --confirm
# ./flash.py apply --device /dev/lvx6048-2 --profile profiles/eg4-lp4-v2.yaml --confirm
# sudo systemctl start powermon.service powermon2.service
battery_type: USER
cutoff_voltage: 48.0
stop_discharge_voltage: 48.0
# re-discharge voltage. 54.0 (canonical) tops grid charge to ~54 V; 56.0 lets grid
# charge higher. NOT 0 — firmware NAKs 0/"Full". Range 48.0..58.0. UNVALIDATED lever.
stop_charge_voltage: 56.0
bulk_voltage: 56.4
float_voltage: 54.0
max_charging_current: 60
max_utility_charging_current: 30
output_source_priority: solar_battery_utility
charger_priority: solar_first
solar_power_priority: battery_load_utility_ac
grid_tie: disabled