feat: Flusso completo discovery parallelo per 2 inverter
Build Docker Image for Raspberry Pi / build-and-push (push) Successful in 7m34s
Build Docker Image for Raspberry Pi / build-and-push (push) Successful in 7m34s
FLUSSO IMPLEMENTATO: 1. All'avvio: registra discovery topics per 2 inverter (hardcoded) 2. Discovery topics ripetuti ogni 5 minuti (invece di 10) 3. Parallel discovery parametri con retry: - Tenta discovery fino a 3 volte - Se fallisce: attende 5s e riprova - Se tutti i tentativi falliscono: assume 2 inverter 4. Estrazione dati ogni 30s per entrambi gli inverter NAMING: - Inverter 1: voltronic_inv1_* - Inverter 2: voltronic_inv2_* Discovery topics include tutti i 33 parametri per entrambi gli inverter
This commit is contained in:
@@ -236,7 +236,7 @@ fi
|
||||
|
||||
echo ""
|
||||
echo "=== Starting MQTT Bridge Services ==="
|
||||
echo "Using parallel inverter mode"
|
||||
echo "Using parallel inverter mode (2 inverters)"
|
||||
echo ""
|
||||
|
||||
# Wait a bit for the device to be ready
|
||||
@@ -246,10 +246,10 @@ sleep 2
|
||||
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)
|
||||
# Init the mqtt server for the first time, then every 5 minutes (300 seconds)
|
||||
# This will re-create the auto-created topics in the MQTT server if HA is restarted...
|
||||
echo "Starting MQTT initialization service (every 10 minutes)..."
|
||||
watch -n 600 "$MQTT_INIT_SCRIPT" > /dev/null 2>&1 &
|
||||
echo "Starting MQTT initialization service (every 5 minutes)..."
|
||||
watch -n 300 "$MQTT_INIT_SCRIPT" > /dev/null 2>&1 &
|
||||
|
||||
# Run the MQTT Subscriber process in the background (so that way we can change the configuration on the inverter from home assistant)
|
||||
echo "Starting MQTT subscriber for commands..."
|
||||
|
||||
Reference in New Issue
Block a user