Build a Raspberry Pi Smart Door Lock Security System for your Smart Home!

Тәжірибелік нұсқаулар және стиль

Build the ultimate smart home door lock system, turning your office into a high-security vault!
✅ Get 2 FREE Months of Unlimited Classes with Skillshare: skillshare.eqcm.net/NExON
✅ Buy iFixit Pro Tech Toolkit: geni.us/iFixitTools (paid link)
To be granted access and open the door, visitors will require not just two but THREE factors of authentication; an RFID keyfob, their unique PIN, and a one-time passcode sent to their phone via SMS. It's all built using readily-available low-cost components built around a Raspberry Pi (could easily be built with an Arduino, or expanded to include a door alarm.).
⭐ My Referral Links ⭐
🏎️ Schedule a FREE test drive or order Tesla Products: geni.us/SoN-TESLA
💡 Split £100 with me when you switch to 🐙 Octopus Energy: geni.us/SoN-OctopusEnergy
🧋 Get £10 off at Huel: geni.us/SoN-Huel
🎸 Buy musical instruments, audio & PA gear from Thomann: geni.us/SoN-Thomann
🌍 My KIT profile: kit.co/paulfp
(Commissions/credits are earned from these links, which helps support me and the channel.)
#RaspberryPi #HomeAutomation #Security
Build this project yourself! You’ll just need to buy the following components and tools...
DISCLOSURE: As an Amazon Associate we earn from qualifying purchases.
Raspberry Pi:
Amazon: geni.us/Raspberry-Pi
Raspberry Pi power supply:
Amazon: geni.us/RaspPi-PowerSupply
Raspberry Pi touchscreen (4inch RPi LCD (A))
Amazon: geni.us/wMYkmV
USB RFID Reader & Tags
UK: amzn.to/2sikupH
US: amzn.to/2tgrqIM
5V Single Channel Relay Switch
UK: amzn.to/2udy92H
US: amzn.to/2si83dT
Electric Strike / Lock Release
UK: amzn.to/2udLpEG
US: amzn.to/2tSiMNR
ATX Power Supply (for 5V & 12V supply)
Amazon: geni.us/ATX-Power-Supply
Dupont Cables (Male to Male, Male to Female, Female to Female)
UK: amzn.to/2tM6Rll
US: amzn.to/2u8lPVn
GPIO Expansion Board
Amazon: geni.us/GPIO-Expansion-Board
Multimeter
UK: amzn.to/2AtjMeD
US: amzn.to/2hntE50
Precision Screwdriver Set
UK: amzn.to/2zGLlUF
US: amzn.to/2zsxWwu
Wire Strippers / Cutters / Crimpers
UK: amzn.to/2hfLaVn
US: amzn.to/2zsnxBb
Soldering Iron
UK: amzn.to/2AslE7H
US: amzn.to/2AslOMl
Choc Blocks
UK: amzn.to/2jaN91e
US: amzn.to/2hpU5Hf
Hot Glue G_n
UK: amzn.to/2tgUekp
US: amzn.to/2rXVi8C
Cordless Drill
UK: amzn.to/2AlnVR7
US: amzn.to/2zGmHno
Jigsaw
UK: amzn.to/2AtqCRq
US: amzn.to/2hkwWGe
** Config file paths **
- Rotate Display: /boot/config.txt
- Rotate Touchscreen: /etc/X11/xorg.conf.d/99-calibration.conf
- Autoload Python Script on Bootup: ~/.config/lxsession/LXDE-pi/autostart
To determine the path to your input device (the RFID reader), type this command:
ls -lah /dev/input/by-id
Look for your USB RFID reader (eg. /event0) and update in the Python script if required.
Download the Python Script and blank database file at github.com/paulfp/Three-Facto...
► Support on PATREON: / switchedonnetwork
► Browse our MERCH: teespring.com/stores/switched...
► Explore our GEAR: kit.co/paulfp
Check out our Amazon Influencer shops!
► UK: www.amazon.co.uk/shop/switche...
► USA: www.amazon.com/shop/switchedo...
We sometimes use free sound effects in our videos from www.freesfx.co.uk
Stock video clips are (usually) from VideoBlocks, now called Storyblocks Video. You can get a free trial at videoblocks.go2cloud.org/SHFJ
DISCLOSURE: As an Amazon Associate we earn from qualifying purchases.
Copyright © Innobella Media Limited 2017. All Rights Reserved.
www.innobellamedia.uk/

Пікірлер: 583

  • @GeneralHiro
    @GeneralHiro5 жыл бұрын

    Dear God! It's like you actually went through this a few times BEFORE shooting this video! If only every instructional video was as well put together as this one. Two thumbs up mate

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thanks! Worked hard on it - glad you liked it. Thanks for the kind comments, it means a lot 👍

  • @ronaldstilcens3776
    @ronaldstilcens37765 жыл бұрын

    This is an awesome made video! Very clear instructions, shows only needed information, neat video shootage appealing to an eye. A lot of technical information provided with short and clear comments. Is a pleasure to watch!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thanks, glad you enjoyed it!

  • @nezhympanzu2803
    @nezhympanzu28035 жыл бұрын

    You are the dude I was looking for. You just inspired me. Thank you Paul

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Awesome! Hope you have fun building 😃

  • @v0ltgaming344
    @v0ltgaming3445 жыл бұрын

    Wow! This is an amazing tutorial so far! I look forward to giving my guests a 3 factor authentication system to enter hehe! P.S it’s amazing you still reply to comments - you truly are an great creator - got a sub from me

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thanks!

  • @erikmagnusson2137
    @erikmagnusson21374 жыл бұрын

    Very helpful. Thank you!

  • @silmaril464
    @silmaril4645 жыл бұрын

    nice work! thank you for show us your work :)

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Glad you liked it!

  • @stevecharlton3271
    @stevecharlton32714 жыл бұрын

    Absolutely brilliant

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    Thank you!

  • @philliplanfre347
    @philliplanfre34710 ай бұрын

    Exactly what we were looking for.

  • @abdulmuhaimin5926
    @abdulmuhaimin59266 жыл бұрын

    this is amazing project

  • @oneyuuup
    @oneyuuup4 жыл бұрын

    Love this project...I think I'm going to refactor into using Facial Recognition as one of the factors for authentication. You have inspired me!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    Awesome, I'd love to see that!

  • @rhiothelab5251

    @rhiothelab5251

    4 жыл бұрын

    @@SwitchedOnNetwork I am here for the same .I am building facial recognition

  • @nurlanturganov5923
    @nurlanturganov59233 жыл бұрын

    Thank you, for sharing your knowledge, sir!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    My pleasure!

  • @johnangula7313
    @johnangula73133 жыл бұрын

    Simply amazing!!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    Thanks, glad people are still enjoying this years later 😃

  • @rtcunliffe
    @rtcunliffe6 жыл бұрын

    Great video - might use this to secure an internal door in my house that contains my burglar alarm, and more importantly, wine collection. Be good to have that extra layer of security.

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    6 жыл бұрын

    Protecting your wine collection - an ideal use-case for additional security! :)

  • @yogeshkapase9894
    @yogeshkapase98942 жыл бұрын

    This is amzing project....

  • @charliesrccrawler9325
    @charliesrccrawler93252 жыл бұрын

    Awesome THANK YOU, Charl south Africa

  • @jayshawver2603
    @jayshawver26036 жыл бұрын

    Very interesting video. This gives me an interesting approach to think about as I have a client that has 3 separate offices that he would like to have a record of entry by various employees. Thanks for the content!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    6 жыл бұрын

    +Jay Shawver Yes this would be ideal for that. You could centralise the database and then modify the code sightly to also include a new database table column with a site_id which corresponds to each office location. You might also want a failsafe in case of connectivity issues between sites and central database, maybe local copies in a replication setup or something. Let us know what you end up doing! :)

  • @nonnywinner5039
    @nonnywinner50392 жыл бұрын

    Thank you for informative video.

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    2 жыл бұрын

    You're welcome :) Hope you enjoyed it!

  • @nonnywinner5039

    @nonnywinner5039

    2 жыл бұрын

    @@SwitchedOnNetwork Yes very helpful. Working on a booth strap smart lockers project will be using your solution. Again thank you.

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    2 жыл бұрын

    @@nonnywinner5039 Sounds cool, send me details when it's finished, I'd love to see it! :)

  • @AkiraSatsujinki
    @AkiraSatsujinki4 жыл бұрын

    This is almost perfect for my smart door lock project; except that I'm pretty old school and didn't like the RFID system. I wonder if I could replicate similar system to this, but with a magnetic strip card swipe reader instead. Just swipe and it'll grant access XD Awesome tutorial, and very much understandable even for someone with ADHD like me :D

  • @Epiphalactic

    @Epiphalactic

    2 жыл бұрын

    That would be even easier to do, if you just wanted to swipe and get in. If you wanted to add the other factors, you would be able to essentially do the same thing he's doing just replacing the hardware and some of the coding with your proper hardware and code, essentially just replacing the RFID for the mag stripe. They essentially work the same, inputting a code into something, one just uses radio frequency to do it, while the other uses a magnetic strip. If you just wanted the magstripe entry, essentially all you need to do is buy the magstripe reader and the raspberry pi, as well as any other things to operate the electronic door lock and set it up so you swipe and it unlocks. Honestly even using raspi would prolly be overkill, I'd imagine just a simple microcontroller would work, if you aren't gonna make it pull up a profile where you have to input your pin, then and send a temporary authentication code sent to your phone, as there is more processing needed. No need for internet or anything, though, so even a really simple raspi could prolly do it. Like a nano or something. This is just me kinda guessing tho

  • @fridder.
    @fridder.9 ай бұрын

    Cool idea to use an old computer power supply. Nice project

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    9 ай бұрын

    Thanks, it was a fun one. Glad it's still getting the odd view all these years later! 😊

  • @Inte42
    @Inte426 жыл бұрын

    This was amazing! I'll order the stuff as needed!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    6 жыл бұрын

    Thanks, glad you liked it! Let us know how you get on and be sure to let us see some pics/video when you're done 😁😎

  • @johnkramer745
    @johnkramer7454 жыл бұрын

    Awesome video to be honest. I had something of the sort in mind to create but i am a beginner so have no clue how to go about implementing this. For now i am creating a simple home security solution (infrared sensor trip to activate video recording and hosting the controls on a web server). i am just getting into this so your video is a bit out of my league for the moment. i will be back to this in a month s time i hope. RESPECT!!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    Sounds like a great project! And glad you liked this video, thanks :)

  • @chadshumaker2789
    @chadshumaker27893 жыл бұрын

    This is a REALLY NEAT project and nearly exactly what I was looking for. I am not a programmer though and would like to remove the SMS portion and make the RFID and pin code portion both unlock the door. Basically making it dual single factor. Any help with this would be greatly appreciated! I looked at the PY code and generally understand what each command is doing but dont know enough about it to weed out the SMS portion or make both RFID and PIN trigger. Thanks for putting together a great video on this also! VERY well done.

  • @gonsodany

    @gonsodany

    3 жыл бұрын

    Im trying to do the same and remove the sms part of the code, did you get it working?

  • @kiranSharma-bx4xk
    @kiranSharma-bx4xk5 жыл бұрын

    quality content

  • @NightbladeNotty
    @NightbladeNotty5 жыл бұрын

    ok i finally figured out the touche screen part, but i dont have the xorg driver. Is there another similar config i can use or somewhere to download it?

  • @rorybrowne4973
    @rorybrowne49732 жыл бұрын

    Firstly, it's a very useful and informative video. Having that said however, this is still 2 factor authentication. The factors in question are something you have, and something you know. Both the fob and your phone are in the "something you know" factor. Typically the other factor would be "something you are", which generally means biometrics.

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    2 жыл бұрын

    Hi Rory, thanks and I'm glad you enjoyed the video - despite how old it is now! Great to see people still enjoying it. And yes, I soon realised my mistake at the time (and had the same conversation again and again... then many more times when Raspberry Pi themselves featured this project!). It's technically only 2 factor, although 3 steps :-P And whilst it's open source, it means that anyone can alter it and modify to whatever they like, so could adapt it for fingerprint or retina scanning or something like that. I didn't quite have the budget for those at the time :)

  • @prabeshbajracharya99
    @prabeshbajracharya993 жыл бұрын

    I really neee this system at my business

  • @richardbrooks9401
    @richardbrooks94014 жыл бұрын

    I'm so impressed by how easy you make this look. I'm convinced that even I can do it. Here's a question: How would you scale this system up to say a dozen doors in a building and share the same database? And if you were only looking for two-factor authentication (fob & PIN), is there a way to disable the third factor?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    ha, thanks! I'm sure you could :) Yes for scaling up that would be very simple - you'd simply create a central database on a separate machine on the network (that could be another Raspberry Pi, or another computer set up as a database server). Then I'd assign each door its own unique ID number (just 1-12 would do) and slightly modify the scripts running on each door to identify themselves by ID. That could allow you to specify only certain doors that a given user has access to, for instance (via an additional table in the db). The logging as well could include the door ID so you know which door has been accessed. Finally, the scripts running on each door would simply connect to the central DB over the network and not run a db locally on each Raspberry Pi. You could probably get away with using a Pi Zero on each door, in lieu of a full size Pi too, to save money and be more compact. You could also make access to some (or all) doors time-sensitive, too... by specifying time windows that user X has access to door Y. With regards to disabling the third factor, yes you can do this by just modifying the function calls to skip that altogether and go straight to unlocking the door. If I had the budget and a space to do this, I'd love to make another video doing this expanded system. If you make this, I'd love to see it and feature a video guide on the channel!

  • @justeric2871
    @justeric28715 жыл бұрын

    The three factors of authentication are: - Something you know (a password or PIN) - Something you have (a token, key fob, mobile phone, key, etc.) - Something you are (retina, face, fingerprint, voice, etc.) In order to be considered three-factor authentication, it would need to use at least one thing from each category. It only uses something you know (PIN) and something you have (the fob and the phone). It doesn't matter how many of the things you need, if they only come from two categories, it's still just two-factor authentication. Great project, and I might even play around with it, but it's not 3FA :)

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thanks for your comment - and I'm glad you liked the project! :) You're absolutely right about the 2/3 factor... I discovered the strict definition after publishing the video a year ago and I've said "yes, you're right" about a gazillion times since then! :) If only I could add an insert into the video.... haha

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    PS. The code is easily modifiable to include either a retina or fingerprint scanner instead of, or as well as, one of the other factors :)

  • @gonsodany

    @gonsodany

    3 жыл бұрын

    ​@@SwitchedOnNetwork Hi, im doing this as a project in my school, i want to change the sms code for a Fingerprint sensor but im not really the best when it comes to python code, can you give me a help with the code please?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    I'd recommend you scrub up on python, do some beginner's tutorials or something and then move on to reading up about fingerprint readers and any python implementations. 👍

  • @juhokoski6618
    @juhokoski66185 жыл бұрын

    Cool build and extremely well presenting video! Nice fast-tempo-narrative, keeps up the interest but isn´t totaly adhd-all-over-the-place... only concern left is the possibility of blackout. "why there no key!"!"! :) :) 5/5

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thank you for your very kind words! I didn't show it at the start of the video (d'oh) but if you look towards the end (eg. 17:05) you'll see there's a latch on the inside so you can get out. I chose not to fit the front of that (with the Yale-stlye keyhole) but you could of course fit that for an easy "real key" offline backup!

  • @gonsodany
    @gonsodany3 жыл бұрын

    great video.

  • @gonsodany

    @gonsodany

    3 жыл бұрын

    my comment asking for help keeps getting deleted....i got everything working, i just got a problem with the GUI, i've been trying to fit the keypad to my monitor but i cant find the line of code that positions the buttons, my current situation Can you please help me fix this? or give me the code line that does it? its really bugging me the 1,4,7 column always stays in the middle, but the otehr two columns always stick to the right side, any help please?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    Hmm, I'm not sure why that would be happening. The code I wrote isn't very portable so was pretty specific for the hardware I was using. I'd recommend going though and debugging from the ground up until you find the issue. Sorry I can't be of more help, but I hope you get it sorted!

  • @gonsodany

    @gonsodany

    3 жыл бұрын

    ​@@SwitchedOnNetwork im getting this problem: prnt . sc / 12vr9ai and prnt . sc / 12vt0bg when i resize the window it works but if its full screen the 2 last columns always stick to the right side

  • @TheAshassin72
    @TheAshassin725 жыл бұрын

    Hi Paul! Amazing video, and something I'll definitely do. I was just wondering though, Is there a way of making the door open and close remotely via a phone app?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Yes, there is! A few people have mentioned this so maybe it's worth a second video as a project on its own 😀

  • @TheAshassin72

    @TheAshassin72

    5 жыл бұрын

    @@SwitchedOnNetwork Yes Please!! I'm currently trying to design my system with a mixture of 2 different projects on KZread, but a mod to this one would be way easier! Thanks Paul!

  • @leti324
    @leti3242 ай бұрын

    I love this video! But I have a question. You used a 5V relay and connected the IN to a pin on the board, which operates at 3.3V. I'm wondering if this can damage the raspberry pi.

  • @barryhines2255
    @barryhines22555 жыл бұрын

    Great video, what about when you are in the room, can you add an over-ride switch so that you can exit?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thanks, yes the possibilities are (nearly) endless so you can add/change pretty much whatever you like! 😀 Also, depending on the type of latch, you might just also have a catch inside for low-tech exit from the inside...

  • @jennynguyen2309
    @jennynguyen23093 жыл бұрын

    Hi Paul! Thank you so much for the tutorial. I have gotten up to the point of the 2nd authentication but the GUI is only counting the digits pressed. Is there anyway you can help with this?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    Hi Jenny, I'm glad you got this sorted - before I had a chance to reply here! :) With regards to adding profile pictures, you don't upload an image to phpmyadmin as such, as it's just an interface to the database. The code takes the filename of the image (from db table) and then looks for a GIF with that name in the same dir as the script 👍

  • @nicholasstull6952
    @nicholasstull69524 жыл бұрын

    Awesome Video, Thanks. I had a few questions. 1. how could I replace the lock with a servo? 2. how could I use an app instead of the touch screen? 3. and how could I replace the RFID to NFC and use my phone instead of a Fob? 4. Would there be anything different using a Raspberry Pi 4, Than the others? Thanks

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    Glad you liked the video! :) Yes everything you've suggested is possible. Beyond the scope of a comment reply to go into the hows and details, obviously, but you're more than welcome to take my code/setup and modify it like that to suit your preferences :) The only difference if using a Raspberry Pi 4, just like if you were building this today on a 3, is that this project is 3 years old so all the code and software versions are from that era - you'll need to update accordingly for newer versions of pretty much everything. So take my video and instructions as a conceptual guide, rather than an exact step-by-step. Good luck!

  • @dimitriskaltsidis6811
    @dimitriskaltsidis68115 жыл бұрын

    Hi. I found very interesting your project and you made an excellent video. I want to ask you how could i scan with i2c pn532 reader? Thank you! :)

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thank you for your kind comments! I'm glad you enjoyed the video. I don't have any resources for that myself, but if you Google it there are plenty of resources which will help you. Let me know how you get on!

  • @gamalmohamed8510
    @gamalmohamed85103 жыл бұрын

    thx sir for your effort, please, can I replace pin code with face recognition, and SQL-server can not set up in raspberry pi 4, any solution?

  • @muchibam5202
    @muchibam52025 жыл бұрын

    Hii paul.. im want to ask about the hardware. Where do i have to connect the normally close relay switch ? I hope you can help me.

  • @gonsodany
    @gonsodany3 жыл бұрын

    Hello, im a 19 years old portuguese Networking student on my final year, and im required to do a final project for graduation, im love eletronics and your 3-factor authentication door got me even more interested on it. I just wanted to ask if i could do something similar to that as my graduation project. I see that your project uses a touchscreen to show the information and to enter the code, i was thinking if it was possible to change that for a 4x4 keypad and having the messages showing up on a 16x2 lcd. And instead of having the Twilio sms system, having a Fingerprint sensor as the third authentication method. I was looking at your code and i understood a little bit of it but theres things i dont quite understand and im having a hard time adapting your code to use the 4x4 keypad and show the message on the 16x2 lcd. Can you give me some help changing the code, or some hints on how the code works? If someone is experienced in python coding can you help me? I highly appreciate it. Thanks.

  • @ahmedoueslati6333
    @ahmedoueslati63332 жыл бұрын

    What an awesome tutorial. I'm implementing this work for my project, and I have a few issues. If you can help me with please, I follow all the steps; however, when I run the python programme, I get this error message : (_tkinter.TclError: no display name and no $DISPLAY environment variable pi ) and also when I turn on the Pi I got a message in the touch screen "failed the load overall spi 2708" I scan the key fob and nothing come up. any help will be much appreciated

  • @sikazwe2010
    @sikazwe20105 жыл бұрын

    Thanks for sharing this great video. I have a question, if I used a non USB input device, like a switch how can it be monitored for status change using RPI.GPIO?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    That would depend very much on the device in question. Your best bet is to see if any documentation or example code comes with the device, and if not use the device name as a starting point for your research into it. Good luck!

  • @sikazwe2010

    @sikazwe2010

    5 жыл бұрын

    @@SwitchedOnNetwork Cheers. I'm trying to incorporate tkinter with rpi.gpio inputs

  • @aimanyt7270
    @aimanyt72705 жыл бұрын

    Hello sir. Im really lost right now. I want to make disabled parking project. I use rfid reader and card for authentication, ultrasonic sensor to detect if there is a car park at the spot, lcd to display the access, and wifi to send notification to the people who in charge. How can i connect all of this ? It makes me down because i dont even know how to do it. Ive been doing some research but not sven one is helping me out. I want to ask if i want to connect all of this, i have to simply coding one by one or there is another way ? Appreciate it so much if you see my comment 🙏🏼

  • @vomm27
    @vomm273 жыл бұрын

    Hi bro this is very good video, may I ask if I were to add face authentication how is it possible ?

  • @johanhjalmarsson6789
    @johanhjalmarsson67892 жыл бұрын

    Hi. Great video. As others have said could you make a version that not has sms code and that has support for multiple doors and if you could add support for an exit button or a 2 way system for access and exit . Best regards Johan

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    2 жыл бұрын

    Hi Johan, thanks for your comment and I'm glad you liked the video and it's still being appreciated all these years later :) Yes, as it's an open source project you can do all of that and more - consider this a base of inspiration onto which you can build! I'd love to see what you come up with, so if you're on Twitter do follow me (@paulfp) and send me pics/video of your finished build :)

  • @ryanjohnson6194
    @ryanjohnson61944 жыл бұрын

    Will it still work if the rfid is replaced with a finger print scanner

  • @arnoldmitrica8108
    @arnoldmitrica81084 жыл бұрын

    Hi! I have this project for my school, and I got stuck at the error for line 194 in lock.py (rfid_presented += keys[ event.code ] IndexError: string index out of range. Do you have any idea?

  • @felillume3279
    @felillume32796 жыл бұрын

    amazing!! your tutorial is so easy to follow!! and much better than using the RC522 RFID reader...i am trying to build a similar controller using a mag lock: should work the same way, using your same logic! :) thanks for this video

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    6 жыл бұрын

    +Fel Illume Glad you liked it! Be sure to send over pics or a video of yours too 😀

  • @felillume3279

    @felillume3279

    6 жыл бұрын

    one question though - how do you manage to get the info of the fobs/card that you add to your sql dbase? so that when read the rPI knows it's correct?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    6 жыл бұрын

    Ah ha, that's easy :) Since the RFID reader I was using acts like a computer keyboard, it just inputs the text that's contained within the card. So if you were to plug it into a Windows machine for example and open up Notepad, then scan the card, you'd see the numbers getting quickly typed into Notepad. So, when you're entering the details into your database, you could connect to phpMyAdmin from another PC with an identical card reader plugged in, select the "code" input field and scan the fob to enter in the number. There's potential on this project to make a nice web management interface to add/delete/edit/suspend users from the system, etc. If there's enough demand I might even make a video showing that in 2018 :)

  • @felillume3279

    @felillume3279

    6 жыл бұрын

    ah ah :) OK, that was easy...but i don't do easy :P I dived into Python, C# and also SQL programming without a dot of info ;) - sounds good - i will attempt that web admin console too: sounds like a great challenge :D i was talking to a friend about installing the mag lock security using the R-PI and he said "it must not be safe enough, because companies would mass produce them"...i thought, mass produced stuff is cheap and not customisable ;)

  • @eugenemorley809
    @eugenemorley8095 жыл бұрын

    Hey Paul Do I have to make sure all the files go to the home file or just the one that says lock.py file? I keep getting an error saying this file doesn’t exist?

  • @Tomwalters76
    @Tomwalters765 жыл бұрын

    awesome project, exactly what i need for a purpose that just cropped up, is there a simple way to disable the other 2 factors of authentification (removing the Text code and user passcode to make it into a SQL controlled RFID lock only ? thanks :)

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thanks, glad you liked it! The answer is yes, you can edit the python script to do whatever you like. Essentially just comment out the bits you don't need... Or you might be better off with this: github.com/paulfp/NFC-Door-Lock My full tutorial on how to use that code featured in HackSpace magazine: www.paulfp.uk/blog/2018/02/new-magazine-article-build-an-nfc-powered-door-lock/

  • @Tomwalters76

    @Tomwalters76

    5 жыл бұрын

    apologies i just read doen the comments and have seen your previous reply to this question, can you just disbale it in the code or do you have to remove the code ? thanks

  • @ggarza78
    @ggarza786 жыл бұрын

    Does it need a SIM card to send the SMS message? Great project!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    6 жыл бұрын

    No, as it uses a web service (Twilio in the example, you could use any) instead - so no SIM required 😀

  • @ggarza78

    @ggarza78

    6 жыл бұрын

    Thanks!

  • @scorpions333z
    @scorpions333z2 жыл бұрын

    good, I want to realize that I can turn on my miner remotely, can I get it? which Raspberry P buy? Thank you

  • @Gnoekeos
    @Gnoekeos3 жыл бұрын

    Can I set this system up to handle 10 different locks hooked in to the raspberry pi and a selection screen on the touch screen so the user can select which lock they want to affect before they enter their credentials? If that much works the only other thing I'd need it to do is once the first user approaches and open and closes a door the second and all users coming after can't open that particular door again until the first user has come back and open and closed it. It's essentially a tool storage cabinet that everyone needs to gain access to any of the items in it at a moments notice but we need know who took which tool and to have a record that they did indeed return it or to alert us that it's been x number of days and the tool hasn't been returned.

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    Yes, you can do all that :) It's unfortunately beyond the scope of a comment reply here, and you'd have to make some changes and code some software updates yourself - but that's all possible! :)

  • @byrnewebb4412
    @byrnewebb44125 жыл бұрын

    Hey Paul This is a wonderful project that uses so many of the functions of Python and the Raspberry Pi. Your tutorial was so well documented and delivered. I do have a question though.... I want to remove the SMS authentication and add a step that verifies a number from a separate table in the MySQL database. I can build the table with no problem but I need to figure out where to put the additional code and what it might look like. I also want to make sure and comment out only the SMS configuration if that is possible. Any help would be appreciated!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thanks for your comment and kind words! I'm not quite sure what you mean by "verifies a number from a separate table in the database".... do you mean like a second PIN?

  • @byrnewebb4412

    @byrnewebb4412

    5 жыл бұрын

    That would be correct. I am wanting to validate that the person using the card has access to a valid work order. The cool thing about your system is that it would log the work order.

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    aaaah I see, so the PIN would be personal to them but the work order ID might be known by several, and also be time-limited so only be valid between pre-defined start and end times? Cool application! Yes that's perfectly possible and easily do-able - let me see it when you've done it!

  • @byrnewebb4412

    @byrnewebb4412

    4 жыл бұрын

    OK Paul, I have this program just about completed, however, a glitch I am having is if you scan the card then scan it again the verification screen pops up at the bottom of the initial verification screen. How can I turn off the RFID reader until Access Denied or Access Granted? Thanks a lot for your help.

  • @terryterry1655
    @terryterry1655Ай бұрын

    how to incorporate QR code scanning to pay via e wallet/credit card to unlock a compartment/locker ? after a delay to auto shut and lock back in case user let door ajar after taking the stuff in locker.thx

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    Ай бұрын

    That sounds like a whole new project in itself - let me know if you build it, I'd love to see it!

  • @Nunnehhh
    @Nunnehhh5 жыл бұрын

    can you use Bio reader instead of RFID? If so what would be required to interface it?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Do you mean something biometric such as fingerprint or retina scanner? The answer is absolutely yes! How you'd interface with it would depend on the device and also how it connects to the Pi (eg. USB, GPIO or even via LAN?!) Best bet is to play around with the device and write a separate sample script to prove concept then swap that into my code. Good luck!

  • @eugenemorley809
    @eugenemorley8095 жыл бұрын

    Happy Holidays...I think I have found the route to my problem I am receiving this error message when trying to the script ImportError: No module named 'MySQLdb'. Can you instruct me on how to rectify it.

  • @pawar377
    @pawar3774 жыл бұрын

    Can i connect 5 inch touch hdmi display and display program is same as 4 inch

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    It will depend on the specific display as to whether you'll have to alter the program. If the resolution is the same, there shouldn't be an issue (but you may need different drivers). Higher resolution will probably require work, I don't think it's responsive (but I've not really looked at that code for about 2 years so can't remember lol)

  • @bounzyk7450
    @bounzyk74505 жыл бұрын

    Hey man, i really like your raspberry pi door lock System and im trying to rebuild it for school. Following is my question: How can I import the code and the database step by step? I dont know what to do. Thanks in advance

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Hi there! If you're familiar with installing a LAMP stack, that will give you a web server (Apache), database (MySQL) and the PHP language to tie the two together - this will enable you have the web interface to access the database, which is callled phpMyAdmin. Install the LAMP stack, then install phpMyAdmin - there are tonnes of guides on how to do this, so I won't go into full details here in the comments. Then, download the door_lock.sql file from my GitHub repo and use the Import feature of phpMyAdmin to import that. For the script, you can use the "git clone" command to pull down the script from the github repo (github.com/paulfp/Three-Factor-Security-Door) You'll need to insert your database username/password into the lock.py script before running. I've also written up a more in-depth text version of the video tutorial here: www.switchedonnetwork.com/2017/11/10/build-the-ultimate-door-security-system-with-three-factor-authentication/ Good luck and enjoy!

  • @ZonMakers
    @ZonMakers5 жыл бұрын

    Please send me any full installation and configuration procedure if possible..

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Hi there, there's a text version of the tutorial here if you'd like to have a read of that: www.switchedonnetwork.com/2017/11/10/build-the-ultimate-door-security-system-with-three-factor-authentication/amp/ Thanks!

  • @cupidlsu
    @cupidlsu5 жыл бұрын

    I wonder if some of this could be streamlined. If instead of an RFID, what about a bluetooth reader to detect a signal from the phone, which then detects the user from the phone, which then sends a 1 time code from the server to the phone, which then has the phone send the code to the reader, which then unlocks the door. You won't even need holes, screens, etc in your wall if your bluetooth can transmit through the wall. No?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    I like it!

  • @JackPillawa
    @JackPillawa5 жыл бұрын

    thanks man, cool video. won't be that guy, but is the power supply not a overkill?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thanks, glad you liked it! You're not the first to ask about the power supply - I looked online and couldn't find a power supply that had a single plug to the mains and would output both 5V and 12V, that didn't cost an arm and a leg. The computer PSU was dead cheap and easy to modify, and fulfilled my single-power-cord-for-everything desire so I don't think it was overkill 😂 a more elegant solution would of course be better though haha

  • @JackPillawa

    @JackPillawa

    5 жыл бұрын

    sure, i can feel you. sometimes when i build something it's a "now or never mentality"

  • @furiouszed
    @furiouszed3 жыл бұрын

    A very cool video Paul. I'm completely new to Pi and am looking for things to mess around with - this security system looks like it would be fun to try. I think I understood 99%+ of your instructions but I must have missed the bit where you showed us where you were connecting the PSU to the mains(!) Have you stripped the plug and done that inside the wall as well? Or have you poked a hole through the wall to reach a socket? (I doubt it's the latter.) One other question (just to prove what a novice I am lol): could you use your phone as your input screen or would that completely negate the need for the Pi? Cheers.

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    Thanks, I'm glad you liked the video and that it's still helping people out after 3+yrs! On my little protype mockup for the video I didn't do anything fancy with the PSU's power lead, as it wasn't inside a real stud wall or anything, so I just plugged it into an extension lead. I could have mounted a socket like this (ebay.to/371StdR) inside the wall on the internal side I guess, or hardwired into the mains, but as it wasn't a permanent setup I didn't need to do anything like that. If you're doing anything like that or installing inside a real stud wall, make sure you research and comply with all local building codes and stay safe! Re: your phone, you'd still need the Pi as that controls the relay switch via the GPIO ports for the electronic door strike, but you'd need a way to connect your phone screen's inputs into the Pi, and it also looks up credentials in the database. You could expand the system so that the RFID reader accepts input from a "virtual fob" via your phone's NFC chip, that would be cool!

  • @furiouszed

    @furiouszed

    3 жыл бұрын

    @@SwitchedOnNetwork Wow!, that was a quick reply to a 3 year old thread! Thanks. Yes indeed, if I go ahead with this, I'd be fitting inside a real wall so, re the eBay link, I'm assuming you would fit that with the wiring on the INside of the wall (as it would be on the inside of a PC chassis) and on the OUTside of the wall, you'd need to have a kettle plug permanently plugged into the mains? Thanks again. Consider me subscribed!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    Thanks for the sub! Yeah you'd fit something like that with the wiring inside and the socket on the outside. You might be able to find something that's a bit more self-contained and that doesn't need soldering or leave exposed wires even on the inside of a wall cavity which would be even better/safer!

  • @bahamut105
    @bahamut1053 жыл бұрын

    Hi, would like to check if I would like to incorporate this project with a facial recognition door lock, will it work?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    Yes, you can swap out any of the authentication inputs for anything you like 👍😀

  • @upendrachaudhari8766
    @upendrachaudhari87666 жыл бұрын

    Hey...Its Great Video...I just want to ask,How can i write the rfid tags with rfid_code ?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    6 жыл бұрын

    Thanks! This USB reader can only read the RFID tags, it can't programme them too. For that, take a look at the RC522 RFID module. Thanks for watching!

  • @upendrachaudhari8766

    @upendrachaudhari8766

    5 жыл бұрын

    @@SwitchedOnNetwork Thanks a lot....

  • @mvl8209
    @mvl82092 жыл бұрын

    I know this is already a few years old, but would this also work with a maglock instead of a door strike?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    2 жыл бұрын

    Yes, it's open source so you can modify or change the code and do what you like with it 👍

  • @rajatkumar8529
    @rajatkumar85294 жыл бұрын

    Hello Sir, your tutorial is too awesome for a beginner but sir, i want to know that can we implement it using java instead of Python. If yes please tell me how to do this because i am new in this field of IoT. Thank you for this tutorial :)

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    Hi, yes I'm sure you probably could implement an equivalent system in Java. Is there a particular reason you want to use that over Python though? In terms of "how to do that", if you're new to Java then I'd suggest the best way to learn would be to buy a book or do a Beginners' online course.

  • @samuelajayi1565
    @samuelajayi15654 жыл бұрын

    #Switched on Network # I love your great work. Can the RFID authentication be replaced with a finger print, if yes how do I go about it. Really need it for a project I'm working on in school. Thanks, look forward to your reply.

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    Yes it can be - just replace those bits of code and modify as required. Enjoy!

  • @samuelajayi1565

    @samuelajayi1565

    4 жыл бұрын

    @@SwitchedOnNetwork You're Great

  • @muchibam5202
    @muchibam52025 жыл бұрын

    Hye paul. I just want to ask about the working of the script lock.py work with the electric strike lock ? I really need your help

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Hi - that's not something I can help you with in the comments here, but I'm always open to contract work so if you ping me a message on social media (I'm @paulfp on Twitter and Facebook) or via my website (www.paulfp.uk) then we can discuss :) Thanks.

  • @TheAD1978
    @TheAD19785 жыл бұрын

    Rest is very well explained, but one thing which i don't understand is how you getting SMS through your raspberry pi. I don't see any GSM board is connected to your phone. or you have subscribed any SMS service ?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    It uses a web service, Twilio, to send the SMS so just through the Internet. No extra hardware required 👍

  • @aketbi272
    @aketbi2724 жыл бұрын

    Dear Paul Your Work is Highly Appreciated. I am in the last phase where I am trying only to run my python script in shell I am trying to Run it using Thonny python installed in Pi. I installed MariaDB I get an error in line 3. import MySQLdb Error: ModuleNotFoundError: No module named 'MySQLdb'

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    Hi, thanks - glad you liked it! What happens when you try to install the MySQLdb module?

  • @aketbi272

    @aketbi272

    4 жыл бұрын

    The phython script lock.py I tried to Run it In line 3 of the script import MySQLdb I get an error. It is not found. I tried to find this specific file inside usr/var/ It it not there Just to clarify, I installed MariaDB,php7, myphpadmin, because Mysql is not downloadable anymore. However everything worked and I logged in myphpadmin, imported the database succeeded If you could please, give me a lead how to overcome the error Running lock.py

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    You need to install the MySQLdb module for python, or MariaDB equivalent

  • @henjiitagawa
    @henjiitagawa6 жыл бұрын

    can i ask , if the extension GPIO is 2 instead of 3 use in this video, can it work ?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    6 жыл бұрын

    Yes, that will work fine too 👍

  • @teobong6939
    @teobong69395 жыл бұрын

    How to disable the sms function? I don't want to get a sms every time i open a door. And can I use the databased stored on a LAN server to have more door locks running on the same db?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Yes, you can build a bigger system by having a centralised database as you describe. And to bypass the SMS element, simply remove that bit of code and go straight to activating the relay! 👍

  • @gonsodany

    @gonsodany

    3 жыл бұрын

    @@SwitchedOnNetwork what part of the code is the SMS bit?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    Line 314

  • @pqrst931
    @pqrst9315 ай бұрын

    Is it possible to modify this system to open lock with either of three methods (rfid card, password,otp) if yes please give me some references. I don't have much experience in this field 😊 thanks alot

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 ай бұрын

    Yes it is, and as I open sourced the code you're free to make changes as use as you see fit (within the terms of the license agreement on GitHub). I can't provide bespoke help here in the comments but if you need one-on-one guidance then get in touch and we can book in some consultancy video call sessions if you like.

  • @itspappy
    @itspappy4 жыл бұрын

    I am trying to make a sudo-escape room for my office. The last obstacle will be this device, with a key fob and the pin. I also plan on hooking up a speaker to the stereo port on the pi, and would like to either play a sound file or do text to audio (ex: wrong, try again or success!). So I dont need multiple pins/fobs or the SMS portion. So I think I can just keep everything in the python script, and not need apache/php/mysql. It would even be nice, for the person starting the clock, to be able to do it on this device, and if they run out of time (30 mins), a time's up/siren goes off. Thoughts?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    Awesome idea! Yes if you want to simplify it you could scrap using the database and either hardcode everything into the Python script or use flat .txt files on the Pi (or something like SQLite). I look forward to seeing it when you're done :)

  • @itspappy

    @itspappy

    4 жыл бұрын

    I can’t get the rfid reader to work on the pi. Works on windows. Tried just about everything. Lsusb shows it on bus 001 device 007: id 6688:6850 Looks like it maps to /dev/usb/hiddev0

  • @itspappy

    @itspappy

    4 жыл бұрын

    Figured out my problem. I bought the RFID reader/writer. Once I bought the RFID reader, everything worked. Will share a video when everything is finalized.

  • @eugenemorley809
    @eugenemorley8095 жыл бұрын

    Do you have to upload the usb readers drivers to the pi?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Not with a USB one like this - it's plug & play like a keyboard 👍

  • @ewokkillah
    @ewokkillah4 жыл бұрын

    Great project and video! I would like to adapt it for a package delivery door (we’ve had porch pirates) is there a way to eliminate the rfid and the random code generation features and just have a the single pass code that I could give to the delivery driver and also receive the sms notifications? Thanks for your help.

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    Hi, glad you liked it. Yes, that's fine to do that - if you just modify the Python code to suit your needs, that should work great with the hardware! Let me know how you get on :)

  • @ewokkillah

    @ewokkillah

    4 жыл бұрын

    Switched On Network I have no experience with python so I will need to do some research. Any advice is appreciated. Thanks

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    @@ewokkillah You'll need to strip out the functions that you don't need and call the ones you do... plus make any changes. Before trying that, find a beginners' Python course and get familiar with the basics. Happy to help :)

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    In fact... you've inspired me to make a "Safe Place" for package delivery, so maybe a video will appear on the channel later this year :)

  • @callahanfamily7624
    @callahanfamily76243 жыл бұрын

    Do you have a new build sheet for this project. Some of the links are not working on amazon and would really like to use HDMI touchscreen. Thanks in advance.

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    I don't I'm afraid, it's quite an old project now. Hopefully it will still inspire you and help with general concepts though, and feel free to share links for updated stuff you find 👍

  • @NeoniTj
    @NeoniTj5 жыл бұрын

    Since mysql was replaced by mariadb in debian 9 How would I go about updating the script to function using mariadb?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    I'm sure there will be much better migration guides online than what I could offer in the comments - if you have a look I'm sure you'll find what you need. It shouldn't be too majorly different. Good luck!

  • @techly9
    @techly96 жыл бұрын

    so great tutorial ,I have already imported the database and added the user. After the read my card is not reflected on the screen, what problem is this?I am not familiar with phpmyadmin, is it wrong that I add users, how to add users?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    6 жыл бұрын

    Hi, firstly make sure you've installed all the dependencies required by the Python script. If you still have issues then I'd take little pieces of the script out one-by-one and gradually build it up so you can check each bit is working as you go along. Good luck!

  • @TheChuckNorris101
    @TheChuckNorris1015 жыл бұрын

    Awesome tutorial! I'm implementing this at work for a Summer project, and I found an issue/bug while scanning my RFID tag. If you scan your tag twice in a row (once before the keypad, and once while the keypad is preset) the welcome label generates (as many times as you scan your rfid tag) below the keypad and freezes the numbers in place. I tried changing the InputDevice, so nothing is read while someone is entering their pin, but after access is granted, the InputDevice doesn't revert back to the RFID reader for the next user to scan. I was wondering if you have any suggestions towards fixing this bug? Another note, I was wondering how the RFID tag is read into the program? I noticed you compare the input with a Keys variable. Just wondering how you came up with that method? Thank you in advance!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thanks for your comment, I'm glad you liked it! :) That's a strange issue... I'm 99% sure it didn't do that for me and I tested it pretty extensively at the time, although it was over a year ago now and it's packed down at the moment so I'd have to set it up again to test really. You may have found a bug I missed, in which case - thanks! The approach I'd take for ensuring it doesn't do that though is to make sure that as soon as it's detected the first RFID touch and decided it's recognised and wants to display the keypad, make sure that it completely stops listening for new fobs. Or, you could set a variable to keep track of what "state" it's in, and only act accordingly if input expected for that state is received. Just a couple of ideas off the top of my head! The keys variable....... I remember spending a LOT of time messing around, researching, troubleshooting etc. before I came across that method. I can't quite remember where I found it, but if you google that variable you'll probably find it discussed elsewhere on the Internet on pages nothing to do with me. I should have given credit really - my bad! The whole building the string up 1 char at a time and then checking for the newline character was my own work, once I'd cracked the "how to even respond to and retrieve data whilst also showing a GUI" issue. Essentially the issue was getting it to listen for the input at the same time as also displaying the Tkinter GUI. Which meant I had to take a totally different approach versus if it was just a command line programme. It was maybe my own fault for going down the USB faux-keyboard style reader rather than a more "proper" one, although once I got it working it was OK and works fine and I have that now for the future.... Hope that helps enlighten!

  • @TheChuckNorris101

    @TheChuckNorris101

    5 жыл бұрын

    Thank you for the reply! I took your suggestions into account while troubleshooting the bug. Threading is a fairly new concept for me, and I didn't take that into account while troubleshooting a couple days ago. If you're curious what I did to fix the issue, I created a tracking variable that's checked after any RFID scan. If there's an ongoing event (someone is entering their pin), the tracking variable changes to prevent new events from registering with the database. The tracking variable reverts itself once the user enters a correct pin, and/or after the threading timers are finished. Thanks again for the awesome tutorial and quick response! I definitely learned a ton while implementing this project at my internship :D

  • @Aminexplore
    @Aminexplore4 жыл бұрын

    Hi sir i have go trough your code all , can i know what os did you use it . for this .

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    Raspbian

  • @VisaoNocturna
    @VisaoNocturna6 жыл бұрын

    There is a way to make just two factor auth?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    6 жыл бұрын

    Yes of course, just modify the Python script as desired :)

  • @Zokusha
    @Zokusha5 жыл бұрын

    Question. Once you got in to that door, how will you get out? Thank you.

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Latch on inside 👍

  • @Zokusha

    @Zokusha

    5 жыл бұрын

    @@SwitchedOnNetwork thank you

  • @ahmedbachoo9112
    @ahmedbachoo91125 жыл бұрын

    Hey thanks for the video. Does that mean if there is no internet connection the system wouldn't work and people will be locked?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Yes, I didn't include a manual override on my demo in the video as it would depend on the location, circumstances and preference of each specific and individual installation as to how the best way to provide that would be. The simplest way would be just to fit the front keyhole part of the Yale lock, which I left off. Then you've got an immediate offline override 😀

  • @ahmedbachoo9112

    @ahmedbachoo9112

    5 жыл бұрын

    @@SwitchedOnNetwork what do you mean by fit the front part of the yale lock?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    The bit where you'd insert the key, on the front (outside) side. I only fitted the back latch.

  • @ahmedbachoo9112

    @ahmedbachoo9112

    5 жыл бұрын

    @@SwitchedOnNetwork oh right ok that's sounds more like another option to use the key if internet fails

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    That's exactly what it is :)

  • @joeny15
    @joeny152 жыл бұрын

    Is there a way to remove the sms and the facial recognition and just put the rfid alone?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    2 жыл бұрын

    Yes, just edit the code as required 👍🙂

  • @FluffyCrypto
    @FluffyCrypto5 жыл бұрын

    Awesome Video. Can i make this only a 2 factor authentication? Removing the rfid. How do i change it on the python script?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thanks! Yes that's easily done, just swap the functions around so that when it's initialised it's calling the function to wait for PIN entry stray away. You'll have to remove the name and picture elements too.

  • @FluffyCrypto

    @FluffyCrypto

    5 жыл бұрын

    Switched On Network Thank you for your fast reply. I want to keep the name and give people acces with the code, then once they put the code i gave them they get a 1 time access code to their phone.

  • @FluffyCrypto

    @FluffyCrypto

    5 жыл бұрын

    Switched On Network How long do the codes last? Also is there a way to Support your Channel without pledging. Like Paypal, Venmo Etc. Doing it 1 time and easy for people? Thank you. Keep Doing good work.

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Hi, if you mean the smsCode then it's generated and held in memory until it's entered into the screen. You can build in a timeout for the code itself if you like, but the screen will automatically stop waiting and return to idle state after 60s, rendering the code invalid. You can change that if you like (line 260 of script). That's very kind of you to want to support the channel, thank you. The best way to make a one-off pledge would be to use Patreon and then cancel after a month (www.patreon.com/SwitchedOnNetwork) or the PayPal email address is paypal@innobellamedia.uk - thank you!

  • @luismarquez9150
    @luismarquez91505 жыл бұрын

    Hello buddy! I really loved this amazing project, I have two questions, if im a person from another country, the SMS will be send to me anyway? Im from Mexico. And the other question is, ínstead of using the SMS step, can we use a fingerprint module to use it like the third factor authentication? Thank you for sharing this video!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Hi, glad you liked it! Yes, the answer is yes to both questions. Just adjust the code accordingly. Have fun!

  • @luismarquez9150

    @luismarquez9150

    5 жыл бұрын

    @@SwitchedOnNetwork I'm about to get all the materials to build this project, and I already have a screen for the Raspberry but it's a 3.5" Touchscreen LCD and on the video you are using a 4" touchscreen, it would be a problem using the 3.5" one or not? And also, I would like to know what could be the difference using the RFID reader with usb or using the RFID RC522? which one is more easy to use and why. Thanks alot again!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    If the resolution of your screen is different you'll have to modify the Tkinter sections of the code to draw the UI over a different area. The USB reader is much simpler to implement and use, as the OS just sees it as a keyboard input device so no extra drivers etc needed. Have fun building!

  • @Jeancomputech
    @Jeancomputech3 жыл бұрын

    good afternoon Paul. how do you add users to the system and can it sync with active directory?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    Hey! To add new users simply add them to the database table shown in the video, one new row per user. The ID field for their fob must be unique to that user, and if you have a profile image make sure it's a GIF, in the same dir as the script and then input its filename WITHOUT extension in that column of the table. Regarding active directory, you'd have to write a separate little script to sync data from there into this system, or rewrite this system to query AD instead.

  • @Jeancomputech

    @Jeancomputech

    3 жыл бұрын

    @@SwitchedOnNetwork is there any interface that can integrate in order to prevent access to the database? can i use openhab

  • @remicarr4223
    @remicarr42234 жыл бұрын

    Brilliant tutorial!! Can this be done without the SMS message as i just need the RFID and Keypad? Many thanks!

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    Thank you! I'm glad you enjoyed it 👍 And yes of course, absolutely, it's all open source so you're free to modify it in any way as you see fit for your needs, enjoy!

  • @giulypat7488
    @giulypat74883 жыл бұрын

    Hi, if i pay could you Say to me now to do with Raspberry pi4 b but without rfid, only via smartphone to open door of Apartment and Door of the Building connect to intercom? Thank you, please

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    Hi there, yes I'm available for paid consultancy work - feel free to DM me on Twitter, Instagram or Facebook - I'm @paulfp in all those places or I'm at uk.linkedin.com/in/paulfp/ on LinkedIn. Thanks!

  • @chibunnna
    @chibunnna5 жыл бұрын

    Hello Paul, awesome project. I have managed to get everything working except getting the relay switch to trigger and click once I enter the sms code. Any help would be appreciated. I have the exact setup as you did. Thanks

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thanks! Any error output to console if you run from there?

  • @chibunnna

    @chibunnna

    5 жыл бұрын

    ​@@SwitchedOnNetwork Thanks for replying. Unfortunately no error

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Try writing a separate, standalone script to trigger the relay and check that all works?

  • @chibunnna

    @chibunnna

    5 жыл бұрын

    @@SwitchedOnNetwork Yes I tried that with an LED, relay works just fine. The relay has triggered the lock but this happens even before I place my key fob on the rfid reader. Thanks

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Ah, something definitely up then! Does anything happen at the point where it's meant to unlock? ie. does it lock? Wondering if your Normally Open/Closed might be reversed? If not... you'll have to go through bit by bit debugging until you figure out what's up I'm afraid! Good luck 🤞

  • @nnvskh8269
    @nnvskh82694 жыл бұрын

    can we do any of this with our own rfid card? like library card or student id cards ? Please help

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    Yes! 👍

  • @nnvskh8269

    @nnvskh8269

    4 жыл бұрын

    Switched On Network thanx 👍🏻👍🏻👍🏻

  • @rxgtv
    @rxgtv4 жыл бұрын

    How do I take out the RFID reader so that I just enter the code? And can I make the code 4 digits long?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    4 жыл бұрын

    Yes you can do that, both those things, just modify the python code as you require 👍

  • @rxgtv

    @rxgtv

    4 жыл бұрын

    Thank you. I have the original Pi that has less GPIO pins and a composite port. Will this work with that? Also can I use a Monitor instead of the GPIO pins? I plan on using a external keypad.

  • @failvibex3062
    @failvibex30623 жыл бұрын

    I love it but can you also open it from the inside

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    Yes, catch on the inside (see end of video) 👍

  • @failvibex3062

    @failvibex3062

    3 жыл бұрын

    Switched On Network thank you so much i love the content make more like this

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    Thank you!

  • @muchibam5202
    @muchibam52025 жыл бұрын

    sir, can i know how to install json module? and how json module work in this lock.py script? i am new of this field. Thank you

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Hi, if you do a Google search for "python install json module" you'll find lots of resources, information and tutorials - much more than I could give you here! Off the top of my head I think it's something like "sudo pip install json" - hope that helps 👍

  • @panos2011
    @panos20115 жыл бұрын

    Is there any way to turn off the display and then turn on when you touch it?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    You can probably achieve that in the Pi's power saving / screen display settings...?

  • @user-px6gh2fz5l
    @user-px6gh2fz5l3 жыл бұрын

    Very nice video. Where can I get link for the python code?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    3 жыл бұрын

    Thank you! All the code is on GitHub, here: github.com/paulfp/Three-Factor-Security-Door

  • @jinyi7502
    @jinyi75025 жыл бұрын

    Hi, I am new to Raspberry pi. may I know how to do two-factor authentication with RFID and fingerprint? and any source code available? Thanks

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Hi there! I'm planning videos on both those in the near future, so if you make sure you're subscribed then you won't miss them when they go live. In the meantime, I also write a magazine article for HackSpace on using just an RFID; you can download the article for free at www.paulfp.uk/blog/2018/02/new-magazine-article-build-an-nfc-powered-door-lock/

  • @AWLN3
    @AWLN38 ай бұрын

    Would love to build something exactly like this, but without the 3 factor AUTH. Ill dive into this project soon, and will comment for help if there is needed. Would someone be willing to provide support in case of questions?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    8 ай бұрын

    Feel free to ask away and (within reason) I'll help if I can! 🙂

  • @tranrin7228
    @tranrin72285 жыл бұрын

    Awesome Tutorial!!! Can I use RFID with touchscreen passcode without SMS authentication??? Which part that I need to configure! Tks a lot

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    Thanks, glad you liked it! Yes you can easily remove the third step, just modify the python script so that it goes straight to opening the lock after step 2. Enjoy!

  • @tranrin7228

    @tranrin7228

    5 жыл бұрын

    @@SwitchedOnNetwork oh yes ! So I think I should review it again ! Another question that I don't modify python script , i just blank a box of phone number in phpadmin part ? Is it possible?

  • @SwitchedOnNetwork

    @SwitchedOnNetwork

    5 жыл бұрын

    No that won't work, as the script will be trying to connect to twilio to send a text to whatever number is in there. To stop it doing that, you'll have to get your hands dirty in the code!

Келесі