An innovative IoT project that revolutionizes dorm room access using cutting-edge technology. This system enables remote control of a physical door lock from anywhere in the world, showcasing a practical application of IoT in everyday life.
Live At My Website: door.ammaar.xyz
This website allows anyone, anywhere in the world, to open or close my dorm room door in real-time. Personally, I've made iPhone shortcuts that use the site's API endpoints so that I can open or close my door right from the lockscreen, or even ask siri to do the same; I barely even remember the dorm-pin on my prox at this point :P
This advanced system integrates an Arduino Nano ESP32 Connect with a motor driver and DC motor to provide seamless, remote control of a dorm room door. By leveraging the Arduino IoT Cloud, it offers both WiFi and Bluetooth Low Energy (BLE) control options. For all intensive purposes, the BLE version is more than sufficient, but I chose to use the WiFi version as the thought of some random dude in Russia stumbling across my site and opening my door was funny I just thought it was cooler :)
- Global remote door control via Arduino IoT Cloud
- Intuitive web interface for easy access and control
- BLE support for local, low-energy control
- Real-time door status updates
- Emergency close function for quick security measures
- Optional password protection for enhanced security
- Responsive design for both desktop and mobile devices
- Hardware: Arduino Nano ESP32 Connect, L298N Motor Driver, 24V DC Motor
- Backend: Node.js, Express.js
- Frontend: HTML5, CSS3, JavaScript
- IoT Platform: Arduino IoT Cloud
- Authentication: JSON Web Tokens (JWT)
- Version Control: Git
- Arduino Nano ESP32 Connect
- L298N Motor Driver
- 24V DC Motor
- Power supplies (24V for motor, 5V for Arduino)
- Node.js (v14 or later) and npm installed on your system
- Clone the repository:
git clone https://github.com/yourusername/smart-dorm-door.git
cd smart-dorm-door
-
Install dependencies:
npm install
-
Set up your Arduino:
- Connect the hardware components according to the schematic in the
docs
folder - Upload the Arduino sketch from the
arduino
folder to your Nano ESP32 Connect
- Configure your environment variables:
- Copy
.env.example
to.env
- Fill in your Arduino IoT Cloud credentials and other configuration details
- Start the server:
npm start
- Access the web interface by navigating to
http://localhost:3000
(or your server's address) - Log in if authentication is enabled
- Use the toggle switch to open or close the door
- The emergency close button can be used to quickly secure the door
For more detailed usage instructions, check out my User Guide.
The system can be configured using environment variables. Key configuration options include:
AUTH_REQUIRED
: Set totrue
to enable password protectionPASSWORD
: Set the password for accessing the control panel (if auth is enabled)PORT
: The port on which the server will run (default: 3000)
For a full list of configuration options, see the .env.example
file.
The system exposes several RESTful API endpoints:
POST /login
: Authenticate and receive a JWT tokenPOST /command
: Send open/close commandsPOST /emergency-close
: Trigger an emergency closeGET /status
: Retrieve the current door status
For detailed API documentation, refer to my API Guide.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Arduino IoT Cloud for providing the IoT platform
- Express.js for the web server framework
- node-fetch for making HTTP requests in Node.js
- All contributors who have helped shape and improve this project
Ammaar Alam - GitHub - Website - Check out my other portfolios/links