feat: Forza modalità parallela con default 2 inverter
Build Docker Image for Raspberry Pi / build-and-push (push) Successful in 7m6s

- Rimosso timeout e detection automatica
- Sempre modalità parallela forzata
- Default 2 inverter se parallel discovery fallisce
- Registra discovery per voltronic_inv1 e voltronic_inv2

NOTA: Se gli inverter non rispondono a QPGS, NON sono in modalità parallela.
Per gestire 2 inverter fisici separati, serve INVERTER_DEVICES=/dev/ttyUSB0:/dev/ttyUSB1
This commit is contained in:
Pi Developer
2026-02-02 23:43:12 +01:00
parent c73ebc825c
commit 0143e8eb36
3 changed files with 19 additions and 53 deletions
+5 -35
View File
@@ -235,46 +235,16 @@ if [ "$NEED_DISCOVERY" = "true" ]; then
fi
echo ""
echo "=== Detecting Inverter Configuration ==="
echo "=== Starting MQTT Bridge Services ==="
echo "Using parallel inverter mode"
echo ""
# Wait a bit for the device to be ready
sleep 2
# Check for parallel inverters (with timeout to avoid hanging)
echo "Checking for parallel inverters..."
PARALLEL_CHECK=$(timeout 15 /opt/inverter-cli/bin/inverter_poller -p 2>&1)
PARALLEL_EXIT=$?
if [ $PARALLEL_EXIT -eq 124 ]; then
echo "⚠ Parallel discovery timed out (15s), using single inverter mode"
USE_PARALLEL=false
else
PARALLEL_COUNT=$(echo "$PARALLEL_CHECK" | grep "PARALLEL_COUNT=" | cut -d= -f2)
if [ ! -z "$PARALLEL_COUNT" ] && [ "$PARALLEL_COUNT" -gt 0 ]; then
echo "✓ Detected $PARALLEL_COUNT parallel inverter(s)"
echo " Using parallel mode scripts..."
USE_PARALLEL=true
else
echo " Single inverter mode (count=$PARALLEL_COUNT)"
echo " Using standard scripts..."
USE_PARALLEL=false
fi
fi
# Set script paths based on mode
if [ "$USE_PARALLEL" = true ]; then
MQTT_PUSH_SCRIPT="/opt/inverter-mqtt/mqtt-push-parallel.sh"
MQTT_INIT_SCRIPT="/opt/inverter-mqtt/mqtt-init-parallel.sh"
else
MQTT_PUSH_SCRIPT="/opt/inverter-mqtt/mqtt-push.sh"
MQTT_INIT_SCRIPT="/opt/inverter-mqtt/mqtt-init.sh"
fi
echo ""
echo "=== Starting MQTT Bridge Services ==="
echo ""
# Always use parallel scripts
MQTT_PUSH_SCRIPT="/opt/inverter-mqtt/mqtt-push-parallel.sh"
MQTT_INIT_SCRIPT="/opt/inverter-mqtt/mqtt-init-parallel.sh"
# Init the mqtt server for the first time, then every 10 minutes (600 seconds)
# This will re-create the auto-created topics in the MQTT server if HA is restarted...