Skip to content
Doorlock that can be locked or unlocked through your smartphone
JavaScript
Branch: master
Clone or download
atainter Merge pull request #9 from lisaong/rpi3-tweaks
Jessie lite instructions, updated to latest Blynk
Latest commit cb9f3b0 May 23, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Added doorlock.js Jan 17, 2017
README.md Jessie lite instructions, updated to latest blynk Apr 26, 2018
doorlock.js added comments Jan 17, 2017
package.json Jessie lite instructions, updated to latest blynk Apr 26, 2018

README.md

Smartphone-Doorlock

Doorlock that can be locked or unlocked through your smartphone

You’ll want to make sure you have node.js installed on your Raspberry Pi. Adafruit has a nice guide on their website.

Installation

If running on Jessie Lite, install pigpio:

sudo apt-get install pigpio

Navigate to the folder you want to clone the repository and type

git clone https://github.com/HackerHouseYT/Smartphone-Doorlock.git

Once done cloning, navigate into the folder.

cd Smartphone-Doorlock

Install the dependencies (if it fails, delete node_modules and retry without sudo)

sudo npm install

Add the Blynk auth token by opening up the doorlock.js file and replacing the blynkToken variable.

vim doorlock.js

Scroll down, press i to edit in vim, and replace the token between the single quotes. Press esc then type :wq to save and quit.

sudo node doorlock.js starts the program.

Running at Startup

To run at startup, you can add the start command to your rc.local.

Type pwd to get your current directory. I highlighted this and copied it with control-c.

Edit the rc.local file with vim.

sudo vim /etc/rc.local

Press i, then scroll down and add sudo node <Your Directory From pwd>/doorlock.js

Press esc, then type :wq! to save and exit. Restart the Pi to start the program.

You can’t perform that action at this time.