From 363d3f8bbdec29e22c6a2263a7e059c4f7d78a11 Mon Sep 17 00:00:00 2001 From: Roby Date: Sun, 19 Apr 2026 09:54:54 +0200 Subject: [PATCH] update README.md --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ab0bb7c..9f5d767 100644 --- a/README.md +++ b/README.md @@ -13,16 +13,18 @@ ### 🏗️ System Architecture The ecosystem consists of three main parts: -1. **The Central Dashboard (`app.py`):** A Flask web server that handles the UI, user permissions (SQLite), and logic. +1. **The Central Dashboard (`app.py`):** A Flask web server that handles the UI (with modern Glassmorphism design), user permissions (SQLite), and logic. 2. **The Remote Agent (`system_monitor.py`):** A lightweight script running on each repeater (Raspberry Pi/Linux) that monitors hardware and executes commands. 3. **The MQTT Broker:** The communication backbone. All data and commands flow through MQTT for near-instant responsiveness. ### ✨ Features * **Centralized Telemetry:** Real-time CPU, RAM, Temperature, and Disk usage for all nodes. * **Service Management:** Start, Stop, or Restart system daemons (MMDVMHost, DMRGateway, etc.) remotely. +* **Smart Auto-Healing:** The agent automatically detects crashed services and attempts to revive them before raising critical alerts (includes Telegram notifications). +* **Hardware Reset (GPIO):** Physically reboot the MMDVM radio HAT via GPIO pins directly from the dashboard, automatically restarting the host daemon for a fail-proof serial connection recovery. * **Remote Configuration:** Built-in web editor for `.ini` files—no SSH required. * **Live Transit Log:** Unified view of radio traffic across the entire network. -* **Profile Switching:** Toggle between different repeater setups (e.g., Profile A/B) with one click. +* **Global Operations:** Switch profiles (e.g., Profile A/B) or force network-wide configuration updates instantly on all repeaters with one click. ### 🚀 Installation & Setup @@ -34,8 +36,9 @@ The ecosystem consists of three main parts: #### 2. Agent Setup (Remote Nodes) The `system_monitor.py` must be installed on every node you wish to monitor. +* *(Optional)* Install `RPi.GPIO` (`pip install RPi.GPIO` or `apt install python3-rpi.gpio`) if you plan to use the physical Hardware Reset feature. * Place `system_monitor.py` and `node_config.json` in a folder (e.g., `/opt/node_agent/`). -* Edit `monitor_config.ini` to set the `client_id` (must match the ID in `clients.json`) and MQTT credentials. +* Edit `node_config.json` to set the `client_id` (must match the ID in `clients.json`) and MQTT credentials. * (Recommended) Set up a systemd service to run the agent automatically at boot. --- @@ -49,16 +52,18 @@ The `system_monitor.py` must be installed on every node you wish to monitor. ### 🏗️ Architettura del Sistema L'ecosistema si compone di tre parti principali: -1. **Dashboard Centrale (`app.py`):** Un server web Flask che gestisce l'interfaccia, i permessi utenti (SQLite) e la logica di controllo. +1. **Dashboard Centrale (`app.py`):** Un server web Flask che gestisce l'interfaccia (con design moderno in stile Glassmorphism), i permessi utenti (SQLite) e la logica di controllo. 2. **Agente Remoto (`system_monitor.py`):** Uno script leggero in esecuzione su ogni ripetitore (Raspberry Pi/Linux) che raccoglie i dati hardware ed esegue i comandi. 3. **Broker MQTT:** Il centro nevralgico della comunicazione. Tutti i dati e i comandi viaggiano su MQTT per una reattività istantanea. ### ✨ Funzionalità * **Telemetria Centralizzata:** Stato in tempo reale di CPU, RAM, Temperatura e Disco di tutti i nodi. * **Gestione Servizi:** Avvio, arresto o riavvio dei demoni di sistema (MMDVMHost, DMRGateway, ecc.) da remoto. +* **Auto-Healing Intelligente:** L'agente rileva automaticamente i servizi andati in blocco e tenta di rianimarli prima di inviare allarmi critici (include notifiche Telegram). +* **Reset Hardware (GPIO):** Invia un impulso di reset fisico alla scheda radio MMDVM tramite i pin GPIO direttamente dalla dashboard, riavviando automaticamente il demone host per ripristinare la comunicazione seriale. * **Configurazione Remota:** Editor web integrato per i file `.ini`: modifica i parametri senza accedere in SSH. * **Log Transiti Live:** Vista unificata del traffico radio di tutta la rete. -* **Cambio Profilo:** Commuta tra diversi assetti del ripetitore (es. Profilo A/B) con un clic. +* **Operazioni Globali:** Commuta tra diversi assetti (es. Profilo A/B) o forza l'aggiornamento dei dati contemporaneamente su tutta la rete con un solo clic. ### 🚀 Installazione e Configurazione @@ -70,6 +75,7 @@ L'ecosistema si compone di tre parti principali: #### 2. Setup dell'Agente (Nodi Remoti) Il file `system_monitor.py` va installato su ogni nodo che vuoi monitorare. +* *(Opzionale)* Installa `RPi.GPIO` (`pip install RPi.GPIO` o `apt install python3-rpi.gpio`) se intendi utilizzare la funzione di Reset Hardware fisico della scheda. * Copia `system_monitor.py` e `node_config.json` in una cartella (es. `/opt/node_agent/`). * Modifica `node_config.json` impostando il `client_id` (deve corrispondere all'ID in `clients.json`) e le credenziali MQTT. * (Consigliato) Crea un servizio systemd per avviare l'agente automaticamente al boot.