Internet controlled lock example using NodeMCU and MQTT protocol.
Demo control panel is hosted on Firebase at https://smart-lock-hca.firebaseapp.com
We're using CloudMQTT, but feel free to choose your provider.
Then update auth details in nodemcu_lock/nodemcu_lock.ino
and web-panel/src/script.js
-
Install NodeMCU board in Arduino IDE.
https://www.marginallyclever.com/2017/02/setup-nodemcu-drivers-arduino-ide/ -
Open
nodemcu_lock/nodemcu_lock.ino
in Arduino IDE. -
Install the following libraries.
Sketch -> Include library -> Manage libraries
. -
Choose
NodeMCU (probably 1.0 ESP-12E Module)
inTools -> Board
-
Compile and upload.
For testing, Node.js and NPM are required.
Files are statically served using the serve package.
cd web-panel
npm install
npm test
Claran Martis -- idea and inspiration