Skip to content

jtwirly/smarthomeagent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“˜ Smart Home AI Agent - README


πŸ” Overview

This project was created for the final project of MIT's Hands-on Deep Learning class. It is a Smart Home AI Agent that leverages:
βœ… OpenAI API for energy price analysis & automation
βœ… ComEd & Bayou APIs for real-time & historical electricity data
βœ… Neural Networks (DNN) for future energy demand prediction

βœ… Gradio Web UI for easy user interaction


πŸ“Œ Features

🏑 Smart Home Automation

  • Fetch real-time energy prices from ComEd API
  • Retrieve historical energy bills from Bayou API
  • Predicts energy demand using a trained Neural Network (DNN)
  • Automates HVAC settings based on AI-powered forecasts

πŸ–₯️ Web UI (Gradio)

  • Users can ask for energy pricing, HVAC adjustments, or home occupancy
  • Results are displayed in a simple web-based chatbot

πŸ› οΈ Setup & Installation

Smart_Home_Agent_8.ipynb has neural network integration

1️⃣ Install Dependencies

Manually install:

pip install transformers gradio openai requests torch tensorflow keras PIL

2️⃣ Set Up API Keys

OPENAI_API_KEY = "your-api-key"
COMED_API_URL = "https://hourlypricing.comed.com/api?type=5minutefeed&format=json"
BAYOU_API_KEY = "your-bayou-api-key"

3️⃣ Run the Gradio Web UI

python gradio_ui.py

Then open http://localhost:7860 in your browser.


πŸš€ Usage

🌑️ Get Weather

User: "What is the weather like in Chicago?"
Bot: "The current high temperature is 78Β°F."

⚑ Get Real-Time Energy Pricing

User: "What is the current electricity price in Illinois?"
Bot: "The latest ComEd price is 14.2 cents/kWh."

🌑️ Predict Future Energy Demand

User: "How much electricity will I use over the next 6 hours?"
Bot: "Based on your past usage, your predicted energy consumption for the next 6 hours is 1.8 kWh."

Optimize HVAC

User: "Optimize HVAC settings based on energy prices."
Bot: "Energy price is high! Adjusting thermostat for efficiency."
User: "Optimize HVAC settings based on predicted demand."
Bot: "Energy usage is expected to be high. Adjusting thermostat to 70Β°F for efficiency."

⚑ Get Real-Time Energy Pricing

User: "What is the current electricity price in Illinois?"
Bot: "The latest ComEd price is 14.2 cents/kWh."

🎯 Future Enhancements

βœ… Integrate with Smart Devices (e.g., Nest, Tesla Powerwall, Home Assistant API)
βœ… Enable Real-Time Image Processing from IP Cameras
βœ… Enhance AI Automation with Reinforcement Learning
βœ… Vision Transformers (ViT) for home occupancy detection

  • Perform real-time home occupancy detection using ViT
  • Uses Google's ViT model to analyze images
  • Determines if a home is occupied or empty
  • Can be expanded for security automation

πŸ‘₯ Collaborators

Jennifer Turliuk, Siddharth Chilukuri, Dominic Sudnik, Kike Vera


πŸ“œ License

This project is MIT Licensed – Feel free to modify & use. πŸš€


πŸš€ Built for a Smarter, Energy-Efficient Home! πŸš€


Sample Uses

Screen Shot 2025-03-13 at 9 30 55 PM Screen Shot 2025-03-13 at 9 30 26 PM Screen Shot 2025-03-13 at 9 29 30 PM Screen Shot 2025-03-13 at 9 28 34 PM Screen Shot 2025-03-13 at 9 27 11 PM Screen Shot 2025-03-13 at 9 25 45 PM Screen Shot 2025-03-13 at 9 04 01 PM Screen Shot 2025-03-13 at 9 03 43 PM Screen Shot 2025-03-13 at 9 03 01 PM Screen Shot 2025-03-13 at 9 02 17 PM Screen Shot 2025-03-13 at 9 01 47 PM

About

This project was created as part of MIT's Hands-on Deep Learning class. It is a Smart Home AI Agent that leverages: OpenAI API for energy price analysis & automation, ComEd & Bayou APIs for real-time & historical electricity data, Neural Networks (DNN) for future energy demand prediction, and Gradio Web UI for easy user interaction

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors