I recently installed a Tapo DL105 smart deadbolt and wanted something it doesn't support natively: automatic locking based on whether the door is actually closed.
After quite a bit of experimenting, troubleshooting, and testing, I finally got a 7-automation system working entirely within the Tapo app!
No Home Assistant, external automation software, or third-party services required.
Required Hardware
You'll need three Tapo devices:
- Tapo DL105 β Smart Deadbolt
- Tapo H100 or H110 β Smart Hub
- Tapo T110 β Door Contact Sensor
All three devices are required.
The T110 communicates through the H100/H110 hub, while the DL105 connects independently through Wi-Fi. The Tapo app coordinates them using Smart Automations.
What This Setup Does
- Door opens and closes: Starts a 3-minute countdown, then automatically locks.
- Door opens again during the countdown: Cancels the pending lock. Closing the door starts a fresh countdown.
- Door remains open: Designed to prevent the automation from extending the deadbolt while the door is open.
- Door is unlocked without opening: Starts a separate 3-minute countdown, then automatically relocks.
- Door opens during that separate countdown: Cancels the pending relock and transfers control to the normal door-close automation.
The system uses two alternating auto-lock timers (A and B), two corresponding cancellation rules, and three additional automations for unlocking without opening the door.
β οΈ IMPORTANT: Create Rules 1β4 in Two Stages
Rules 1β4 are interdependent and must be created before their action lists can be completed.
These four automations work together as two alternating pairs:
- Rule 1: Auto-Lock Timer A
- Rule 2: Auto-Lock Timer B
- Rule 3: Open-Cancel A
- Rule 4: Open-Cancel B
Each rule uses actions that enable or disable other rules in the group. However, the Tapo app only allows you to select an automation that already exists.
Stage 1 β Create All Four Automations
Create Rules 1β4 in the order listed, setting up their triggers and conditions as described below.
For now, add only a temporary or incomplete action list to each rule, just enough to save it.
Do not attempt to configure all the automation-control actions yet.
The goal is simply to get all four automations created and visible in the Tapo Smart tab.
Stage 2 β Complete Their Action Lists
Once all four automations exist, go back and edit each one individually.
Add the complete action sequence exactly as shown below, including the delays and actions that enable or disable the other automations.
Remove any temporary actions that are not part of the final configuration.
Do not activate or test the system until all four rules are fully configured. Incomplete rules may produce unexpected behavior.
β οΈ CRITICAL: Set the Correct A/B Starting States
Rules 1β4 operate as two alternating pairs. Only one pair should be active at a time.
After completing all four rules, manually set their ON/OFF switches in the Tapo Smart tab as follows:
- Rule 1 β Auto-Lock Timer A: ON
- Rule 2 β Auto-Lock Timer B: OFF
- Rule 3 β Open-Cancel A: ON
- Rule 4 β Open-Cancel B: OFF
Both A rules must start ON, and both B rules must start OFF.
This is intentional. The automations automatically switch between the A and B pairs during operation, allowing the system to cancel an active countdown when the door opens and prepare the opposite timer for the next cycle.
Do not manually turn on all four automations. Doing so can interfere with the alternating sequence and cause unexpected behavior.
Once configured correctly, the system manages these switches automatically. You should not need to change them during normal operation.
Important: My screenshots show the automations in reverse creation order (newest at the top). Follow the automation names and ON/OFF states, not their positions on the screen.
Rules 5β7 Are Different
These three rules can be created normally, one at a time, in the listed order:
- Rule 5: Re-Lock In Place
- Rule 6: Cancel In-Place on Open
- Rule 7: Re-Arm In-Place on Close
Rule 5 must exist before Rules 6 and 7 can reference it.
All three should start ON.
Complete 7-Rule Configuration
Set Effective Time: Always for all seven automations.
Rule 1 β Auto-Lock Timer A
Initial State: ON
WHEN:
- T110 Door Sensor β Close
IF:
- DL105 Door Lock β Unlocked
THEN (in order):
- Delay β 3 minutes
- DL105 β Lock the Door
- Delay β 1 second
- Turn ON β Auto-Lock Timer B
- Turn ON β Open-Cancel B
- Turn OFF β Open-Cancel A
- Turn OFF β Auto-Lock Timer A
Rule 2 β Auto-Lock Timer B
Initial State: OFF
WHEN:
- T110 Door Sensor β Close
IF:
- DL105 Door Lock β Unlocked
THEN (in order):
- Delay β 3 minutes
- DL105 β Lock the Door
- Delay β 1 second
- Turn ON β Auto-Lock Timer A
- Turn ON β Open-Cancel A
- Turn OFF β Open-Cancel B
- Turn OFF β Auto-Lock Timer B
Rule 3 β Open-Cancel A
Initial State: ON
WHEN:
- T110 Door Sensor β Open
IF:
THEN (in order):
- Turn OFF β Auto-Lock Timer A
- Delay β 1 second
- Turn ON β Auto-Lock Timer B
- Turn ON β Open-Cancel B
- Turn OFF β Open-Cancel A
Rule 4 β Open-Cancel B
Initial State: OFF
WHEN:
- T110 Door Sensor β Open
IF:
THEN (in order):
- Turn OFF β Auto-Lock Timer B
- Delay β 1 second
- Turn ON β Auto-Lock Timer A
- Turn ON β Open-Cancel A
- Turn OFF β Open-Cancel B
Rules 1β4 form the alternating timer system.
Rule 5 β Re-Lock In Place
Initial State: ON
WHEN:
- DL105 β Unlocked (Any Method)
IF:
- T110 Door Sensor β Close
THEN:
- Delay β 3 minutes
- DL105 β Lock the Door
This handles someone unlocking the deadbolt without actually opening the door.
Rule 6 β Cancel In-Place on Open
Initial State: ON
WHEN:
- T110 Door Sensor β Open
IF:
THEN:
- Turn OFF β Re-Lock In Place
This cancels the separate countdown if someone opens the door.
Rule 7 β Re-Arm In-Place on Close
Initial State: ON
WHEN:
- T110 Door Sensor β Close
IF:
THEN:
- Delay β 2 seconds
- Turn ON β Re-Lock In Place
This prepares Rule 5 for the next time someone unlocks the door without opening it.
Final Automation States
Before testing, verify that all seven switches match this configuration:
- Auto-Lock Timer A β ON
- 2. Auto-Lock Timer B β OFF
- 3. Open-Cancel A β ON
- 4. Open-Cancel B β OFF
- 5. Re-Lock In Place β ON
- 6. Cancel In-Place on Open β ON
- 7. Re-Arm In-Place on Close β ON
Screenshot note: My Tapo automation list displays the rules in reverse creation order. Rule 7 appears at the top, and Rule 1 at the bottom.
This is normal and does not affect operation.
Why Two Alternating Timers?
The key discovery was that disabling a Tapo automation cancels its pending delayed actions, which I confirmed through testing on my setup.
The original single-timer approach had a problem: opening the door disabled the timer, but enabling it when the door closed happened too late to catch that same closing event.
The A/B approach solves this by enabling the opposite timer when the door opens, so it's already armed before the next closing event.
The 1-second delays separate the handoff actions, helping the automation states transition correctly.
Testing and Precautions
For initial testing, I recommend temporarily shortening both 3-minute timers to 15β20 seconds.
Test these scenarios:
- Open and close: The door should lock after the countdown.
- Reopen during countdown: The pending lock should be canceled.
- Close again: A fresh countdown should start.
- Unlock without opening: The separate in-place timer should relock the door.
- Unlock, then open: The in-place countdown should be canceled.
- Open and close repeatedly: The A/B timers should continue alternating without getting stuck.
Safety warning: This is a community-developed workaround, not an officially supported door-aware locking feature. Although it works in my testing, firmware changes, connectivity issues, or automation failures could affect its behavior.
Test thoroughly with the door open and the deadbolt clear of the strike plate before relying on it. Keep a reliable way to unlock the door, and don't assume that a lock command guarantees the door is physically secured.
Adjusting the Auto-Lock Time
I'm currently using 3 minutes, but you can change the countdown to suit your needs.
For consistent behavior, change the delay in all three locking automations:
- Rule 1 β Auto-Lock Timer A
- Rule 2 β Auto-Lock Timer B
- Rule 5 β Re-Lock In Place
Leave the 1-second and 2-second handoff delays unchanged unless you're specifically experimenting with the automation logic.
I'm sharing screenshots of all seven automations so others can reproduce the configuration.
Hopefully TP-Link will eventually add native door-sensor-aware auto-locking to the DL105, eliminating the need for this workaround.
Until then, this setup has been working for me.
Feel free to share your results or improvements!