An Affordable Way to Enter Your Apartment Building Without a Key

This ESP32-based system unlocks an apartment building's lobby doors via the intercom system.

It is common for apartment buildings in urban areas to have locked doors to keep local riff-raff from entering the lobby. Those doors usually have RFID locks, so residents have to carry both an RFID tag for the lobby doors and a conventional key for their actual apartment. The problem is that those RFID tags are only supposed to be made by management and they charge far too much, which makes it expensive to give spare sets of keys to your friends. David Kempfner found a more affordable solution in the form of a password-based system that connects to the intercom.

If your apartment building has RFID locks on the lobby doors, then those are most likely also controlled by intercom units in the apartments. Those intercoms let residents buzz-in guests or delivery personnel—but only if the resident is actually home. Kempfner's DIY system connects his intercom to the internet, so the lobby doors are unlockable from anywhere. For security, Kempfner implemented a password. He can give that password to friends and has the ability to change it whenever he likes, in case an ex or untrustworthy friend needs to have their access revoked.

Intercom units of this type generally have a button for unlocking the lobby doors. Kempfner's system "presses" that button using a relay controlled by an ESP32 development board. The ESP32 hosts a lightweight webserver and accessing that, by entering the correct IP address and password into a browser, activates the relay to unlock the door. If a user makes three incorrect password attempts, the ESP32 will lock them out for three minutes. That makes it difficult for hackers to brute-force the password. A notification buzzer will also sound in the apartment, so the resident knows that either their guest is fat-fingering the password or a hacker is attempting to break in.

Few people have static IP addresses at home, so the ESP32 will automatically check to see if its dynamic IP address has changed at 6 minute intervals. If it has, the ESP32 will email the new IP address to Kempfner. When unlocking the door, the IP address and password are sent as plaintext. That is a security flaw, so Kempfner advises against using a public WiFi network if you're going to build a similar system.

This system offers a number of benefits. Most importantly, it can save a lot of money when compared to purchasing a few RFID tags. It is also convenient, since Kempfner no longer needs to carry an RFID tag around and can unlock the lobby doors from anywhere. Kempfner provides thorough build instructions that you can follow to create your own entry system.

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles