How to Make a Smartphone Connected Door Lock
Vložit
- čas přidán 22. 08. 2024
- See how we built it, including our materials, code, and supplemental instructions, on Hackster.io: www.hackster.i...
In this video, we show you how to make a smartphone-controlled, internet-connected deadbolt actuator powered by a Raspberry Pi that can be added onto your existing door lock without any modifications to the door. The door lock can be controlled by multiple smartphones, and even notify you whenever someone locks/unlocks the door. All of this is done using a simple, drag-and-drop app builder (www.blynk.cc/) which makes building your own Internet of Things (IoT) app easier than ever. For an extra impressive door lock, we'll also show you how to add a simple LED light to indicate if the door is locked, and a push-button to operate the lock manually.
USEFUL LINKS
Get the 3D printed parts on our Patreon: / smart-doorlock-37732960
If you don't have a 3d printer, you should be able to print the parts on a local community printer or with an online service like Shapeways.
Github repository: github.com/Hac...
Blynk: www.blynk.cc/
Get our 3D printer: robo3d.myshopif...?rfsn=1004615.c5abe
MATERIALS
1× Raspberry Pi 3 Model B
www.raspberryp...
1× High Torque Servo, Tower Pro MG995R
www.adafruit.c...
1× Red, 3 mm LED Light
www.sparkfun.c...
1× Mini Pushbutton Switch
www.sparkfun.c...
5× Jumper Wires
www.sparkfun.c... , www.sparkfun.c...
1× Glue
1x Outdoor Mounting Tape
www.amazon.com...
1× 1/4" MDF Board (optional)
www.homedepot.c...
OTHER
Subscribe to Hacker Shack: / @hackershack
Follow Hacker Shack on Instagram:
/ hackershackofficial
Music by: David Cutter Music - www.davidcutter...
Disclaimer
The methods shown in this video should be used
as a guide only.
HACKER SHACK ACCEPTS NO RESPONSIBILITY FOR
ACCIDENTS OR INCIDENTS ARISING FROM INDIVIDUALS
UNDERTAKING ANY OF THE TASKS DESCRIBED. IN
PARTICULAR, IF UNSURE YOU SHOULD ALWAYS CONTACT
A QUALIFIED TRADESMAN BEFORE PROCEEDING.
My home door is smartphone compatible since 2012.
"Mom, can you open the door? I'm outside"
.
^_^
Meow 😸
are u using rapberry pi..can u help me on code and component
Guys, I just stumbled onto your site today. You two rock! This is a GREAT site. I am pretty obsessed with home automation and seeing what home users can accomplish. I love that you guys are giving us great tools and the projects are in stable shape. Seriously making them pretty and hiding wires and painting cables.. I would rather we do that and you guys concentrate on the bones and muscle of the projects. (I am just putting that in cause amazed when people are complaining about "I see wires!!!!". They should know how to hide a wire!) I am looking back now at your project list for fun cool ideas! you ROCK!
Little overkill with a Pi. ESP8266 with sleep mode and 18650 would be nice so you don't need a charger all the time.
came here to say this. you could probably get away with using an arduino and the smartthings library for example
smoresrock or attiny 85 ?
A couple of suggestions to improve your project: couple the servo with a gear and put a thru shaft. Gear should engage to the shaft on shaft's axial movement (like a car gear box). Put a handle to the back end of the shaft and a spring which would push the shaft towards gear. When someone pushes the handle from inside that would disengage the gear, and you can lock/unlock the door manually by the handle. I hope this makes sense.
How great to have a backdoor on your front door? 😊
lol
This is so cool! Thank you for sharing. I have a question; Can you use your key still to unlock or it wont let it turn?
You guys deserve way more subscribers! Also keep up the good explanation of what to do. It's really helpfull
Wow this a completely dif side of CZcams . I love it !
Really like the lock you made. I made a similar project. it's the same principle but I added a raspberry pi camera with opencv so that it automatically warns you when there is someone at the door.
EXACTLY WHAT I WAS SEARCHING FOR
LOVE YOU
could you have a small onboard battery that could power the pi for a few minutes and then some contacts on the top of the door to transmit power when closed? that way wires could be routed in different directions.
Good _overview_ of building a door lock.
So _many_ security issues/worst-practices (holes) though... 😧
Next video in this series will be: "how our house got hacked"!
If you end up selling kits, make sure you include a disclaimer!
This would be great though for in inside door lock. If you have room mates and want a lock on your bedroom or you have one room that is your work area that you want the kids to not get into.
Ha! This is awesome! Talk about innovating! :)
should be a nodeMCU or ESP8266 enough, instead of a relatively expensive raspberry pi 3 ?
TheBadFred the RasperryPi is definitly an overkill, when it's just about WiFi and some IO-Pins. Blynk also supports ESP8266 according to their website.
SO juse need to use same GPIO HEADER?
Yanir just google it.. there are enough tutorials and howtos on the internet ;)
but i want to use this project, as i undestand just need to use same GPIO HEADER on Raspberry pi Zero :)
Got it working with the NodeMCU, it gets super hot after a while tho. I'm powering it with a phone external battery
Awesome video! My only complaint would be that you're using vim and not nano...
Just use esp886 and some microcontroller like stm32 still there's a need for a server or computer logged into internet so we can access and that's why we use raspberry. Miss you guys, hopefully you are doing great in your other projects. CZcams isn't enough anymore
Probably works in America that use that type of lock. Here in the UK the locks are generally integrated on the door handle and dont have manual overrides, but an interesting project none the less.
Yeah this is nice, good work by the way, but there are door jam bolt release mechanisms that you don't have to make any 3d printed stuff. They don't cost much either. You can have the wire hidden behind the trim boards. And by using an MHCOZY smart switch you don't have to do ANY arduino programming. You can even use the Bluetooth function on the MHCOZY to open the door when your phone is close to the door.
You can also have gaagle's always listening function to unlock the door when you say "Hay gaagle unlock my front door.". For those times you're holding a bunch of groceries.
door jam locks like this guy czcams.com/video/M76g81G3bi8/video.html
Great content! Would nice if you can leave a description with all the tools u are using
Very Cool Video - You made that simple and easy to do!
Can you still use the existing physical key to unlock the door while also using this automation? Wouldn't the servo be stuck at its the last state ?
Great project. The only thing I'd say is that, to get the same functionality with an ESP8266 would be infinitely simpler and cheaper. Still, if it's a Raspberry Pi project you're after, this is a great one!
and it will run Esphome and it could be used in Home Assistant
I'm seeing this several years after it was made and I'm trying to think of how it could be miniaturized even further. If you used an ESP8266 you could put a battery on board to run the ESP and then you wouldn't have wires running from the Pi to a power source.
Does the lock work manually too if the device is set on the door?
cool project. I started thinking do this at my Home.
You guys should definitely update more and be more active to get more subs!! Love your vids man I'm definitely gonna try this out thanks so much!!
+Antonio Fontes thanks! We want to make more videos, but it's hard because we both have full time jobs. However, we do have some cool stuff planned for the next few months :)
Hacker House I'll definitely be watching all your vids. Keep up the good work, you guys always have good content
Antonio Fontes totally agree with you, I love this channel but the 3-4 weeks before a new video does kinda drag. But I do understand the wait.
Kits? can you give an SD card with all the tec parts done? So i can just plug and play with my Pie?
Anyways, awesome vid! I'm doing to a door that's a secret door to a secret room. It'll also be spring loaded so it'll unlock and open. I'm going to put most of this inside the door and connect the wiring inside the wall. Been wondering how to do the lock on this door, so thanks again!
wow!! this video is awesome and the presenters are just on point. thank you its really enlightening. i am wondering though, if i want to use Arduino-Uno instead of Raspberry Pi and use Sim800 GSM module for accessing my micro-controller instead of blue-tooth module do i need to have an external power supply for the servo or Arduino power supply still works?
Amazing video, but I was wondering if it’s possible to add Alexa voice recognition to some how control the raspberry pi in order to lock and unlock the door :)
Thanks. But why would you not combine a 3d printed housing for the Pi as well so it doesn't look like garbage.
This looks really nice, but also really dangerous if someone really uses this. Blynk has to get 1 database breach and every door can be unlocked by logging in and yeah, opening the door. It looks fun for other things tho! :)
OK. Spitballing an idea here. Could we use this architecture to control a 3 position switch? I am in the formative stages of an idea here where you use a Raspberry Pi to control and turn a generator off and on based on the power level of the battery back-up. Battery hits 30%? Electric Start Generator turns on. Battery hits 100%? Generator is switched off.
I'd also like to have a notification sent to my smart phone if the generator is turned on, thereby alerting me to power outages when I am not present in the building. And possibly scheduling regular weekly maintenance by switching itself on and off for a short period of time each week. Oh, and possibly attaching a small LED screen to show the battery backup power levels as read by the pi.
The practical upshot is that during a blackout, all devices can stay powered even in the absence of staffing. My biggest concern is in the servo being able to switch the key from off to on to start and back to on.
How did you go with this project, did you follow through? I'm in a similar position with need for a device like this
You would be much better off by removing the mechanical element of this design. Just use a couple of relays to control starting the generator. You should probably use a sensor to detect when the generator is running to disengage the starter motor. You would also want to prevent the start engaging when the unit is already running. This could be achieved multiple ways.
this is awesome video!but can we use arduino uno r3 instead using raspberry pie?
What if you made the lock voice activated? Perhaps similar to the smart mirror, except it locks, and unlocks the door.
+bootlegged_cake great idea. Maybe we'll make an update video about it :D
Can't we make it much cleaner than that? I mean all in one piece.
So the thief can come up and say "unlock"? lol
lankyfingers If the lock was activated by a voice controlled script, it would most likely be behind a sound proof door, with the mic facing inside the house, and not outside. If you wanted a voice unlock outside, you could even program it to only unlock when a certain voice is heard.
Yeah I know, was just being silly =) would be cool to have it so you could speak to your phone to unlock it, rather than having to yell across the room to the mic facing you etc.
For doors with not a turning handle on the outside, would it be possible to remove the door knob lock (we call it tongue in my country, I am talking about the thing that closes and opens when you turn the door knob). Remove it or replace it with one that opens and closes with some basic force then have an external lock that has a female insert screwed on the door and a male remote controled piece on the wall that locks the door tightly closed using the app.
that way you can still use your doors lock system and as a backup and keep that unlocked when you want to remotely open the door by opening the external mechanism.
Great project!
I have my servo moving using Blynk, but it only works with the Raspberry terminal open.
Also, it does not start automatically on reboot by inserting the code to the rc.local file.
What am I missing?
Thanks
Really excellent Video. It would be nice if you add google home or Amazon Alexa to lock the door as well.
Is that project can be done with Ardiuino (Exchange of Raspberry Pai )?
Guys. This is awesome.
Can you please make a tutorial on port forwarding the blynk local server on raspberry pi ?
Thank you in advance.
Thanks for share you work. How blink apps know if the door is locked or unlocked? The app read the status of the led for see if is locked or unlocked?
Awesome, how do you do if you don't have energy or wifi?
It is possible to connect the App with Alexa or Google Assistant? To Lock and Unlock with Voice Command?
Great tutorial, what if i want to lock/unlock by my own mobile application?
Great video guys and very impressive skill sets you have. Awesome! You are the inventors for the future!
Could you add another button on the case that is programmed to lock or unlock the door depending on which state it is in?
I don't know too much about this kind of stuff but for sure want to learn about it. The servo is it always in one place until told to be moved or can it be freely turned as you want but moves when it is told to? If it can be moved freely an opening could be made on the casing so you could reach a finger in a turn the lock physically right? Also, does the servo keep track of how much it has turned or is it just a motor that moves when it is told?
I would love to learn about this so if you have any knowledge to share please do so! Thanks.
For the button part, you can just add an if statement in the code
Is blynk compatible with the pi 4? If it is, what option in the blynk app do I choose? I'd really appreciate it if u guys could respond. I need it for a school project 😅
Hi what if instead of using servo motor I'll be using a solenoid, would it affect the setup and the output?
Good day, Is it possible to merge or connect two of your projects: Smart Security Camera and Smartphone Connected Home Door Lock in one project? Does the raspberry pi 3 can run them simultaneously? Thank you
thanx .. it's so helpful
Would be good if you could manually override your servo if you need to enter with a key in case your internet is out
@HackerShack what are the dimensions of the wooden servo housing that you said that you were going to explain
Any thoughts on using an HTTP server on NodeMCU rather than a NodeJS on Pi. I'm thinking less complexity, less spaghetti. A magnetic closure sensor would be cool too so that you could also open/close state.
Are the 3D printing files still available somewhere? I can't find them via the link provided below the video...
I liked this lock system
can you solder a battery to the board and plug in a small wifi emitter so that it can be power outage proof?
Question - What would you do if there is no power and the electricity is cut? Can you add backup battery power just in that case and this battery to be used only when the primary electricity circuit is not working. And if that is possible how woul you do it(connect it)? :)
I love your content. it's so cool.
+Drking Curry thanks for the support!
Drking Curry is the best way
Hacker House Mafia
nice work!
Hi is it possible to make the same hack with an ESP2866 Board or in Raspberry Pi Zero? Thank you.
I have a question beyond the subject - where can I buy the jacket the young woman has at the beginning of the video? Or what is the brand name? Tkanks.
can this be done on a microbit or no
how can i running at startup? i have follow all the instruction but everytime i power on my raspberry in blynk it says offline, i must run it on terminal every single time. or do i used to run it on terminal every time? thanks
Hi what app do u use to create the app
Price of all materials tell me plz
Why no driver circuitry? How much does that servo draw under load...?
where do I buy the kit? my grandma need this she always forgets her keys and always call me and I live on the other side of the town.
Will the Github code work for any other pieces of hardware like an Arduino Uno r3. If not, is it hard to code it.
What 3D printer did you use
You are great sir
nice idea, but unfortunately this seems like it would be too unsafe for the main entrance of my house
It needs a way to disconnect the servo right after unlocking or locking.
How can you manage the door locker during a power cut or unavailability of power?
Thats very useful if my mom comes to home i dont want to open my door I'll Just use this
should the 1k and 10 k resistor be connected in any specific order
Hi what version of node we would use in here
Hi, quick question, on github, you said to delete node_modules if failed. I cannot delete it in my raspberry files. I tried download newer version of nodes and extracted it but still can't manage to do it also. Can you help?
Super cool! But, maybe invest in a third-hand tool? ;)
thanks for a great tutorial. how can i get the code :(
question... can this lock be open with the key or by picking it?
Could i use the pi Zero for this proyect instead of the pi 3 ?
And if there is a power failure, how do you open the door and how do you open it from the inside?
what happens if your phone dies? does opening the door with a key break the servo?
Can raspberry pi handle the power for the servo?
What if I use and audrino instead of raspberry pi?
When I enter to install the dependencies both with and without sudo, it will not install the dependencies and I get a screen full of errors
hey make home automation using ESP module only... without OS or Arduino
can u make this without using blynk and make ur own app?
can the lock detect if the door is closed before it engages the lock?
Plzz send the coding in the discription that you use in this project
help me working with wireless camera with raspberry pi 3 which is to be connected to drone.
Please what other board can be used for this lock
Sometimes you have to type sudo apt-get install npm if sudo install npm gets you the command not found error
Vikram Mishra do you have errors in the program ?
But it shows temporary failure resolving raspbian.raspberrypi.org
The link to the 3d printable files doesn't seem to work anymore. Any chance you can post it somewhere?
It’s on our patreon page. The link should be in the description!
how if you add a failsafe function? just in case the doorlock is not functioning normally.
Is this considered an IOT?
SSL not authorized, Why this errors appears me, If i did all the steps, inclusively I could Blynk a LED with my Pi?
hhaahah que buen proyecto yo estaba intentando hacer algo así pero con jarvis.
can this work everyday for 24 hours wont this have a side effect to the pi running full time ?
can I add a rfid lector to work like authenticator?
Can you please rewrite the code for arduino in c++ :D??