https://github.com/aharshac/smart-lock
Internet controlled lock example using NodeMCU and MQTT protocol
https://github.com/aharshac/smart-lock
iot mqtt nodejs nodemcu
Last synced: about 2 months ago
JSON representation
Internet controlled lock example using NodeMCU and MQTT protocol
- Host: GitHub
- URL: https://github.com/aharshac/smart-lock
- Owner: aharshac
- License: mit
- Created: 2017-08-27T07:13:51.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-15T05:02:14.000Z (almost 9 years ago)
- Last Synced: 2025-06-08T20:37:15.949Z (about 1 year ago)
- Topics: iot, mqtt, nodejs, nodemcu
- Language: Arduino
- Size: 163 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Smart Lock
[](https://www.collaborizm.com/project/ByxePzrIW)
Internet controlled lock example using NodeMCU and MQTT protocol.
Demo control panel is hosted on [**Firebase**](https://smart-lock-hca.firebaseapp.com/) at https://smart-lock-hca.firebaseapp.com
## MQTT Broker
We're using [**CloudMQTT**](https://www.cloudmqtt.com/), but feel free to choose your provider.
Then update auth details in **`nodemcu_lock/nodemcu_lock.ino`** and **`web-panel/src/script.js`**
## NodeMCU
1. Install NodeMCU board in Arduino IDE.
https://www.marginallyclever.com/2017/02/setup-nodemcu-drivers-arduino-ide/
2. Open **`nodemcu_lock/nodemcu_lock.ino`** in Arduino IDE.
3. Install the following libraries.
**`Sketch -> Include library -> Manage libraries`**.
- [WiFiManager](https://github.com/tzapu/WiFiManager)
- [PubSubClient](https://pubsubclient.knolleary.net/index.html)
4. Choose **`NodeMCU (probably 1.0 ESP-12E Module)`** in **`Tools -> Board`**
5. Compile and upload.
## Web Control Panel
For testing, [**Node.js**](https://nodejs.org/) and [**NPM**](https://www.npmjs.com/files) are required.
Files are statically served using the [**serve**](https://www.npmjs.com/package/serve) package.
### Installation
```
cd web-panel
npm install
```
### Start test server
```
npm test
```
## Acknowledgement
[Claran Martis](https://www.collaborizm.com/profile/SJne7FcMg) -- idea and inspiration