The future is now! Or at least in little bits and pieces.

I have long loathed the process of fishing out my keys every time I enter or leave my home and wished it was easier to automate. Today I finally have all of the pieces in place to be able to unlock or lock the front door with a simple tap on my watch. I’ve been really enjoying it for things like just walking out the door and then having it lock while I’m walking towards the elevator or conversely on the way in unlocking the door before you get to it so you can just walk right in. Feels like magic every time.

Constituent pieces:

Lockitron

By far the most important part. This little device sits on top of your deadbolt with a little motor and wifi and can control the lock at will* from the internet. Battery life was a struggle originally though so I hacked it to be powered from an ac adapter so it can be online 100% of the time (vs an awkward polling scheme it had before that involved a hard knock on the door to wake it up).

The hack here breaks down into 2 steps.

Use the lockitron API to change the sleep time to 0. For that you’ll need 2 pieces of information, your access_token and lock id. You can get your personal access_token on this page near the bottom right: https://api.lockitron.com/ . You get find out your lock id by making a request like:

curl -X GET “https://api.lockitron.com/v2/locks/?access_token=<YOUR API ACCES CODE HERE>”

With that in hand you can now set your lockitron to never sleep with:

curl -X PUT “https://api.lockitron.com/v2/locks/<YOUR LOCK ID HERE>?access_token=<YOUR API ACCES CODE HERE>&sleep_period=0”

If you stop here though your battery is going to drain crazy fast so enter the 2nd step: wire the lockitron into an ac adapter. This turned out to be pretty simple and I got a lot of information from this discussion on the forums http://community.lockitron.com/t/any-success-with-external-power-source/811 . In short though I cut out the battery compartment and wired it up to a 5V, 8A ac adapter I found online. Now your lockitron will never have battery problems again and is always awake/response! (Assuming your power doesn’t go out…).

Unfortunately they aren’t selling this model that can go on top of an existing deadbolt anymore. Instead if it’s an option you can get this newer deadbolt replacement version they’re calling the ‘bolt’ https://lockitron.com/. Since we’re renting we can’t change the locks so if I had to start over now I might look into one of these kits from sparkfun and then plug in my own brain: https://www.sparkfun.com/products/13648 .

Android Tasker app

Using Tasker you can setup an HTTP call to the lockitron REST API to tell your device to lock or unlock on demand! Now we just need a way to trigger it. A simple option is to put icons on your phone home screen, but then you still need to get out your phone, unlock it and hit the button. We can do better!

Android smartwatch + WatchMaker app

WatchMaker lets you customize your smart watch face in oodles of ways. One of those ways for this project is the ability to have hit targets on the watch that can trigger actions, one of which is to call a Tasker task! The circle is complete.

If anyone is interested in more details let me know and I can go deeper on how to replicate the setup!