refactor: Rimuove discovery, usa QPGS diretto in cascade mode
Build Docker Image for Raspberry Pi / build-and-push (push) Has been cancelled

- mqtt-push-parallel.sh: riscritto da 659 a 230 righe
  * Rimosse tutte le meccaniche di serial discovery (VALID_SERIALS,
    VALID_QPGS, PARALLEL_DISCOVERY, DIRECT_SERIALS, ecc.)
  * Ora query direte QPGS0→inv1, QPGS1→inv2 senza discovery preliminare
  * Numero inverter configurabile via CASCADE_COUNT env var (default 2)
  * Fix PV_in_watts: quando DATA[25]=0 (batteria carica) e SCC_OK e
    no AC grid (line_loss=1), usa Load_watt come proxy di produzione PV
  * Aggiunto publish di PV_in_watthour e Load_watthour
  * Aggiunto parsing corretto dei status flags dal byte di stato QPGS

- entrypoint.sh: riscritto da 240 a 131 righe
  * Rimossa intera logica di auto-discovery buffer sizes
  * Rimossi FORCE_DISCOVERY, SKIP_DISCOVERY, DISCOVERY_FLAG
  * Rimossi run_discovery() e update_config_with_discovery()
  * Startup immediato senza attese/tentativi di discovery
  * CASCADE_COUNT env var propagata agli script

- healthcheck: corretto per processi effettivi del container
  * Prima: cercava mqtt-subscriber + mosquitto_sub + watch (3 proc)
  * watch non viene mai avviato → sempre unhealthy
  * Ora: controlla mosquitto_sub (subscriber) + sleep (push loop cicla)
This commit is contained in:
Pi Developer
2026-02-22 15:02:22 +01:00
parent 4d5ed5d845
commit 078544381e
3 changed files with 195 additions and 783 deletions
+6 -2
View File
@@ -1,8 +1,12 @@
#!/bin/bash
PROC=`ps cax | grep -E "mqtt-subscriber|mosquitto_sub|watch" | awk '{print $5}' | sort -u | wc -l`
# Check that the MQTT subscriber (mosquitto_sub) and the main push loop (sleep 30)
# are both running. The subscriber handles incoming commands from Home Assistant,
# the sleep 30 indicates the push loop is actively cycling.
SUBSCRIBER=`ps ax | grep "mosquitto_sub" | grep -v grep | wc -l`
LOOP=`ps ax | grep "sleep 30" | grep -v grep | wc -l`
if [ "$PROC" -eq "3" ] ; then
if [ "$SUBSCRIBER" -ge "1" ] && [ "$LOOP" -ge "1" ] ; then
exit 0
else
exit 99