This sample app provides an easy way to control a Lockitron Lock from the DreamHouse app. Check out a demo:
To get started your will need a Lockitron Bolt with the Bridge device that connects the Bolt to the internet.
Setup the Bold and Bridge
Create a new API integration app: https://api.lockitron.com/
Copy the testing access token from the newly created app
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 the app in dev mode:
LOCK=<LOCK ID> ACCESS_TOKEN=<ACCESS_TOKEN> npm run dev
- Toggle the lock:
Run on Heroku:
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.