Unlock On LAN Apartment Security

Unlock on LAN

Here’s a cool little variation of that handy little function called Wake on LAN — [Jonathan] found himself locked out of his apartment one too many times, so he decided to add his own fail safe backup in order to get inside without a key — using a Raspberry Pi of course.

His apartment is one of those older style ones where the door is always locked and you use a buzzer to let someone in (or a key to get in yourself). This made it super easy to add some internet connectivity to the system. [Jonathan] tapped into the buzzer with a relay since the system uses medium voltage AC to operate. A Raspberry Pi triggers a transistor using its GPIO to click the relay on and off, effectively controlling the lock.

Using a WiFi dongle he’s connected the Pi to his home network and written a simple perl script to trigger the relay — all he has to do is visit a URL on his phone or computer and the door will unlock instantly!

Once the system worked [Jonathan] soldered all the components onto a breadboard and hooked it up. He still needs an enclosure for it, but it’s been working well since he installed it.

Another option would be to use an RFID tag system through the door, which could be pretty cool as well.

29 thoughts on “Unlock On LAN Apartment Security

  1. I love the idea, but usually all the doors in these type of building are spring loaded to close. So while this gets him inside the foyer door , it stands to reason he is then left standing at his locked front door. I wonder how he gets around that.

    1. Rereading the post a few times I came up with a few assumptions:

      1. It says apartment and not apartment building so we could say it’s a buzzer to his place and not the entire building (which is usually not the case).

      2. Am still trying to figure out if the landlord or building owner allowed him to rig up such a thing to their system…assuming of course that it’s a building and not his own private place.

      3. He leaves his door open…(going along with your comment)

      1. The buzzer button is usually in your apartment, so easy to tap into without permission. Most places usually have an intercom setup, so you could expand this to be a voice access system.

    2. You are correct, looking at the pic, you can see the buzzer is right NEXT to the door. Now why would you put a buzzer right next to the door you are buzzing people in doesn’t make sense.

      I would assume the author doesn’t have a key to get into the building, and only has a copy to get into the actual apartment.

      1. I would guess that it is the same key for the apartment as the building, not the same but he uses the same. quite common. But if im leaving my apartment for 5 – 15 min going with the garbage to the garbage rom and so on i dont lock my apartment and then it is easy to forget the key. And so he will be locked out from the building

    3. Hi, this is the author.
      You are correct that this only opens the outer doors to the apartment. I need a separate key to get into my personal unit.
      I have a separate mechanism to get past the inner door if I forget my keys. I’ll be keeping that off the internet to preserve at least a little security through obscurity.

  2. Personally I use a touch-button battery-powered electronic lock available at Home Depot for approx $30 (USD). However, for my lock and the front foyer door lock, it would be easier to use super-low tech method for both.

    I have a glass door on my front door. I could glue a magnetic reed switch from a N.O. (normally open) burglar alarm to the glass. Run the wires to the interior bypass button on the unit. Then I would super-glue a Neodium magnet from Walmart to a jewelry ring or an old expired credit card. I could hide the credit card under the carpet and just put the magnet up to the glass and open the door. The same goes for the foyer door which probably does have glass but the switch could be mounted outside up high or in a box. Of course the landlord would never allow this, This OP has the wires in his apartment where the LL can’t see it easily. Also he’d have to arrange for power to the switch if done at the foyer door.

    I do my garage door like this. I hid the reed switch by Dato-cutting a rectangular hole in the valance board, put the switch in, snake the wires through a hole drilled in the valance to the garage bypass switch, and silicone fill in the hole. Paint it over so no one can see where it is. Then I use the credit card method. I hide the credit card in a fake rock in the adjacent bushes. Just make sure no one is watching when you do this for obvious reasons.

    1. I’m working on a super-low tech method to control things (turn things on and off) in your house from over the Internet. So far no Rasberrys or Arduinos figure in. Otherwise it wouldn’t be low-tech would it? When I’m done designing it on paper and make a working prototype I may post it here on HaD as a web-controlled gadget.

    1. I’m an electrician/inventor by trade and want to pipe in to say there are actually pretty well accepted standard terms on what is high and so on. On AC, anything less than 50V is Extra Low Voltage. Between that and 1000V is Low Voltage. Next up is Medium Voltage, which is already unsafe to be close by.

      The idea being that any Extra Low Voltage systems do not require certification or even training to operate, modify, make or install. There are subvarietes of *ELV depending on the safety requirements but mostly they’re pretty safe to even do stupid stuff like having skin contact to live circuits.

      Now, just having low voltage is not necessarily supersafe and the cables need to be thick and so on. Your average MIG/stick welder is not using very much voltage, here’s one using 36V from car batteries:

      https://www.youtube.com/watch?v=kWT-HAp4nXU

  3. I’d hope that the hacker has (or will) put some sort of password or other authentication on the website he uses to open the door. If not, then anyone who can figure out the URL has unfettered access to his apartment. Security by obscurity is not a good idea.

        1. Yea, because in the article it says “added internet access”…either way you know the address just add another pi with a huge power bank to brute force the pass, just like iCloud ;).

    1. Hi, this is the author.
      I did think a lot about this when I was setting things up. The web interface is only accessible on my password protected LAN, so I’m not too concerned about further security. Plus if someone wanted to break into my apartment and had sufficient resources to hack the doors open, I think they could find an easier way to break in.

  4. The raspberry pi is overkill for this, but I suppose you use what you have.
    You could do something similar with an openwrt router using a GPIO. It will even host the CGIscripts necessary for it.

        1. Its only on his intranet so not remote unless he changes that. (although security wise its better not open)
          @greenbacks The nice thing about it though is that other roommates and friends and such can use it with what they already have

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.