Skip to content

Smart-Home-Automation-System-Project/Edge-AI-Home-Automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Edge AI Home Automation

A smart home system with customizable controls for lights, switches, temperature, and doors, featuring secure login, automatic database backup and error detection, and LSTM-based predictions every 10 minutes. Supports integrations with surveillance, voice-gesture control, and energy optimization systems for enhanced automation

Features

  • Predictive Analytics: Implements an LSTM-based model for accurate predictions every 10 minutes, optimizing system efficiency.
  • Intuitive User Interface: Provides seamless control over lights, switches, temperature, and doors, ensuring ease of use.
  • Customizable Modules: Allows personalized home automation configurations for tailored user experiences.
  • Secure Authentication: Enforces password-protected login to safeguard user access.
  • Database Management: Ensures automatic backups and error detection to maintain data integrity.
  • Smart System Integrations: Supports:

Screenshots

Image Image Image Image

Installation

  • Run the following command to clone the required repositories:
    git clone https://github.com/Smart-Home-Automation-System-Project/Edge-AI-Home-Automation

For Ubuntu:

  • Install Mosquitto and client tools:
    sudo apt install -y mosquitto mosquitto-clients
  • Enable and start the Mosquitto service:
    sudo systemctl enable mosquitto
    sudo systemctl start mosquitto
  • Navigate to src:
    cd Edge-AI-Home-Automation/src/
  • Generate a password file for your system. Default username and password are admin and 1234. You can generate a new password file:
    sudo mosquitto_passwd -c /config/passwordfile.txt [your_username]
    Then enter a secure password when prompted.
  • Install dependencies
    pip install -r requirements.txt
  • Start system
    • Make executable:
      chmod +x start-system.sh
      chmod +x backup-db.sh
      chmod +x start-mqtt.sh
    • Modify 'config/.env' and update IPs, JWT_SECRET_KEY, username and passwords:
      MQTT_USERNAME=admin
      MQTT_PASSWORD=1234
      MQTT_PORT=1883
      JWT_SECRET_KEY=MTI3LjAuMC4xIC0gLSBbMjAvQXByLzIwMjUgMTA6NTU6MDFdICJHRVQgL2F
      UI_PASSWORD=abcd
      IP_SAS_SYSTEM=[IP OF Secure-Access-Surveillance-System]
      IP_ECO_SYSTEM=[IP OF Energy-Consumption-Optimization]
    • Run the system:
      ./run.sh
  • Setup auto-start
    • Create a systemd service
      sudo nano /etc/systemd/system/ai-home.service
    • Paste the following:
      [Unit]
      Description=AI Home Automation Startup Script
      After=network.target
      
      [Service]
      ExecStart=/bin/bash [/path/to/start-system.sh]
      WorkingDirectory=[/path/to/]
      Restart=always
      User=[your_username]
      
      [Install]
      WantedBy=multi-user.target
  • Setup auto-backup and auto-train-model
    1. Open the crontab editor:
      crontab -e
    2. Add these two lines at the bottom of the file:
      # Backup DB daily at 4:00 AM
      0 4 * * * [/full/path/to]/backup-db.sh
      
      # Train model every Monday at 12:00 AM
      0 0 * * 1 /usr/bin/python3 [/full/path/to]/database/train.py

For Windows:

  • Install Mosquitto and client tools: https://mosquitto.org/download
  • Add install directory to PATH
    setx PATH "%PATH%;[C:\path\to\install]"
  • Navigate to src:
    cd Edge-AI-Home-Automation/src/
  • Generate a password file for your system. Default username and password are admin and 1234. You can generate a new password file:
    mosquitto_passwd -c /config/passwordfile.txt [your_username]
    Then enter a secure password when prompted.
  • Install dependencies
    pip install -r requirements.txt
  • Start system
    • Modify 'config/.env' and update IPs, JWT_SECRET_KEY, username and passwords:
      MQTT_USERNAME=admin
      MQTT_PASSWORD=1234
      MQTT_PORT=1883
      JWT_SECRET_KEY=MTI3LjAuMC4xIC0gLSBbMjAvQXByLzIwMjUgMTA6NTU6MDFdICJHRVQgL2F
      UI_PASSWORD=abcd
      IP_SAS_SYSTEM=[IP OF Secure-Access-Surveillance-System]
      IP_ECO_SYSTEM=[IP OF Energy-Consumption-Optimization]
    • Run the system:
      run.bat

Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages