An intelligent home automation system powered by AI, featuring voice control, natural language processing, and a modern teal-themed interface.
- Natural Language Processing: Speak naturally to control your devices
- Voice Recognition: Browser-based speech recognition (Web Speech API)
- Smart Commands: Understands context like "It's too hot" or "I'm feeling sleepy"
- Teal Color Scheme: Beautiful gradient design with #1A2E33, #2E5961, #55A9A8, #C4CED0
- Responsive Design: Works seamlessly on desktop, tablet, and mobile
- Dark/Light Mode: Toggle between themes
- Smooth Animations: Enhanced user experience with transitions and effects
- Device Management: Control lights, fans, AC, and TV
- Temperature Control: Adjust AC temperature with slider or voice
- Smart Scenes: Pre-configured modes (Movie, Sleep, Party, Work, Morning)
- Real-time Updates: Instant device state synchronization
- Live Weather Data: Current temperature and conditions
- Location-based: Automatic weather updates for your area
- Visual Display: Beautiful weather card with icons
- Command History: Track all your voice and manual commands
- Usage Analytics: See which commands you use most
- Timestamps: Detailed logs with time tracking
- Flask 3.0+: Python web framework
- Python 3.8+: Core programming language
- JSON Storage: Lightweight data persistence
- HTML5: Semantic markup
- CSS3: Modern styling with CSS variables and animations
- JavaScript (ES6+): Interactive functionality
- Lucide Icons: Beautiful icon library
- OpenWeatherMap API: Weather data integration
- Web Speech API: Browser-based voice recognition
Smart-Home-AI/
โโโ app.py # Flask backend server
โโโ wsgi.py # WSGI configuration
โโโ requirements.txt # Python dependencies
โโโ .env.example # Environment variables template
โโโ index.html # Landing page
โโโ dashboard.html # Main dashboard
โโโ landing.css # Landing page styles
โโโ style.css # Dashboard styles
โโโ landing.js # Landing page scripts
โโโ script.js # Dashboard scripts
โโโ devices.json # Device state storage
โโโ history.json # Command history storage
โโโ README.md # Project documentation
- Python 3.8 or higher
- pip (Python package manager)
- Modern web browser (Chrome, Firefox, Edge, Safari)
git clone https://github.com/koushikreddyreddykankanala/Smart---Home-AI.git
cd Smart---Home-AI# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txt-
Copy
.env.exampleto.env:copy .env.example .env # Windows cp .env.example .env # macOS/Linux
-
Edit
.envand add your API keys:OPENWEATHER_API_KEY=your_api_key_here FLASK_SECRET_KEY=your_secret_key_here
-
Get your OpenWeatherMap API key:
- Visit: https://openweathermap.org/api
- Sign up for a free account
- Generate an API key
# Development mode
python app.py
# Production mode (using Gunicorn)
gunicorn --bind 0.0.0.0:5000 wsgi:app- Open your browser and navigate to:
http://localhost:5000 - You'll see the landing page
- Click "Open Dashboard" to access the main interface
Click the microphone button and try these commands:
Device Control:
- "Turn on the lights"
- "Switch off the fan"
- "Turn on the AC"
- "Turn off the TV"
Temperature Control:
- "Set temperature to 22 degrees"
- "Make it cooler"
- "It's too hot"
- "Increase temperature"
Smart Scenes:
- "Movie mode" - Dims lights, turns on TV
- "Sleep mode" - Turns off all devices
- "Party mode" - Turns on lights and TV
- "Work mode" - Optimal lighting and temperature
- "Morning mode" - Gentle wake-up settings
- Click device cards to toggle on/off
- Use temperature slider or +/- buttons
- Click scene buttons for quick presets
The project uses a modern teal color palette:
| Color | Hex Code | Usage |
|---|---|---|
| Dark Teal | #1A2E33 |
Primary background, navbar |
| Medium Teal | #2E5961 |
Secondary background, cards |
| Bright Teal | #55A9A8 |
Accent color, buttons, highlights |
| Light Gray | #C4CED0 |
Secondary text, borders |
| White | #FFFFFF |
Primary text, icons |
Edit devices.json to add or modify devices:
{
"light": false,
"fan": false,
"ac": false,
"tv": false,
"temperature": 24
}Modify script.js to add custom scenes:
function activateScene(scene) {
const scenes = {
'custom': { light: true, fan: false, ac: true, tv: false, temp: 22 }
};
// ... rest of the code
}| Browser | Voice Control | UI/UX | Status |
|---|---|---|---|
| Chrome | โ | โ | Fully Supported |
| Edge | โ | โ | Fully Supported |
| Firefox | โ | Limited Voice Support | |
| Safari | โ | Limited Voice Support |
Note: Voice recognition works best in Chrome and Edge browsers.
- Create account at https://render.com
- Connect your GitHub repository
- Create new Web Service
- Set environment variables
- Deploy!
# Install Heroku CLI
heroku login
heroku create smarthome-ai
git push heroku main
heroku config:set OPENWEATHER_API_KEY=your_key- Upload files to PythonAnywhere
- Create virtual environment
- Install dependencies
- Configure WSGI file
- Reload web app
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit your changes:
git commit -m 'Add feature' - Push to the branch:
git push origin feature-name - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Koushik Reddy Kankanala
- GitHub: @koushikreddyreddykankanala
- Repository: Smart---Home-AI
- OpenWeatherMap for weather API
- Lucide Icons for beautiful icons
- Flask community for excellent documentation
- AI Essentials Course for project inspiration
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed description
- Include error messages and screenshots if applicable
- Mobile app (React Native)
- Integration with real IoT devices (ESP32, Arduino)
- Machine learning for usage patterns
- Multi-user support with authentication
- Scheduling and automation rules
- Energy consumption tracking
- Integration with Google Home/Alexa
- Room-based device grouping
- Custom voice commands training
- Lines of Code: ~3000+
- Files: 13 core files
- Languages: Python, JavaScript, HTML, CSS
- Development Time: AI Essentials Course Project
- Version: 1.0.0
โญ Star this repository if you find it helpful!
Made with โค๏ธ by Koushik Reddy Kankanala