Skip to content

Khushisawalkar/SmartSense-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartSense AI – Intelligent IoT Monitoring Assistant 🌡️🤖

Hey there! Welcome to SmartSense AI.

I built this project for a hackathon to simulate a real-world intelligent IoT monitoring system. Coming from an Electronics & Telecommunication background where I've worked with hardware like Arduino, relays, and LM35 temperature sensors, I wanted to create a software simulation that acts just like a real automated HVAC (Heating, Ventilation, and Air Conditioning) or Smart Home system.

🎯 What it does

This system monitors two main things:

  1. Temperature (simulating an LM35 or DHT11 sensor)
  2. Occupancy (simulating a PIR motion sensor or IR sensor)

Based on these inputs, the system uses clear rule-based logic to decide whether to turn the cooling/heating ON or OFF to save energy.

Then, I integrated the Google Gemini API to act as the "brain". Instead of just showing raw sensor data, the AI translates the system's decisions into simple, user-friendly insights—explaining why a decision was made, just like a modern smart home assistant.

🛠️ Features

  • Sensor Simulation: Manually input temperature and occupancy, or toggle "Auto Mode" to see it react to random live data.
  • Decision Logic Engine: A practical, if-else rule engine that decides system states (Cooling ON, Heating ON, OFF).
  • AI Insight Layer: Uses Google Gemini to explain the system's logic and energy optimization choices in simple terms.
  • Clean Dashboard: Built with Streamlit for a lightweight, easy-to-use interface.

⚙️ Tech Stack

  • Python (Core logic)
  • Streamlit (Web dashboard)
  • Google Gemini API (AI Insights)

🚀 How to Run Locally

  1. Clone the repository:

    git clone <your-repo-url>
    cd SmartSense-AI
  2. Install the required libraries:

    pip install -r requirements.txt
  3. Set up your API Key: Create a .env file in the main folder and add your Gemini API key (DO NOT share this file!):

    GEMINI_API_KEY=your_actual_api_key_here
    
  4. Run the Streamlit App:

    streamlit run app.py

🌐 Deployment (Streamlit Cloud)

Want to put this live on the internet? It's super easy!

  1. Upload your code to a public or private GitHub repository.
  2. Go to share.streamlit.io and log in with GitHub.
  3. Click "New app" and select your repository, branch, and app.py as the main file.
  4. CRITICAL: Don't forget the API Key! Click on "Advanced settings" before deploying, and in the Secrets section, add your key like this:
    GEMINI_API_KEY="your_actual_api_key_here"
  5. Hit Deploy and share your link!

💡 Real-World Use Case

This simulation mirrors how smart energy-efficient buildings operate today. Instead of leaving an AC running in an empty room, sensors detect the lack of occupancy and shut down the system. The AI layer adds a transparent explanation so the user feels in control and understands the system's benefits.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages