Skip to content

Latest commit

 

History

History
49 lines (40 loc) · 2.28 KB

File metadata and controls

49 lines (40 loc) · 2.28 KB

Architecture

HelioSlate is a loopback web application wrapped in a Windows launcher.

Browser ── HTTP/SSE ──> FastAPI on 127.0.0.1
                              │
                    normalized domain service
                         │              │
                  PVS adapter        SQLite history
                         │
             pinned, read-only HTTPS
                         │
                      PVS6 LAN

The browser never connects to the PVS. The backend owns authentication, certificate validation, polling, normalization, freshness, local persistence, and diagnostics. Live and fixture adapters implement the same snapshot interface so the application remains testable when the gateway is unavailable.

The launcher reserves an available loopback port, starts Uvicorn in-process, opens the default browser, and maintains a system tray menu. A named local mutex prevents accidental duplicate launchers.

Host mode runs a second Uvicorn listener on private interfaces with TLS and lifespan disabled. Both listeners share the same application and collector, so LAN sharing cannot start a duplicate PVS polling loop. Client mode does not start a collector; its loopback API proxies only approved read endpoints to a paired host through a certificate-pinned connection.

Collection

The live collector allows only one in-flight poll. Aggregate live data is requested every ten seconds through a server-side Varserver cache. Device inventory is refreshed less frequently. Timeouts preserve the last successful snapshot and transition its freshness from live to stale to offline.

One-minute aggregates are stored in SQLite WAL mode. Missing intervals remain missing; coverage is calculated rather than interpolated.

Daily, weekly, monthly, and yearly ledgers integrate stored power only across proven collection coverage. Consecutive minute buckets close their shared boundary; outages, pauses, application downtime, and the unfinished edge of the current minute are never extrapolated. History graph ranges are aggregated on the server as one-minute energy buckets for Day, hourly buckets for Week, daily buckets for Month, and weekly buckets for Year. Every plotted value is integrated from proven coverage, and each line breaks whenever adjacent buckets are not continuous.