Add station alerts, dashboard analytics, and settings improvements

Alerts (server):
- Station temp high/low threshold alerts via push + ntfy
- Freeze warning at ≤34°F (station reading)
- Station wind gust threshold alert from real readings
- Station offline alert when no data for >20 min (auto-clears on reconnect)

Dashboard:
- Trend arrows (▲/▼/–) on temp, humidity, dew, wind, pressure, UV, solar tiles
  comparing current vs 1h ago via new /api/station/trend endpoint
- Offline banner when station last reported >15 min ago
- Monthly summary table (avg temp, high temp, max gust, total rain, readings)
- Temperature calendar heatmap — GitHub-style year grid, blue→orange scale
- Alert threshold settings UI: temp high/low, wind gust, rain rate
  saved to all push subscriptions via new /api/subscriptions/thresholds
- Station name setting — persisted in auth file, served on conditions page
- Change password form in settings (no recovery flow needed)

Server:
- GET/POST /api/dashboard/station-name
- POST /api/dashboard/change-password
- GET /api/station/monthly-summary
- GET /api/station/trend
- GET /api/subscriptions, POST /api/subscriptions/thresholds
- /api/conditions/public includes stationName field

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Nate EmmertandClaude Sonnet 4.6 committed 2026-08-19 15:14:35 -04:00
1 parent beb627830f
commit e851fd1ca0
3 files changed
+438 -14

No files matched your search

+6
View File
@@ -609,6 +609,12 @@ async function load() {
return;
}
// Station name (server may include it)
if (d.stationName) {
const nameEl = $('stationName');
if (nameEl) nameEl.textContent = d.stationName;
}
// Header
if (d.dateutc) {
const dt = new Date(d.dateutc);