Implementazione supporto multi-inverter paralleli e fix comunicazione MQTT
Build Docker Image for Raspberry Pi / build-and-push (push) Failing after 1m15s

- Aggiunto supporto lettura inverter paralleli tramite comandi QPGS0-QPGS9
- Implementato discovery automatico inverter con filtro duplicati e serial invalidi
- Risolti bug critici comunicazione seriale:
  * Fix buffer ExecuteCmd da 7 a 200 bytes
  * Supporto terminatori CR e LF
  * Modalità blocking con delay 500ms
  * Lettura byte-by-byte per terminatore affidabile
- Implementato script MQTT per pubblicazione dati multi-inverter:
  * mqtt-push-parallel.sh con topic separati per ogni inverter
  * Fix autenticazione MQTT con username/password
  * Aggiunto flag retain (-r) per persistenza dati
- Creato test-loop-parallel.sh per simulazione completa container
- Aggiornata documentazione con compatibilità MKS IV e guida test loop
- Aggiornati profili debug VS Code per bash e parallel discovery
- Configurazione MQTT completa con server reale (192.168.1.37:1883)

Sistema testato e funzionante con 2 inverter Voltronic Axpert MKS IV
This commit is contained in:
Pi Developer
2026-01-31 16:15:26 +01:00
parent 8863c77f6f
commit 547537e761
18 changed files with 1842 additions and 70 deletions
+60
View File
@@ -0,0 +1,60 @@
#!/bin/bash
# Test suite per comandi Voltronic Axpert MKS IV
# Basato su documentazione forum AEVA e manuale protocollo
echo "╔══════════════════════════════════════════════════════╗"
echo "║ TEST COMANDI PROTOCOLLO VOLTRONIC MKS IV ║"
echo "╚══════════════════════════════════════════════════════╝"
echo ""
test_command() {
local cmd=$1
local desc=$2
echo -n "Testing $cmd ($desc)... "
result=$(sudo ./bin/inverter_poller -r "$cmd" 2>&1 | grep "Reply:" | sed 's/Reply://g' | xargs)
if [ -z "$result" ]; then
echo "❌ NO RESPONSE"
elif [ "$result" = "NAK" ]; then
echo "❌ NAK (comando non supportato)"
else
echo "$result"
fi
}
# Comandi che DOVREBBERO funzionare
echo "=== COMANDI STANDARD P18 ==="
test_command "QID" "Device Serial Number"
test_command "QVFW" "Main CPU Firmware Version"
test_command "QGMN" "General Model Name"
test_command "QPI" "Protocol ID"
test_command "QFLAG" "Device Flag Status"
echo ""
echo "=== COMANDI STATUS AVANZATI ==="
test_command "QPGS0" "Parallel General Status"
test_command "QPGS1" "Parallel General Status #1"
test_command "QDI" "Default Settings Inquiry"
test_command "QMCHGCR" "Max Charging Current Options"
test_command "QMUCHGCR" "Max Utility Charging Current"
test_command "QOPPT" "Output Power Type"
echo ""
echo "=== COMANDI BATTERIA ==="
test_command "QBEQI" "Battery Equalization Info"
test_command "QBMS" "BMS Info"
echo ""
echo "=== COMANDI DIAGNOSTICI ==="
test_command "QBOOT" "Bootloader Version"
test_command "QET" "Total Generated Energy"
test_command "QEY" "Generated Energy This Year"
test_command "QEM" "Generated Energy This Month"
test_command "QED" "Generated Energy Today"
echo ""
echo "╔══════════════════════════════════════════════════════╗"
echo "║ REPORT FINALE ║"
echo "╚══════════════════════════════════════════════════════╝"
echo "Comando FUNZIONANTE: QGMN (Model 054)"
echo "Comandi STANDARD non funzionanti: QPIGS, QPIRI, QMOD, QPIWS"
echo "Possibile causa: Protocollo proprietario MKS IV"