Inspiration

In early January, a severe cold snap hit Alberta, and a power outage left my home without heat at -40°C. That experience was a wake-up call. It highlighted how high the stakes are for our grid and how valuable even an hour's advance warning could be for a family. I realized that while the grid operators have the data, the public is often left in the dark until it's too late. I set out to explore how Machine Learning could bridge that gap—turning grid data into foresight to help people prepare and protect their homes.

What It Does

GridSync is an AI-powered coordination platform that forecasts Alberta’s grid demand and stress levels 24–48 hours in advance. By identifying potential surges before they happen, the system provides automated community alerts to help users preemptively reduce usage.

The mathematical engine calculates the predicted demand $y(t)$ using a multiplicative seasonality model:

$$y(t) = T(t) \cdot (1 + S(t)) + R(t) + \epsilon(t)$$

Where:

$T(t)$ is the piecewise linear trend capturing long-term growth. $S(t)$ represents the combined Fourier-series seasonality (daily, weekly, and yearly patterns). $R(t)$ accounts for external regressors like temperature. $\epsilon(t)$ represents the uncertainty interval.

How We Built It

We started with a proof of concept using Python and Facebook Prophet to validate that we could achieve high-precision results (~98.6% accuracy) from historical AESO load data. Once the "brain" was ready, we built a command center using Next.js and Vanilla CSS for maximum performance.

To bridge the gap between AI and the user, we implemented Supabase Realtime via WebSockets. This allows an operator to trigger a "Community Action Alert" that pulses on every user's dashboard instantly. Finally, we automated the entire pipeline using GitHub Actions, ensuring our model re-trains every night to account for new weather patterns.

Challenges We Ran Into

Integrating real-time data from the AESO and Open-Meteo APIs proved significantly more complex than anticipated. We had to build a resilient "Path Discovery" system to handle API changes and downtime. On the frontend, creating a "Siren" alert system that felt urgent but didn't compromise the clean, professional aesthetic of the dashboard required extensive UI refinement and performance debugging.

What We Learned

We transitioned from hobbyist development to a production-style, "Agentic Workflow." We learned how to leverage AI tools to accelerate our engineering while maintaining technical depth in our ML implementation. This project deepened our understanding of time-series forecasting and reinforced how vital thoughtful UI/UX is when communicating critical infrastructure risks to the general public.

What’s Next for GridSync

Future plans include integrating directly with Smart Home APIs (like EcoBee and Tesla) to automate energy-shedding during peak windows. We also want to develop a "Community Credit" system to reward households for their contribution to grid stability.

Only time will tell—but we are hopeful about evolving GridSync into a real-world startup.

Built With

Share this project:

Updates