fix: Corregge calcolo PV_in_watts in modalità QPGS parallela
Build Docker Image for Raspberry Pi / build-and-push (push) Successful in 8m11s
Build Docker Image for Raspberry Pi / build-and-push (push) Successful in 8m11s
DATA[25] ('PV Input Current') nei reply QPGS è in realtà la corrente
in uscita dal SCC (Solar Charge Controller) verso la batteria, a tensione
batteria - NON la corrente ai pannelli PV a tensione PV.
Bug: PV_WATTS = DATA[14] (PV voltage ~246V) * DATA[25] (SCC current ~55A)
→ valore ~4-5x troppo alto (es. 246.8 * 55 = 13574W per inverter)
Fix: PV_WATTS = DATA[11] (battery voltage ~54V) * DATA[25] (SCC current)
→ valore corretto (es. 53.9 * 55 = 2964W per inverter)
Identico al comportamento di QPIGS in main.cpp:
pv_input_watts = scc_voltage * pv_input_current
con commento: 'input current is going to battery at battery voltage
(NOT at PV voltage)'
This commit is contained in:
@@ -514,9 +514,13 @@ for idx in "${!VALID_SERIALS[@]}"; do
|
||||
[ "${DATA[14]}" ] && pushMQTTData "$inv_id" "PV_in_voltage" "${DATA[14]}"
|
||||
[ "${DATA[25]}" ] && pushMQTTData "$inv_id" "PV_in_current" "${DATA[25]}"
|
||||
|
||||
# Calculate PV watts (V * A)
|
||||
if [ ! -z "${DATA[14]}" ] && [ ! -z "${DATA[25]}" ]; then
|
||||
PV_WATTS=`echo "${DATA[14]} ${DATA[25]}" | awk '{printf "%.1f", $1 * $2}'`
|
||||
# Calculate PV watts using battery voltage (DATA[11]) * SCC output current (DATA[25]).
|
||||
# NOTE: Like QPIGS, DATA[25] ("PV Input Current") is actually the current going to the
|
||||
# battery FROM the solar charge controller at battery voltage (NOT at PV panel voltage).
|
||||
# Using PV voltage (DATA[14]) here would give a value ~4-5x too high.
|
||||
# This mirrors the QPIGS formula: pv_input_watts = scc_voltage * pv_input_current
|
||||
if [ ! -z "${DATA[11]}" ] && [ ! -z "${DATA[25]}" ]; then
|
||||
PV_WATTS=`echo "${DATA[11]} ${DATA[25]}" | awk '{printf "%.1f", $1 * $2}'`
|
||||
pushMQTTData "$inv_id" "PV_in_watts" "$PV_WATTS"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user