Great to see things like this back on the front page. This is what HN is about rather than tech stocks, IPO, Tesla public announcements and things that belong on Reddit. Thanks a bunch, that being said I will working on this tonight!
Glad you like it! Let me know how it turns out - my ideal would be to evolve it to use a 3d-printed servo mount rather than cardboard and duct tape, but it's a good start!
Rather than only allowing access from a given phone number, you may want to do what I did in another project: allow access from anybody in a given google contact group.
My project allows people in a given contact group to open my garage. A phone number is posted outside my garage and a sign that says "Text OPEN GARAGE" to this number."
Twilio contacts my nodejs script and if they are in the google contact group, it sends a message to the SmartThings API to trigger my ZWave relay.
This isn't very well documented, but if anyone has any questions let me know:
I love that approach, I believe SmartThings uses Twilio as well.
Another potential approach is to do access control using Twilio (make an interface to add/remove authorized numbers via SMS) and store that in a DB on your server
I actually did something similar to that for a bachelor party - there were 10 of us, combinations of iphones and androids. Rather than having everyone exchange phone numbers for a group SMS, I asked everyone to text their name to a twilio phone number. (XXX-XX-PARTY)
If the twilio number received a text from someone not in the db, it added it. If it was in the database, it would prefix any message they sent with their name: and send the text to everyone else in the db.
Worked out great. Cost me about $20 for the weekend though. :)
Can't locate it right now... I actually used redis sets (list of numbers) and key/values (number->name) instead of a traditional db (just because I wanted to familiarize myself more with redis at the time).
I consider myself a 'prototyping engineer' and when I want to learn a new technology, I try to learn it while solving a problem in my personal life :).
i've been reading Hacker News forever and just now created an account to share my project similar to this...
I built mine a couple years ago. I 3d printed most of the parts on a Makerbot Thing-o-matic. It uses 24 rare earth magnets built into the feet to attach to the door over the deadbolt. There is a 3d printed sleeve that slides over the deadbolt lever and turns with a servo.
A piezo sensor on the frame of the device detects knocks on the door. knock the correct pattern (shave and a hair cut, two bits, for example), and the servo turns the deadbolt.
It is easily modified with an ethernet sheild to be controlled with my phone when within range of wifi outside the house...
I still plan to do a proper write-up and share the source code and stl files for printing- i just havent gotten around to it yet. I've got a few other unique projects I'd like to share as well, I just need some time to organize some photos and info.
thanks! no, I don't have the models up on thingiverse, but I plan to put them up there and to document the build. I'd like to start documenting more of my builds as well. I'm going to work on promoting myself and my work better as it's something I've not spent much effort on recently.
I enjoy reading stuff like the original post here and am always looking for such content but so easily forget that I could be sharing my projects and methods... perhaps time to stop lurking so much :)
If you have your own home, or perhaps a very forgiving landlord, an electric door strike is much superior to a servo twisting a lock. eg, this one is $40 http://amzn.com/B003TN1HAM
It won't interfere with the regular operation of the door, and can be operated by a simple relay -- the more complex mechanical bits are handled for you.
You may also be able to use an electric deadbolt with keypad like http://www.amzn.com/B0045Y1LNM with your existing keys, or even the existing outer facade so it isn't obvious to a passerby (say, your landord) that you've swapped it out.
Yes, and the one configured as fail secure is probably the most popular. When power fails, it automatically locks: applying the 12V power opens the strike.
The only downside is installation cost? isn't it a job for a locksmith to install, especially when your existing strike faceplace is metal. Also, you'd need some power hooked up to it, on the inside of your door frame.
Assuming your door has a traditional door knob & lock fitted as well, an electric strike doesn't prevent you opening the door when its in the locked position. The way an electric strike unlocks a door is by swivelling a part of the strike plate away. When its 'locked' its really just like a regular door with a fixed strike plate, as per this diagram ... http://www.hometips.com/wp-content/uploads/2012/06/doorknob_...
I keep thinking about building something like this but the thing that ours me off is the possible implications in the case of having to claim on insurance if someone robbed my house.
I have very little doubt that the insurance company would take a dim view of my front door lock being connected to the web, and leap on the chance to deny any claims on the grounds that the intruder could have broken in via my code, making it equivalent to leaving the door unlocked when going out.
Honestly, you sound unnecessarily paranoid about this. There are tons of mainstream remote-controllable locks these days. Walk down the door hardware aisle of HD or Lowe's and you'll see multiple options from Kwikset, Schlage, and some off brands as well.
Your insurance does essentially protect you from yourself. As long as you don't do anything that intentionally makes your house more attractive to burglars (like a neon sign in the window indicating door lock status) the likelihood of what you describe (a claim denial) is nil.
This assumes that the intruder was able to get into the house without breaking something, which I would assume occurs rarely... unless you actually do leave the door unlocked.
I've been building a lockitron clone using a raspberry pi. The key functionality selling point for me was being able to lock/unlock the door base on proximity like lockitron's "sense" feature.
Turns out this is much more difficult than it sounds because bluetooth le rssi is pretty unreliable. I've figured how to get it working for my particular case but I would be curious how lockitron configures it to work consistently for a wider range of locations and devices.
On a separate note, the servo can be attached to the door without duct tape or modifying the door if you have a door like [1]. I simply bought a piece of rubber tubing that fits over the knob and then configured a smaller piece of rubber to fit the servo arm to the lock piece on the knob. This design is also nice in that if the device malfunctions a key can override it.
I've done this project before, except I used Tropo + Arduino Ethernet + Twitter's API. Coding the server in Node.js is way easier, but requires a computer to remain on and connected to the Arduino in order to work.
Also, the duct tape will come off after around 100 locks/unlocks, so I eventually had to remake the whole thing with a 3D printed frame and shaft that would be secured to the door. My initial version was horrible, held together by glue/duct tape/cardboard/prayers.
If you want to turn the lock without the motor, you need to have the Arduino detach the servo after the rotation is complete. If you don't detach the servo, you'll damage the motor if you turn it by hand, because the internal tachometer will fight as hard as it can to maintain the servo's position.
Overall a very cool project and a great primer into using Node with Arduino.
Thanks, glad you like it! My eventual goal is to evolve it to use a 3d-printed servo mount, but sadly I do not have a 3d printer handy. Would love to see your model though.
Great project. Here's an idea - my neighborhood needs a timed garbage can lock. I can't take the garbage can out at night for the garbage truck in the morning because people dig through trash and leave a mess. It is annoying because I hate walking out in the cold half awake.
Cool project. I recently did a similar project that involved controlling an Arduino from Node.JS. A friend suggested I use Firmata, which is a standard protocol for talking to Arduinos via the serial port.
Very painless to use, and the script for the Arduino is included on the Aruidino SDK examples menu. You can get up and running in Node.JS in just a few lines of code.
For what it's worth, my project involved playing the brass bells on a christmas ornament from a game of 2048.
I think I saw that, actually. Really great hack - did you post the 3D model anywhere? Would love to evolve my duct tape/cardboard into a 3D print at some point.
I don't recall much being proprietary about the first Lockitron -- it was off the shelf insteon components for the lock and the controller as this post highlights can be done in a number of ways.
It's nice to see different homebrew options popping up -- hopefully it will lead to an open source equivalent that can be 3d printed eventually :)
I considered doing this for a while (although probably sans-twillo), but had a hard time finding reliable information on servos you could read information from. Is the Servo type used in the code in this project built in to the arduino libraries? I've never seen it before.
When I get my Tessel I'm going to try to implement this in 100% Node.js With the Tessel I should be able to communicate with Twilio directly from the microdevice via Wifi without needing to start up a separate server on my computer and communicate via serial port.
That's an awesome idea. I was going to use either a Raspberry Pi or Arduino Yun for mine (to remove the computer from the equation) but a Tessel would be even better!
Cool project, and really smart of them to put this on their blog. I know it seems obvious to a lot of us, but there are a lot of people out there that would never think of doing this.
This is so awesome! Question: (I haven't used servos much) Will this still allow the regular key functionality to work? Can you turn the servo manually or is it resistant?
You'll likely need to add some kind of method to turn off the servo when it is not actively in use. When a servo is powered, it resists being turned manually.
ah, I see. Still extremely useful-- my roommates and I lose our keys all the time. Also love the idea of adding "groups" of cell numbers to the permission list.
This is great, not just for the idea, but how detail the writeup is. I feel as though I could do this even without much Arduino and Node.js experience.
As long as the lock/unlock control is a 180-degree (or less) turn it should be fine, though from my understanding most Mortise locks would not fit this criteria
Yup. You can use any SMS-enabled Twilio number (or voice-enabled number if you change some of the code to respond to dial-tones) - list can be found at https://www.twilio.com/international