Smart Dooris Lock

Two years ago, having finished a major overhaul in my apartment, I decided to install a smart lock on the new front door. It quickly became clear that none of the models available at that time fit my quite ordinary metal door. Having discussed this “discovery” with one of my comrades, we decided to correct this fatal flaw and - as it should be in such cases - we made another smart lock.

Before turning to the story of our creation, it would not be superfluous to clarify what is so unusual in Russian doors, and at the same time draw your attention to other points that you need to know when choosing a smart lock. And we begin with an answer to the main question.

What is a smart lock for?

It seems the answer to this question is obvious: to get rid of the keys. At least, that was how it seemed to us when we were just starting to develop our device. But the very first tests showed that if you simply replace the keys with a smartphone, then there will be little benefit from this: being close to the door, it is much easier to unlock or lock it with a key than tapping a button in a mobile application that still needs to be launched after unlocking the smartphone. Of course, the possibility of remote control of the door itself can be very useful (for example, to unlock the door of your beloved mother-in-law, without getting up from the sofa), but you will most likely not use it very often.

To become a truly useful device, a smart lock should rid you of most daily manual manipulations with the door. That is, a really smart “smart lock” should - like a doorman in a decent hotel - lock the door behind you when you leave the house, and unlock it yourself - when you come back.

Smart “key player”

Despite the name, a typical smart lock is not a lock. Very often, this is just a “pad” that is installed from the inside of the door over the turntable or key of a regular door lock. Such a lining does not contain a locking mechanism, and can only rotate a key or turntable in a conventional door lock. Of course, there are models that are complete locks (for example, Samsung SHP-DP728 ), but since the dimensions of the mortise part of the door locks are not standardized, you are unlikely to succeed in replacing your regular door lock with a smart one - the holes just won't match. But a clever “key player” can theoretically be installed on almost any door, although in reality everything is a bit more complicated.

American dead bolt

If you live in Russia, then, most likely, two locks are installed in your entrance door - cylinder and suvaldny - each of which is locked / unlocked when you turn the key two or even three turns. And most smart locks are only compatible with Deadbolt door locks. Deadbolt is a heck, which is unlocked from the outside and locked with a key, and from the inside - with a turntable. Such a heck fully extends / retracts when the turntable is rotated 90–180 °.

Deadbolt-type locks are common in the United States, which appear to be primarily targeted by the creators of smart gadgets to the market. As a result, many “key players” (for example, Sesame , Lockitron and August ) are simply unable to turn the key or turntable more than one turn, or are so deeply integrated with the Deadbolt mechanisms (such as Schlage Sense and Kevo ) that they cannot be called “overlays,” and it’s almost impossible to use with any other type of door lock.

Management through BLE and the Internet

As a rule, smart door locks are controlled via Bluetooth Low Energy (BLE) using a mobile application. Devices with support for WiFi, ZigBee and Z-Wave are also found (for example, RemoteLock and Yale ), but it is BLE that still leads by a large margin. There is a very simple explanation for this: most modern smartphones do not have built-in support for either ZigBee or Z-Wave, and do not use power-consuming WiFi because mostly smart locks are powered by batteries.

Many manufacturers of smart locks allow you to manage your devices not only through BLE, but also through the Internet. Usually, this requires purchasing a special “bridge”, which is simultaneously connected to both a smart lock (via BLE) and your home network (usually via WiFi). An example of such a “bridge” is the Nuki Bridge , which “ webs ” the smart Nuki lock (this, by the way, is one of those few key players who can easily be installed on most of our doors).

Long-lasting batteries

As we have said, all the smart locks we know are powered by batteries. There are two reasons for this. The first is ease of installation: no need to think about how to lay a cable to power a smart lock. The second is the durability of the batteries: as a rule, they need to be changed only once or twice a year, besides, any decent smart lock will warn its owner about the need to replace the batteries in advance. Nevertheless, many still fear that they would not have had to open the door with a grinder. And it must be admitted: fear is not in vain.

Unseen circumstances

Regardless of whether your smart lock is powered by batteries or from a network with a backup power source, you may find yourself in a situation where you can’t open it from the outside of a locked door using a smartphone, for example, because its battery is dead, or because the lock is out of order, or, finally, simply because you lost your smartphone.

To avoid unplanned replacement of the door, it is recommended to install a smart lock only so that it is possible to unlock the door with a key in any emergency situation. The key itself does not have to always be with you, but as is the case with the loss of a key from an ordinary lock, the spare key must be somewhere nearby (from neighbors or from relatives or friends living nearby). For the same reasons, the smart lock, designed for the Deadbolt-type lock, is absolutely not recommended to be installed over the night swivel, which cannot be opened with the key from the outside.

My home is my castle

Smart locks are not installed to increase the door's burglary resistance (for this there is a separate class of devices - electronic latch, which is hidden, for example, Titan ), but to make the house more comfortable. For comfort, one has to sacrifice security: any smart lock controlled “by air” is always another potential attack vector that a burglar can try to use to open the door. Whether he succeeds or not depends on how well the creators of the castle took care of it. Of course, all smart locks use authentication and authorization tools, and encrypt all transmitted traffic, but as practice shows, vulnerabilities in smart devices are still found from time to time.

We should also talk about the security of the BLE itself, which, as we remember, is the most common way to manage smart locks. Unfortunately, all the “usable” security modes that are offered by the BLE standard up to version 4.1 inclusive have vulnerabilities . Therefore, many manufacturers of smart devices implement the necessary protocols and algorithms for protecting wireless connections independently.

Other manufacturers are limited to supporting BLE Secure Connections - Numeric Comparison. This is a new standard security mode in which all data is encrypted using the AES-128 algorithm, and the generation of the encryption key is performed using the ECDH algorithm, with verification via an independent channel (secret chats in the Telegram messenger are protected in the same way). This mode appeared in BLE 4.2, and at the moment there are no vulnerabilities in it.

Smart Dooris Lock

Now that you know almost everything about smart locks, it's time to introduce our creation to you - smart dooris lock . Doris is a typical key lock for a cylinder lock. With the help of a special screw clamp, it is attached directly to the lock cylinder and, if necessary, is completely removed. Dooris can turn the key or turntable as many turns as necessary to unlock and lock your door. The smart lock from two batteries of type CR123A eats. They will be enough for about a year if, on average, you leave the house 3 times a day (and, accordingly, the same number of times you come back). The lock is controlled via BLE 4.2 in Secure Connections - Numeric Comparison mode using a mobile application for iOS or Android.

The Dooris brain serves as the SoC nRF52832, to which several sensors are connected: magnetic sensors can determine the position of the turntables with an accuracy of 90 °, the accelerometer - the fact of opening and closing the door, and current and voltage sensors - to control the consumption of motors and discharge batteries.

Two motors are installed in our lock: one unlocks and locks the door, and the second interlocks and disengages the gears of the gearbox of the first. This is necessary so that at any time you can use a key or a spinner without any discomfort, that is, without the need to overcome the resistance of the gearbox. All gears are made of metal, and the body is made of ABS plastic. To avoid friction of plastic parts against each other, a bearing is provided in the lock.

During the video shooting, we controlled Dooris manually, but as was said at the beginning, it is better to use the “doorman mode”, in which the smart lock locks / unlocks the door itself. Now we will tell how this mode works.

Leaving the house, you unlock the door with the help of a turntable. As soon as you step outside and slam the door, Dooris finds out about it with the accelerometer and locks the door a few seconds after it is shut. The delay is needed in order to give you the opportunity to make sure that the smartphone is with you.

If, after leaving the house, you move farther than 30 meters from the door (determined by monitoring geo-zones), then upon returning back the mobile application will unlock the door as soon as it receives the iBeacon-signal from the smart lock. It will happen about 10 meters from the door, and when you approach it, you will only have to open it. As soon as you enter inside and slam the door, it will automatically lock (just like when you leave the house).

It must be admitted that in reality the “janitor mode” does not always work so smoothly. For example, due to the peculiarities of the iBeacon-scanner in smartphones, it may happen that when you go to the door, you still have to wait a bit before your smartphone “hears” the iBeacon signal and unlocks the door. Also, Dooris may mistakenly lock the door while it is open, if you swing the door in a certain way while tapping on it.

We have tried to take into account all such moments, and at least eliminate situations where the door has remained unlocked due to any mistake. But even if we missed something or did not do well enough, if you wish, you can always fix it - the source code of the Dooris software part will be open (we will publish the source code as soon as the first batch of our smart locks is ready).

* * *

We want to launch Dooris into mass production, but first we need to understand how our product will be in demand, and who, dear Geektimes readers, can best help us with this. What do you say: would you buy a smart dooris lock for 9,400 rubles? If yes, then we look forward to your pre-orders (we do not require money in advance). In any case, we will be happy to hear your opinion about our creation and answer questions.


All Articles