Unlock your door with Siri, SMS, or a secret knock

Unlock your door with Siri:

For our first Arduino project, we hacked together a wifi-enabled door lock with some nifty features. After seeing cool projects like John Grathio’s secret knock and Billy Chasen’s ethernet unlocker, we were inspired to build our own. We combined the two ideas using an Arduino and a WiFly shield, a modified servo motor, and a few other things.

The end product is pretty cool and has these features:

  • Unlock / Lock your door with your voice using Siri, an iPhone app, SMS, or a mobile web page (iphone app requires iOS developer account)
  • Monitor whether the door is locked or unlocked from far away
  • Get SMS messages when someone knocks on your door
  • Unlock your door with a secret knock (hard-coded for now)

A demo of the iPhone app and secret knock in action:

The Siri hack works by creating a contact called ‘Door’, which is the phone number that we use to accept SMS messages like ‘open’ or ‘lock. We used Google app engine for a server component since it’s free for small usage like this. We then created an iPhone simple iPhone app to send unlock commands and monitor the door state. Twilio.com enabled us to send and receive SMS messages.

All the code we used is available on github here: https://github.com/cclaan/lockerino

* DISCLAIMER * Remember, we hacked this together for fun! – It’s not intended to protect your belongings or loved ones. The code probably has some bugs, might malfunction, or could easily be hacked by someone!

We intend to write up a more detailed how-to on Instructables.com, so stay tuned for that.

Also, this project is probably for advanced builders since your lock may be different than ours and require some custom solutions for mounting the servo to the lock. You may also have to modify our code a little to get the knock detection thresholds and servo angles correct, since they will be slightly different for everyone. Since it requires a web server, you will have to setup google app engine, which is free, but requires a little technical know how.

The total cost right now for all the parts ends up at around $170.. but if you have some of the common parts lying around it could be a lot less. Plus, we hear that the Arduino folks are introducing a cheaper WiFi shield in the next few months, since the one we use costs $90. Or you could use an Ethernet Pro that only costs $54.95 and saves you about 65 bucks, but requires a long ethernet cable.

Here are the parts we used for the project:
Stuff you need
Here’s what you’ll need:

  • Ardunio Uno, or any arduino with shield mounts (mega, etc) ( $29.95 Sparkfun )
  • Stackable headers for attaching the WiFly shield to arduino ( $1.50 Sparkfun )
  • WiFly shield – ( $89.95 Sparkfun )
  • Standard servo (we used Tower SG-5010) – modded to read the internal pot ( $13.95 Sparkfun )
  • Piezo element from sparkfun, radio shack has them in buzzers. ( $1.50 Sparkfun )
  • A 1k resistor – goes in parallel between the piezo element ( $0.25 Sparkfun )
  • Some jumper wires ( $6.95 Sparkfun )
  • A 5.1mm power jack ( $2.00 Sparkfun or radio shack )
  • Instamorph or shapelock for the servo / lock arms ( $9.95 Instamorph.com )
  • A power supply to arduino, many will work ( $6.95 Sparkfun )
  • Some velcro with adhesives, or dualock tm by 3M ( Radio Shack )
  • 3M dual sided sticky tape, the thick kind (Radio Shack)
  • Thin plywood to mount arduino to the door and also to create the servo mount ( $5.00 Home Depot )
  • Clothes hanger, for the wire, or other thick wire to connect servo to door lock
  • Long wire to run the power cable to arduino, ( radio shack )
  • L-brackets for servo, ( $2.00 home depot )
  • A dremel , maybe a jigsaw or handsaw for cutting the plywood
  • A soldering iron for modifying the servo

  • A fritzing sketch of how to wire it up:
    How to wire it up

    Here’s a short video of putting it together, again, expect a more detailed tutorial to come soon.


    Here’s how to modify a servo to read the position via its internal potentiometer:

    Attaching the brackets to the servo:

    Let us know what you think in the comments!

    -Laan Labs

    Posted on October 20, 2011 in Uncategorized

    Share the Story

    About the Author

    Responses (22)

    1. [...] on apple.com: http://www.apple.com/iphone/features/siri.html Here’s a fun experiment done by LAAN Lab. They hecked SIRI to door lock system so that you could freely close/open door with your voice [...]

    2. [...] AI assistant and here’s your chance to give it the keys to your house. This project uses Siri to actuate the deadbolt on an entry door in a roundabout sort of [...]

    3. [...] AI assistant and here’s your chance to give it the keys to your house. This project uses Siri to actuate the deadbolt on an entry door in a roundabout sort of [...]

    4. [...] AI assistant and here’s your chance to give it the keys to your house. This project uses Siri to actuate the deadbolt on an entry door in a roundabout sort of [...]

    5. [...] разработчики опубликовали инструкцию, как это сделать. Система отпирает дверь через Siri или [...]

    6. Dennis
      October 25, 2011 at 9:29 am · Reply

      This is incredibly creative guys and you’ve been kind enough to put it all out there for free. CC, great work man, I’m really impressed. I’ll make sure to prowl about your site to look at all the other cool stuff you’ve got on here. See ya!

    7. Tür öffnen mit Siri » lordmats heiterkeit!
      October 26, 2011 at 5:35 am · Reply

      [...] und Howto >> hier. The Siri hack works by creating a contact called ‘Door’, which is the phone number that we use [...]

    8. [...] AI assistant and here’s your chance to give it the keys to your house. This project uses Siri to actuate the deadbolt on an entry door in a roundabout sort of [...]

    9. [...] laanlabs, [...]

    10. [...] App maker and hacker C.C. Laan of Laan Labs has created a system to unlock the front door of his apartment using the iPhone 4S’s Siri personal assistant, using SMS and Arduino. Check out a video of the process here. [...]

    11. whitney rauh
      November 5, 2011 at 9:40 pm · Reply

      Hi Jason, I was looking to see what you were up to, and stumbled upon your website. Personally knowing how high the Laan IQ runs.. I am sure your apps are exceptional. I am just offering my first hand novice insight into the app that opens the door.
      1. If I were in the market to buy an app to open my door with my iphone, from a marketing pov, showing the internal (actually shown external on the inside of the door’s) operation of the door’s locking mechanism degrades the app because most people don’t have the forsight to realize that you are demo ing the way the app works. The average person may think that you need to have these small mechanical deivices mounted on the inside of the door to work (and, they may be right, I do not know), but it is a negative impression. You know, as I know, that people want easy, transparant, functionality. I think your demo would deliver the message better, if you stated upfront, that this is only a demonstration, or enlist the help of people who can create a cgi demo of the process. If I thought I needed to have unatractive old school locking mechanisms installed on the inside of my door in order for the app to work, I would not be interested. My marketing suggestion, is just to make sure the video explains that this is a demo… or… go with cgi.. remember.. less is more. But, the voice over… is as I remembered.. award winning.
      hope you are well. I am back in NY.
      whitney

    12. whitney rauh
      November 6, 2011 at 7:54 am · Reply

      I forgot to add— a mind blowing app! seriously awesome.

    13. Siri Hacked: Some Of Our Favorite Hacks So Far
      November 28, 2011 at 2:07 pm · Reply

      [...] Unlocks Doors Laan Lab created a contraption that hooks to your door deadbolt and unlocks it upon Siri’s command. [...]

    14. simon
      November 29, 2011 at 12:45 pm · Reply

      great app, great video – bravo!

    15. Sergei
      December 30, 2011 at 3:45 am · Reply

      Jason – great project!

      I am working on incorporating some of your ideas into my own door lock project that I have built for my garage and apartment building front door, next is my own door. I am using ethernet shield and digi’s zigbees.
      I downloaded the project and WyFly, tried to build the project and it looks like
      WiFly.configure(WIFLY_BAUD, 38400); is not defined. I wonder if you are using a different library?
      I am also wondering why not have the app server to run on Arduino? Is it because you did not want to have dynamic DNS or your router did not support it? Lastly, what do you think about building some sort of security? I don’t think Arduino has support for HTTPS, but there is AES156 library for it. Any thoughts on that? Also, I am interested in learning more about googles appengine and using your py code. It would be great to see that instructables soon! Cheers and thank you for the great project!!

      Serge

    16. Karl
      January 24, 2012 at 5:44 pm · Reply

      I don’t understand why you are going to so much effort with the servos etc when you can buy both electrically actuated door locks and electrically actuated door jambs. These are cheap, precise, and proven technology. You can even combine this with a electric door opening arm to physically open and close the door too.
      Focus on the circuitry that orders the door to unlock, rather than reinventing the wheel (door lock)

    17. Diego
      March 5, 2012 at 12:52 pm · Reply

      Hi,
      i watched you amazing video about arduino and wifly, and i liked it.
      i uploaded the sketch on arduino and set some parameters throw arduino serial monitor, but i think i am making some mistakes because the ad-hoc network is revealed by iphone but it can’t connect…have you some ideas about some configuration commands to solve it?
      Even Telnet on mac can connect giving me “connection refused” or “timeout” even if it’s connect correctly.

      i hope you can help me

      thanks

    18. Johan
      March 29, 2012 at 10:25 am · Reply

      How do i write a code to Siri if i say: “open door”, it will automaticly send sms to the door whitout that i have to confirm the sms that i am sending?

    19. Anonymous
      April 17, 2012 at 6:07 am · Reply

      Awesome… thanks so much for posting this!

    20. Cody
      May 7, 2012 at 12:12 pm · Reply

      I’m confused.

      When I open the website to the link of your files, I don’t understand what gets downloaded, what gets uploaded to the arduino board, if it works with an ethernet shield and not wiFly etc.

    21. Kevin
      December 18, 2012 at 11:03 am · Reply

      Hi Jason.

      Did you use GSM here? How could this received SMS?

    22. ughu
      March 1, 2013 at 3:29 am · Reply

      fuck ya

    Leave a reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Back to Top