Automating a Sliding Glass Door’s Lock with HomeKit
Redditor Formal-Shallot-595 built an electronic lock for their sliding glass door that connects to Apple HomeKit for automation.
Sliding glass doors grace homes around the world and though they provide a nice view with plenty of light, most of them have a pretty glaring flaw: an inability to flip the lock from the outside. That’s a real problem if you want to come and go through that door. There are locks on the market, but sliding glass doors lack the standardization of normal doors and so aftermarket locks aren’t always compatible. Frustrated by all of that, Redditor Formal-Shallot-595 built an electronic lock for their sliding glass door that connects to Apple HomeKit for automation.
Formal-Shallot-595 and their wife rent the home they live in, so they aren’t able to do anything that can’t be undone when they move out. That meant that Formal-Shallot-595 had to come up with a solution tailored to the door, but that is completely reversible. They came up with an electronic, Wi-Fi-connected, servo-actuated smart lock. Thanks to integration with Apple HomeKit, it is easy to automate and control remotely.
The basic idea is pretty simple: the device attaches to the sliding glass door’s handle and uses a servo motor to flip the lock. But some of the specifics of the implementation are quite interesting.
The brain of the device is a generic ESP32-based development board, which Formal-Shallot-595 chose for its Wi-Fi connectivity. It controls the FS90R continuous-rotation servo motor that actuates the door’s built-in locking mechanism. That is a lever-style switch, which is why it is important that the servo be a continuous-rotation model. To get the mostly linear motion and enough torque, the servo moves that switch through a rack-and-pinion gear mechanism and that requires several rotations.
Formal-Shallot-595 used HomeSpan to connect the device to Apple HomeKit. HomeSpan is an open-source library specifically for building HomeKit-compatible ESP32-based devices. Like any other HomeKit device, Formal-Shallot-595 can actuate the lock remotely with their iPhone or have it follow a schedule.
However, the cleverest aspect of this project, in my humble opinion, is the power connection. Because the lock slides with the rest of the door, an attached power cord would drag around and get in the way. And, of course, a battery would require occasional replacement or recharging. So Formal-Shallot-595 attached a spring-loaded pogo pin connector to the frame. When the door closes, that connector provides power the device. That does mean that it will turn off every time the door opens, but why would that be a problem? Nobody needs to engage or disengage the lock when the door is open, anyway.
Now Formal-Shallot-595 and their wife can come and go through the sliding glass door as they please.
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism