Accomplishments
-
Integrated real-time sensor polling and displayed it on the dashboard
-
Developed a responsive FastAPI + HTMX dashboard to display live sensor values
-
Implemented Chart.js charts that auto-refresh every few seconds without full page reloads
-
Latency about 10s for the API calls, page refreshes every 30s


Progress
Reduced latency by introducing in-memory caching for the a CNN solar forecast endpoint
-
Forecast results are now cached and refreshed every 10 minutes, eliminating redundant model retraining on every request
- Slightly behind progress, need to integrate all the charts in the same app with routing
-
Verification
Performed basic verification of the CNN forecasting model to ensure it meets the intended design requirements for solar prediction accuracy.
-
Input Feature Sanity Checks:
Verified that time-series input includes correctpower,sin_hour, andcos_hourfeatures, resampled to 15-minute intervals.
Resampling was validated via debug logging (len(df),deltadistributions). 

-
Window + Horizon Coverage:
Model was trained on sliding windows (e.g., 48 steps = 12 hours) with a 24-step forecast horizon. These parameters were confirmed to provide full diurnal coverage and enough context for trend learning. -
Envelope Alignment Verification:
The daylight envelope was implemented and centered around peak solar generation (13:00–14:00) to prevent unrealistic output at midnight. Forecasts before and after masking were compared to confirm correction. -
Polling Interval Consistency:
The system pulls data using HA/api/history/periodendpoint. I confirmed that sensors such assensor.maya_solar_panel,sensor.maya_fan_power,sensor.maya_fan_voltage, andsensor.maya_fan_currentare polled with sufficient granularity — typically every 5–10 minutes. -
Each response is parsed to validate:
-
stateis numeric and finite -
last_changedtimestamps are increasing and consistent -
There are no large gaps in time , > 1 hour)
-
-
Resampling Debug Logs:
Added internal logging to capture the number of raw and resampled datapoints. This ensures the model always receives enough sequential history for the sliding window.
Used interpolation (.interpolate()) on the resampled time-series to ensure continuity in data, even if occasional values are missing from Home Assistant. - latency tests via time curl http://localhost:5051/api/endpoint to make sure the dashboard refresh updates meet design and usecase requirements
Next Steps
-
Test LP behavior under forecast uncertainty
-
Run LP with low vs. high solar predictions
-
Assess how schedules shift and whether they violate any constraints
-
-
Stress-test LP under edge-case constraints
-
Zero solar availability
-
Multiple high-power devices requiring overlap
-
Very short vs. very long runtime constraints
-
Test LP reactivity to live data
-
Feed in updated solar forecast every hour
-
Ensure LP returns updated schedules quickly (<2 sec)
