This project is a home automation system built using Python Flask for the backend, React and TailwindCss for the frontend, HTTP and MQTT for real-time communication. The system allows users to control various IoT devices in their home.
- Rpi
- Esp8266
- Solid State Relay
- Sensor (Temperature and Humidity)
- Python 3.8+
- Node.js and npm
- PostgreSQL
- Clone the repository:
git clone https://github.com/anisarif/HomeAutomation.git
- Navigate to the backend directory:
cd HomeAutomation/Backend
- Install the Python dependencies:
pip install -r requirements.txt
- Set up the database:
python create_db.py
- Run the backend:
flask run
- Navigate to the frontend directory:
cd HomeAutomation/Frontend/react_frontend/
- Install the Node.js dependencies:
npm install
- Run the frontend:
npm start
- Control IoT devices in real-time
- User authentication and authorization (Role Based Access Control)
- Real-time updates via MQTT
- Sensors data monitoring
To run the tests, navigate to the backend directory
Set up the database: python create_test_db.py
and run pytest
.
To run the tests, navigate to the frontend directory