This project implements an intelligent lighting control system using artificial intelligence. The system includes a cloud-based web application, a PostgreSQL database, and integration with Home Assistant for managing lighting devices. Users can control the brightness, color, and state of their lights through the application. The system also collects user data to train AI models for automating lighting control based on user behavior patterns.
- User authentication and profile management
- Integration with Home Assistant for controlling smart lights
- Data collection of user interactions for AI model training
- AI-driven predictions for automated lighting control
- Web-based interface for managing lighting devices
- Backend: Django, PostgreSQL
- Frontend: HTML, CSS, JavaScript (Vanilla)
- AI/ML: XGBoost, RandomForestRegressor
- Integration: Home Assistant API, Nabu Casa cloud service
- Python 3.8+
- PostgreSQL
- Home Assistant setup with Nabu Casa subscription
-
Clone the repository
git clone https://github.com/nillovych/SmartLight-Control-System.git cd SmartLight-Control-System
-
Set up the virtual environment
python -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install the dependencies
pip install -r requirements.txt
-
Configure PostgreSQL
- Create a PostgreSQL database and user
- Update
settings.py
with your database credentials
-
Run migrations
python manage.py migrate
-
Run the server
python manage.py runserver
-
Register and log in Create an account and log in to access the lighting control interface.
-
Connect to Home Assistant Enter your Home Assistant domain and long-lived access token in the profile settings.
-
Manage lights View and control your connected lights from the main dashboard. Adjust brightness, color, and state.
-
Enable data collection Opt-in to data collection to allow the system to record your interactions and train AI models.
-
Train AI model Once sufficient data is collected, train an AI model to automate lighting control based on your behavior.
- Fork the repository
- Create a new branch
git checkout -b feature/your-feature-name
- Commit your changes
git commit -m 'Add some feature'
- Push to the branch
git push origin feature/your-feature-name
- Open a pull request
For any inquiries or feedback, please contact [danykyurkevych@gmail.com].