There's a storm coming, take cover!
Grid outages and energy-price volatility are more visible lately, even as more households adopt rooftop solar and home batteries. The gap we noticed is that many “solar + battery” setups still behave like a passive system: devices draw power as usual until the battery drains, and homeowners do not get an intuitive way to prioritize what matters when conditions change (cloudy day, evening peak, outage).
EcoSurvive was inspired by a simple question: if a home is a micro-grid, why doesn’t it operate like one? We wanted a tool that makes energy tradeoffs understandable and actionable—especially in emergencies—without requiring hardware or specialist knowledge.
What We Built
EcoSurvive is a home micro-grid optimizer and simulator for a single house over a 24-hour period. It supports:
- Solar generation (24-hour production profile)
- Battery storage (capacity, initial SOC, reserve threshold, charge/discharge limits, efficiency)
- Optional grid connection (on/off to simulate outages)
- Device loads with power draw (W) and priority (P1–P5)
Ecosurvive has 2 modes to switch between, depending on the situation:
Eco Mode
- Uses solar first
- Charges the battery when excess solar exists
- Minimizes grid usage where possible
Survival Mode
- Designed for outages or supply shortages
- Prioritizes critical loads and sheds non-essential devices
- Aims to extend the number of hours critical loads remain powered
How It Works
At a high level, EcoSurvive runs an hour-by-hour energy balance:
- Compute total load from devices that are ON.
- Use solar to serve load first.
- Use excess solar to charge the battery (bounded by charge rate and remaining capacity).
- If load remains, discharge the battery (bounded by discharge rate and reserve SOC).
- If load remains and grid is available, draw from the grid.
- If load still remains, shed lower-priority devices until demand fits supply.
Survival Mode adds a practical rule-based prioritization: as the “battery margin” (SOC minus reserve) shrinks, the simulator tightens the set of allowed device priorities so non-essential loads drop first.
Why This Matters (Benefits and Impact)
EcoSurvive provides value in three ways:
1) Resilience
- Helps households understand how long critical devices can stay powered during an outage.
- Demonstrates automatic load shedding to protect essential needs.
2) Renewable Efficiency
- Highlights solar waste and encourages better self-consumption behavior (charge battery when possible, reduce unnecessary loads).
- Makes tradeoffs visible rather than hidden.
3) Usability and Communication
- Converts microgrid logic into a non-technical interface:
- KPI cards
- Battery SOC chart
- Energy flow chart
- Device ON/OFF timeline
- Interactive floor plan showing what is on/off per hour
This is important because sustainability tools only help if people can understand and use them.
So many UI options!
Scenario Controls
- Toggle between Eco / Survival modes
- Toggle Grid ON / Outage
- Choose solar preset: Sunny / Cloudy / Winter
- Adjust battery:
- Capacity (kWh)
- Initial SOC (kWh)
- Reserve minimum SOC (kWh)
Devices
- Enable/disable devices (except Heating)
- Set power draw (W)
- Set priority (P1–P5)
Visual Cues
- KPI cards
- Battery SOC chart (24 hours)
- Energy flow chart (solar/battery/grid usage)
- Device ON/OFF timeline (table)
- Interactive floor plan:
- Devices displayed inside rooms
- Click devices to enable/disable
- Hour slider updates device states in the house
- Interactive floor plan:
Technical Implementation
Backend (Python, FastAPI)
- Core simulation engine runs hour-by-hour optimization logic.
/simulateendpoint accepts:- solar profile, device list, battery settings, grid availability, mode
- Returns:
- SOC trajectory, energy flows (solar/grid/battery), device ON/OFF decisions, totals/KPIs
Frontend (HTML/CSS/JavaScript + Chart.js)
- Clean controls (mode toggle, outage toggle, solar presets, battery inputs)
- Visual outputs (charts + KPI cards)
- Interactive SVG floor plan with clickable device nodes
- Hour slider to inspect behavior across the day
Everything runs locally on a laptop for judging (localhost), which keeps the demo reliable.
Challenges We Faced
- Balancing realism vs. clarity: We intentionally chose an explainable rule-based policy rather than a heavy optimization solver so the logic can be demonstrated and defended quickly.
- Usable visualization: Translating simulation output into an intuitive interface (charts + floor plan + timeline) required careful UI structuring.
- Edge cases: Handling low SOC, reserve thresholds, and situations where even critical loads cannot all be served demanded clear, consistent rules.
What We Learned
- Microgrid problems are not just technical—they are also human-interface problems. A tool that explains decisions can be more valuable than one that hides them.
- Separating the project into:
- data model,
- simulation engine,
- visualization layer
made iteration much faster and reduced integration bugs.
- Even a simplified model can produce meaningful insights when the output is legible and interactive.
Future Improvements
- Real-time alerts (“device X was shed to protect critical loads”)
- “Time remaining” estimator during outages
- More realistic device duty cycles (thermostat/heating cycles, fridge compressor behavior)
- Export results to CSV
- Scale from a single house to a multi-house neighborhood microgrid simulation
Closing Note
EcoSurvive demonstrates a practical sustainability concept: use renewables intelligently when they are available, and protect critical needs when they are not. The MVP is intentionally scoped to be explainable, visual, and demo-ready—while still reflecting real-world microgrid decision-making.
Built With
- css
- javascript
- pycharm
- python
Log in or sign up for Devpost to join the conversation.