Smart House IoT is a project aimed at building a smart home system using Internet of Things (IoT) technologies.
- Introduction
- Features
- Documentation
- Getting Started
- Usage
- Informations & Experiment
- Contributing
- License
The Smart House IoT project allows you to control various devices and monitor environmental conditions in your house remotely through IoT technologies. Whether it's controlling lights, temperature, or security cameras, this project provides a flexible framework to build your smart home system.
- Control lights and appliances remotely.
- Monitor temperature, humidity, and gas usage.
- Flexible and extensible architecture.
To run this project, you will need:
- Raspberry Pi or any other compatible single-board computer.
- Sensors (e.g., temperature, humidity).
- Actuators (e.g., relays for controlling appliances).
- Controller dashboard repo installed & running.
- Mosquitto API repo installed & running.
- Node.js 20.14.0 or later.
This installation pattern will be applied to all the 3 repo's, Smart-House-IOT repo, Controller_dashboard repo & Mosquitto_api repo.
- Clone the repository:
git clone https://github.com/cunbex/Smart-House-IOT.git
cd Smart-House-IOT
- Install dependencies:
npm install
- Initialize .env & Prisma:
Make sure to create a .env file and set up your database connection in prisma links and your environment variables.
prisma init
- Pull the database schema if the schema is already made:
prisma db pull
- Generate Prisma client:
prisma generate
- Start the project:
npm run devstart
After installation, you can run the project using npm run devstart
.
- For the experiment to work, three repositories must be running either on the cloud or your machine: Smart-House-IOT, controller_dashboard, mosquitto_api.
- Regarding PaaS used, i hosted the API's & website on render.com, the docker container that has MQTT/Mosquitto running on dockerHub & the database on supabase.com.
- Additional setup is required for the experiment to work. The project is highly dependent on the
.env
file, so make sure you create your own.env
file, feel free to email me if you have problems setting it up. - This is not a finished project regarding optimizations & performances.
- A single-board computer is required.
- Single-board computer code is on the controller-dashboard repository: controller_dashboard.
- Mosquitto API code is on the mosquitto_api repository: mosquitto_api.
-
Landing page:
-
Sign up page:
-
Log in page:
-
User Dashboard - Setting page, when receiving confirmation of pairing success with a controller:
-
User Dashboard - Setting page, after pairing an existing controller in the DB with a user account:
-
User Dashboard - Devices page:
-
Controller(RaspberryPi) log after scanning for an IOT device:
-
Controller(RaspberryPi) log after connecting to an IOT device:
-
Controller(RaspberryPi) log after recieving a value from an IOT device:
I have made a simple video demonstration a basic experiment of my project:
- I had the raspberryPi on & all the repo's up also.
- Connected the simulated IOT devices with the controller using the controller dashboard.
- Paired the controller with the user in the user dashboard (SKIPPED in the video because my controller was already paired), and did WRITE/READ value's on my simulated devices.
You can check it out here: https://drive.google.com/file/d/1IlTaaxwtkMrfE8qchtaBrxbRrn7dVUXT/view?usp=sharing
Contributions are welcome! If you'd like to contribute to this project, feel free to fork the repository and submit a pull request with your changes, or if you have questions & suggestions you can contact me on my email: [email protected].
This project is licensed under the MIT License - see the LICENSE file for details.