No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 4e1ecc7 Jul 14, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore init Jun 1, 2016
README.md add video Jun 2, 2016
app.json init Jun 1, 2016
package.json Update package.json Jul 14, 2017
server.js add cors and lock status Jun 2, 2016

README.md

DreamHouse Lock

This sample app provides an easy way to control a Lockitron Lock from the DreamHouse app. Check out a demo:

Demo

To get started your will need a Lockitron Bolt with the Bridge device that connects the Bolt to the internet.

Setup:

  1. Setup the Bold and Bridge

  2. Create a new API integration app: https://api.lockitron.com/

  3. Copy the testing access token from the newly created app

  4. Get your lock's ID from the Lockitron Dashboard by selecting your lock and copying the ID from the URL

     https://lockitron.com/dashboard/<YOUR LOCK ID>
    

Run Locally:

  1. Run the app in dev mode: LOCK=<LOCK ID> ACCESS_TOKEN=<ACCESS_TOKEN> npm run dev
  2. Toggle the lock: http://localhost:5000/toggle

Run on Heroku:

  1. Deploy the app: Deploy on Heroku
  2. Toggle the lock: http://<YOUR HEROKU APP>.herokuapp.com/toggle

App Architecture

This app is a simple proxy for the Lockitron API to toggle a lock open and closed. It encapsulates the Lock ID and Access Token for demo purposes. For a production app you will want to use OAuth to manage API access. The source for the app is in the server.js file. The app is a Node.js and Express app that handles requests and then calls the Lockitron API to perform the specified action.