Inspiration

During a recent trip to the UAE, one of our team members had the opportunity to learn from government leaders in sustainable development about green zones, clean energy infrastructure, and the philosophy of living simply and sustainably. What struck most wasn't the large-scale technology, it was the idea that sustainability starts with small, everyday decisions. That experience made us ask: what's the simplest thing an average person can do today to reduce their environmental impact? The answer was hiding in plain sight. The electricity grid is dramatically cleaner at certain hours of the day, solar peaks midday and coal fills the gaps at night, but nobody knows when, and nothing in your home responds directly to it. Rootine was born from that trip. If world-class sustainable cities are being built around smarter energy use, why aren't we following suit in our own households.

What it does

Rootine is a sustainability tool that uses real-time electricity grid data to automatically schedule your household tasks to be emission efficient and cost effective. Users add tasks in natural language like "run dishwasher," "do laundry," or "charge EV" to a simple to-do list. Rootine connects to the ElectricityMaps API to pull live and 24-hour forecasted grid carbon intensity and renewable percentage for the user's region, and the OpenEI Utility Rate Database to factor in their utility's time-of-use pricing schedule. Rootine then analyzes both data sources and automatically schedules each task for the cleanest and cheapest window of the day. The app shows users exactly how much CO2 and money they save versus running tasks at default times, tracks daily streaks, and displays weekly impact stats.

How we built it

  • SwiftUI for the iOS frontend.
  • ElectricityMaps API for real-time and 24-hour forecasted grid carbon intensity and renewable percentage.
  • SQLite database of OpenEI Utility Rate for time-of-use pricing schedules across US utilities.
  • Gemini for natural language processing, lets users enter tasks in natural language and parses it into useful categories to search our database.
  • Greedy algorithm determines impact score using: renewable energy %, carbon intensity, and cost. Then weighs the impact scores by energy usage to determine optimized schedules.

Challenges we ran into

  • Accidentally exposing Gemini API key, leading to a rash email from the friendly people of GitHub with a strong suggestion to make changes.
  • Unpacking JSON objects from the Gemini API returned empty values despite the API responding correctly, caused by strict formatting requirements that took significant debugging to resolve.
  • The OpenEI API returned inconsistent and unusable formatting that differed per utility, which we overcame by unpacking the raw grid data locally and building our own SQLite database to standardize and serve the rate information.

Accomplishments that we're proud of

  • Leveraging Gemini for natural language processing into the task input so users are never limited to a predefined list of appliances, type anything and Rootine understands it.
  • Connected three completely separate data sources (ElectricityMaps, OpenEI, and Gemini) into a single seamless user action: add a task, tap optimize, get a full day schedule.
  • Designed a UI that we are incredibly proud of, combining a clean aesthetic with real-time data visualization that makes complex grid information feel simple and approachable

What we learned

Through Rootine we learned:

  • How vast and complex the data sources and methodologies are for energy usage and optimization, from carbon intensity calculations and flow-tracing across interconnected grids, to the hundreds of different utility rate structures across the US, each with their own seasonal tiers, time-of-use windows, and baseline allocations.
  • How to implement API calls in Swift, including handling asynchronous requests, parsing JSON responses, and managing API authentication securely within an iOS app
  • How dramatically grid carbon intensity varies by hour and how little awareness of this exists among everyday consumers

What's next for Rootine

  • Smart home integrations with HomeKit and SmartThings to trigger appliances automatically at the optimal window
  • Appliance identification using OpenCV to automatically detect and catalog household devices without manual input for accurate model usage rates
  • Competitive CO2 savings with leaderboards and social sharing so users can compare their emissions reductions with friends and neighbors
  • Commercial optimization expanding Rootine to office buildings and businesses to schedule large-scale energy loads like HVAC and industrial equipment

Built With

Share this project:

Updates