Realtime endpoint was summing ALL device power readings, causing
double-counting when multiple devices share the same Sungrow station.
E.g. 10 devices × station-level power = 5x inflated total.
Fix: GROUP BY station prefix (first 3 chars of device name) and
take MAX per station. Same fix applied to KPI daily_generation.
Result: 5,550 kW → 1,931 kW (matches iSolarCloud's 2,049 kW
within the 15-min collection timing window).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New endpoints:
- GET /api/v1/version — returns VERSIONS.json (no auth required)
For field engineers to check platform version from login page
- GET /api/v1/kpi/solar — returns PR, self-consumption rate,
equivalent utilization hours, and daily revenue
Handles station-level vs device-level data deduplication
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>