Making a Digital Door Lock Smart with a Raspberry Pi

How can you make a door lock smart? While a standard lock can be made smart by adding a servo (several systems can be purchased that help you do this) digital keypad locks can also be enhanced.

Taking a break from exploring tunnels and riding a freeboard, YouTuber Noisycarlos (Carlos Aldana) has decided to approach the problem of making a standard keypad digital lock ‘smart’, so that it can be connected to his three-year-old smart home system.

After purchasing a digital lock a few years ago (which works with a keypad, key, or remote), Noisycarlos wanted to get the device online. So begins a trial requiring ingenuity and patience, as the project throws up challenge after challenge along the way. For instance, the lock doesn’t take rechargeable batteries, so some early adaptation of the power system was required to fix this.

While one plan was to capture and replicate the remote signal to lock and unlock the door, this seemed both tricky and pointless, as the remote already exists! Opting to buy a replacement remote and connect the original to the automation system (initially an Arduino-compatible ESP-12E Board), Noisycarlos used relays to control the cannibalized remote.

A lack of drivers for the ESP-12E, however, resulted in Noisycarlos switching to a Raspberry Pi Zero W, and with the use of some Python code, the project finally came to life, using a mobile app to finally control the lock over TCP, with some home-protecting encryption added into the mix to prevent anyone hacking the house.

With a successful build at the end (which he plans to revise with an Arduino board replacing the Pi), this video is a great illustration of the trials and tribulations a DIYer can face, even with plenty of planning. It’s also a good lesson on how to find solutions and work around problems.

Want to adapt your own digital lock and make it smart? Check out Noisycarlos’ code on GitHub for more details.

Leave your feedback...