{"id":258,"date":"2025-04-13T00:10:06","date_gmt":"2025-04-13T00:10:06","guid":{"rendered":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/?p=258"},"modified":"2025-04-13T00:24:28","modified_gmt":"2025-04-13T00:24:28","slug":"anyas-status-report-for-04-12","status":"publish","type":"post","link":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/2025\/04\/13\/anyas-status-report-for-04-12\/","title":{"rendered":"Anya&#8217;s Status Report for 04\/12"},"content":{"rendered":"<p><strong>Accomplishments<\/strong><\/p>\n<ul>\n<li class=\"\">\n<p class=\"\">Integrated real-time sensor polling\u00a0and displayed it on the dashboard<\/p>\n<\/li>\n<li class=\"\">\n<p class=\"\">\u00a0Developed a responsive FastAPI + HTMX dashboard to display live sensor values<\/p>\n<\/li>\n<li class=\"\">\n<p class=\"\">Implemented Chart.js charts that auto-refresh every few seconds without full page reloads<\/p>\n<\/li>\n<li class=\"\">\n<p class=\"\">\u00a0Latency about 10s for the API calls, page refreshes every 30s<\/p>\n<\/li>\n<li><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-259\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-7.18.29\u202fPM-300x166.png\" alt=\"\" width=\"390\" height=\"216\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-7.18.29\u202fPM-300x166.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-7.18.29\u202fPM-768x424.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-7.18.29\u202fPM-1024x565.png 1024w\" sizes=\"(max-width: 390px) 100vw, 390px\" \/><\/li>\n<li><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-260\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-7.23.10\u202fPM-300x149.png\" alt=\"\" width=\"300\" height=\"149\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-7.23.10\u202fPM-300x149.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-7.23.10\u202fPM-768x380.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-7.23.10\u202fPM.png 832w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/li>\n<\/ul>\n<p><strong>Progress<\/strong><\/p>\n<p><span style=\"font-size: 1rem\">Reduced latency by introducing in-memory caching for the a CNN solar forecast endpoint<\/span><\/p>\n<ul>\n<li class=\"\">\n<p class=\"\">\u00a0Forecast results are now cached and refreshed every 10 minutes, eliminating redundant model retraining on every request<\/p>\n<\/li>\n<li>Slightly behind progress, need to integrate all the charts in the same app with routing<\/li>\n<li class=\"\">\n<p class=\"\"><strong style=\"font-size: 1rem\">Verification<\/strong><\/p>\n<\/li>\n<\/ul>\n<p class=\"\">Performed basic verification of the CNN forecasting model to ensure it meets the intended design requirements for solar prediction accuracy.<\/p>\n<ul>\n<li class=\"\">\n<p class=\"\">Input Feature Sanity Checks:<br \/>\nVerified that time-series input includes correct <code>power<\/code>, <code>sin_hour<\/code>, and <code>cos_hour<\/code> features, resampled to 15-minute intervals.<br \/>\nResampling was validated via debug logging (<code>len(df)<\/code>, <code>delta<\/code> distributions).<\/p>\n<\/li>\n<li><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-266\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-8.00.31\u202fPM-300x25.png\" alt=\"\" width=\"300\" height=\"25\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-8.00.31\u202fPM-300x25.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-8.00.31\u202fPM-768x64.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-8.00.31\u202fPM.png 958w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/li>\n<li><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-268\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-8.07.49\u202fPM-300x25.png\" alt=\"\" width=\"300\" height=\"25\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-8.07.49\u202fPM-300x25.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-8.07.49\u202fPM-768x64.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-content\/uploads\/sites\/364\/2025\/04\/Screenshot-2025-04-12-at-8.07.49\u202fPM.png 958w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/li>\n<li class=\"\">\n<p class=\"\">Window + Horizon Coverage:<br \/>\nModel 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.<\/p>\n<\/li>\n<li class=\"\">\n<p class=\"\">Envelope Alignment Verification:<br \/>\nThe daylight envelope was implemented and centered around peak solar generation (13:00\u201314:00) to prevent unrealistic output at midnight. Forecasts before and after masking were compared to confirm correction.<\/p>\n<\/li>\n<li class=\"\">\n<p class=\"\"><strong>Polling Interval Consistency<\/strong>:<br \/>\nThe system pulls data using HA<code>\/api\/history\/period<\/code> endpoint. I confirmed that sensors such as <code>sensor.maya_solar_panel<\/code>, <code>sensor.maya_fan_power<\/code>, <code>sensor.maya_fan_voltage<\/code>, and <code>sensor.maya_fan_current<\/code> are polled with sufficient granularity \u2014 typically every 5\u201310 minutes.<\/p>\n<\/li>\n<li class=\"\">\n<p class=\"\">Each response is parsed to validate:<\/p>\n<ul>\n<li class=\"\">\n<p class=\"\"><code>state<\/code> is numeric and finite<\/p>\n<\/li>\n<li class=\"\">\n<p class=\"\"><code>last_changed<\/code> timestamps are increasing and consistent<\/p>\n<\/li>\n<li class=\"\">\n<p class=\"\">There are no large gaps in time , &gt; 1 hour)<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li class=\"\">\n<p class=\"\">Resampling Debug Logs:<br \/>\nAdded internal logging to capture the number of raw and resampled datapoints. This ensures the model always receives enough sequential history for the sliding window.<br \/>\nUsed interpolation (<code>.interpolate()<\/code>) on the resampled time-series to ensure continuity in data, even if occasional values are missing from Home Assistant.<\/p>\n<\/li>\n<li>latency tests via\u00a0time curl http:\/\/localhost:5051\/api\/endpoint to make sure the dashboard refresh updates meet design and usecase requirements<\/li>\n<\/ul>\n<p><strong>Next Steps<br \/>\n<\/strong><\/p>\n<ul>\n<li class=\"\">\n<p class=\"\">Test LP behavior under forecast uncertainty<\/p>\n<ul>\n<li class=\"\">\n<p class=\"\">Run LP with low vs. high solar predictions<\/p>\n<\/li>\n<li class=\"\">\n<p class=\"\">Assess how schedules shift and whether they violate any constraints<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li class=\"\">\n<p class=\"\">Stress-test LP under edge-case constraints<\/p>\n<ul>\n<li class=\"\">\n<p class=\"\">Zero solar availability<\/p>\n<\/li>\n<li class=\"\">\n<p class=\"\">Multiple high-power devices requiring overlap<\/p>\n<\/li>\n<li class=\"\">\n<p class=\"\">Very short vs. very long runtime constraints<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"\">Test LP reactivity to live data<\/p>\n<ul>\n<li class=\"\">\n<p class=\"\">Feed in updated solar forecast every hour<\/p>\n<\/li>\n<li class=\"\">\n<p class=\"\">Ensure LP returns updated schedules quickly (&lt;2 sec)<\/p>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Accomplishments Integrated real-time sensor polling\u00a0and displayed it on the dashboard \u00a0Developed a responsive FastAPI + HTMX dashboard to display live sensor values Implemented Chart.js charts that auto-refresh every few seconds without full page reloads \u00a0Latency about 10s for the API calls, page refreshes every 30s Progress Reduced latency by introducing in-memory caching for the a &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/2025\/04\/13\/anyas-status-report-for-04-12\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Anya&#8217;s Status Report for 04\/12&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1050,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,1],"tags":[],"_links":{"self":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-json\/wp\/v2\/posts\/258"}],"collection":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-json\/wp\/v2\/users\/1050"}],"replies":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-json\/wp\/v2\/comments?post=258"}],"version-history":[{"count":5,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-json\/wp\/v2\/posts\/258\/revisions"}],"predecessor-version":[{"id":277,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-json\/wp\/v2\/posts\/258\/revisions\/277"}],"wp:attachment":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-json\/wp\/v2\/media?parent=258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-json\/wp\/v2\/categories?post=258"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s25-teamd5\/wp-json\/wp\/v2\/tags?post=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}