Smart Home Connect is a web-based dashboard designed to centralize and simplify the management of your smart home devices. Built with PHP and MySQL, it offers a secure and intuitive interface for controlling various smart appliances like Lights, Fans, Air Conditioners, and TVs.
- User Authentication: Secure login and registration system to keep your smart home controls private.
- Dashboard Overview: Get a quick glance at the status of all your connected devices.
- Device Controls:
- Toggle On/Off: Switch devices on or off with a single click.
- Advanced Controls: Adjust fan speeds, set AC temperatures, and control TV volume.
- Device Management: Add new devices to your network and customize their names.
- Responsive Design: optimized for both desktop and mobile use.
- Frontend: HTML5, CSS3, Vanilla JavaScript.
- Backend: PHP.
- Database: MySQL.
- Styling: Custom CSS with Google Fonts (Outfit).
To run this project locally, you need a local server environment. We recommend XAMPP.
-
Clone the Repository (or download the source code):
git clone https://github.com/Bot-Manav/Smarthome-Website.git
-
Move Files to Server Directory:
- Copy the project folder
smarthometo your XAMPPhtdocsdirectory. - Path:
C:\xampp\htdocs\smarthome
- Copy the project folder
-
Database Setup:
- Open your browser and navigate to
http://localhost/phpmyadmin. - Create a new database named
smarthome_db. - Import the
database.sqlfile provided in the project root into this new database. - Alternatively, you can run the SQL commands inside
database.sqlmanually in the SQL tab.
- Open your browser and navigate to
-
Database Configuration:
- Open
db.phpand ensure the credentials match your local MySQL configuration (default XAMPP settings are usually: Host:localhost, User:root, Password: ``).
- Open
-
Run the Application:
- Start Apache and MySQL modules from the XAMPP Control Panel.
- Open your browser and go to:
http://localhost/smarthome
- Register/Login: Create a new account or log in with the test credentials (if you ran the sample data insert).
- Default Test User:
testuser/password
- Default Test User:
- Manage Devices: Use the "Manage Devices" button to add appliances to your dashboard.
- Control: Use the toggles and sliders on the dashboard to control your devices.
index.php: Main dashboard.devices.php: Device management interface.toggle.php: Logic for controlling device states.login.php/register.php: Authentication pages.styles.css: Main stylesheet.database.sql: Database schema and initial seed data.
This project is licensed under the MIT License.