Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/albinvar/smart-lock-uno-laravel
Web Module for Smart Lock Uno: Simplify control and management of your smart lock system with this intuitive web interface.
https://github.com/albinvar/smart-lock-uno-laravel
api facial-recognition iot iot-application iot-device iot-prototype jetstream laravel livewire php prototype rfid smart-lock smart-lock-uno web web-api
Last synced: 3 days ago
JSON representation
Web Module for Smart Lock Uno: Simplify control and management of your smart lock system with this intuitive web interface.
- Host: GitHub
- URL: https://github.com/albinvar/smart-lock-uno-laravel
- Owner: albinvar
- License: mit
- Created: 2023-03-18T06:46:30.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-21T21:24:28.000Z (about 1 year ago)
- Last Synced: 2025-01-09T23:45:21.293Z (11 days ago)
- Topics: api, facial-recognition, iot, iot-application, iot-device, iot-prototype, jetstream, laravel, livewire, php, prototype, rfid, smart-lock, smart-lock-uno, web, web-api
- Language: Blade
- Homepage: https://lock.albinvar.in
- Size: 350 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
๐ซ ๐ฆ Smart Lock Uno - Web Module ๐ โจ
Version 1.0.0 ๐จ๐ปโ๐ป
A smart lock system with facial recognition, RFID authentication, and web API control using Arduino Uno and Python
View Demo
ยท
Report Bug
ยท
Request Feature
The [project demo](https://lock.lov3.pw) is hosted for FREE ๐ on [Wexron Hosting](https://wexronhosting.com).
## Table of contents ๐
About The Project
- Prerequisites
Features
- Installation
- Usage
- Explanation
- Contributing
- License
- Contact
- Acknowledgments
## Introduction
๐ The Smart Lock Uno Web Module is a simple and intuitive web interface designed to control and manage a smart lock system with multiple authentication methods.This module is an integral part of the [smart-lock-uno](https://github.com/albinvar/smart-lock-uno), offering a user-friendly web interface for controlling and managing a smart lock system.
๐ป Built on Laravel 10 ๐ฆ, It integrates with the project's web API to provide features such as lock and unlock functionality and intruder detection image display. The module utilizes Laravel Livewire for real-time page updates and Laravel Jetstream for rapid development. For installation and usage instructions, refer to the project's documentation.
## Features โจ
โจ The Smart Lock Web Module offers the following features:
- **โ๏ธ Built on Laravel 10:** The web module is developed using Laravel 10, the latest version of the popular PHP framework. Laravel 10 brings numerous enhancements, improved performance, and added features, making it a reliable choice for building smart lock systems.
- **๐ Web API Integration:** The module integrates with a web API provided by the [smart lock system](https://github.com/albinvar/smart-lock-uno) to control and monitor the lock.
- **๐ Real-time Page Updates:** Leveraging Laravel Livewire, the web module provides real-time page updates, ensuring a seamless user experience.
- **๐ Lock and Unlock:** Users can remotely lock and unlock the smart lock through the web interface.
- **๐ธ Intruder Detection:** The web module displays pictures of intruders captured by the [smart lock system](https://github.com/albinvar/smart-lock-uno), providing visual evidence of unauthorized access attempts.
- **๐ Laravel Jetstream Integration:** The project utilizes Laravel Jetstream to simplify development and streamline processes, with much secure authentication and simplicity.
### Prerequisites ๐
Before setting up the Smart Lock Web Module, ensure you have the following:- php 8.1+
- composer 2.0 +
- [smart-lock-uno](https://github.com/albinvar/smart-lock-uno) installed and configured properly.## Installation โ๏ธ
Follow these steps to set up the Smart Lock Web Module:
- Clone the repository:
```bash
git clone https://github.com/your/repository.git
```- Install the dependencies:
```bash
cd smart-lock-web-module
composer install
```- Install Node dependencies:
```bash
#using npm
npm install ๐ฆ
#using yarn (recommended)
yarn install ๐งถ
#using pnpm
pnpm install ๐ญ
```- Configure the environment variables:
```bash
cp .env.example .env
```- Generate the application key:
```bash
php artisan key:generate
```- Configure the API endpoint for the smart-lock:
```bash
API_ENDPOINT=http://127.0.0.1:5000
```- Compile your CSS / JavaScript for development and recompile on change. **(for developers)**
```bash
# npm ๐ฆ
npm run dev
# yarn ๐งถ
yarn dev
# pnpm ๐ญ
pnpm dev
```
OR- Compile your CSS / JavaScript for production...
```bash
# npm ๐ฆ
npm run build
# yarn ๐งถ
yarn build
# pnpm ๐ญ
pnpm build
```- Run the development server:
```bash
php artisan serve
```
- Access the Smart Lock Web Module:
Open a web browser and visit `http://localhost:8000`.## Usage
### ๐ Lock and Unlock:
- After accessing the dashboard, you can find controls to lock and unlock the smart lock.
- Click on the respective buttons to perform the desired action.### ๐ธ Intruder Detection:
- The web module displays pictures of intruders captured by the smart lock system.
- Navigate to the bottom part to view the images and identify unauthorized access attempts.## Explanation ๐ฉโ๐
### Web API (Flask) ๐ธ
The Web API is an additional authentication method that runs on a separate thread on [smart-lock-uno](https://github.com/albinvar/smart-lock-uno) and uses a Flask-based API. Its codes are located in the `src/website.py` file. The Web API listens actively on a specific port for requests and uses requests to communicate with the API. The Website API is accessible via a local server, but it is recommended to use port forwarding tools like `ngrok` or `cloudflared tunnel` to access it from the wide area network.
The Website API requires a token to authorize each request, ensuring that only authenticated users can access the API. Unlike other authentication methods, the Website API does not have a delay to keep the solenoid lock unlocked. Instead, the lock is enabled only when a specific lock action request is received.
One of the key advantages of the Website API is its ability to serve all the intruder images stored and served through the api. This feature allows users to view images of intruders and take appropriate action, such as notifying law enforcement. Additionally, the Website API provides an easy-to-use interface for interacting with the security system and monitoring its status.
#### API Documentation ๐
The following api endpoints on [smart-lock-uno](https://github.com/albinvar/smart-lock-uno) are used to communicate with the lock mechanism.
> NB: The following API endpoints is being integrated from [smart-lock-uno](https://github.com/albinvar/smart-lock-uno) project.
| HTTP Method | Endpoint | Parameters | Description |
|:------:|:------:|:------:|:------:|
| `GET` | `/ping` | *N/A* | Checks if the system is up and running. |
| `POST` | `/lock` | - `action`
- `password` (if action is unlock) | Locks or unlocks the solenoid lock |
| `GET` | `/intruders` | *N/A* | Returns a list of images/frames captured for unauthorized persons |
| `GET` | `/intruders/{filename}` | `filename` | Returns a specific image |## Contributing ๐
This project is open source and contributions are welcome. To contribute, please fork the repository, make your changes, and submit a pull request.
## License ๐
This project is licensed under the MIT License. See the LICENSE file for more information.
## Contact ๐
If you have any questions, feedback, or suggestions for this project, please feel free to contact us:
- Name: **Albin Varghese**
- Email: [email protected][!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/albinvar)
## Acknowledgments ๐
This project was inspired by various smart lock projects available on the internet. Thanks to OpenCV Python and Flask for providing the tools necessary for facial recognition and web API authentication, respectively. Thanks to the Arduino community for providing helpful resources and support for this project. Additionally, thank you to ChatGPT, an AI language model trained by OpenAI, for generating helpful responses and contributing to the development of this project.