SunComms runs on a Raspberry Pi (4 or 5) and monitors solar inverters via Modbus RTU (RS-485) and Modbus TCP.
git clone https://github.com/foodisbeast/suncomms.git
cd suncomms
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python app.py
SunComms is a monolithic Python/Flask application with modular subsystems:
app.py — Flask web server + APImodbus_engine.py — Modbus RTU communicationdatabase.py — SQLite storage with retentioncomms_health.py — Per-device health monitoringbackoff_retry.py — Smart retry with exponential backoffself_healing.py — Automated recovery actionsalerting.py — Correlated alerting + impact scoringdiag_proxy.py — Diagnostic tools proxynormalization.py — Unit normalization layersunspec.py — SunSpec auto-discoveryGET /api/status — System status
GET /api/devices — All configured devices
GET /api/readings — Latest readings
GET /api/network — Network status
GET /api/health/comms — Comms health per device
GET /api/health/backoff — Backoff/retry status
GET /api/health/healing — Self-healing history
GET /api/health/time — NTP sync status
GET /api/health/changes — Config change log
GET /api/alerts — Active alerts
POST /api/diag/read — Live register read
GET /api/diag/frames — Raw Modbus frames
POST /api/diag/snapshot — Diagnostic snapshot
GET /api/fleet — Fleet overview
GET /api/ota/status — Update status
POST /api/ota/check — Check for updates
POST /api/ota/update — Apply update
SunComms is open source. Check the GitHub repository for issues and pull requests.