Deadbold Lock Status Sensor

:closed_lock_with_key: DIY Lock Status Sensor

(Kwikset + Aeotec + Home Assistant + HomeKit)


Goal

I wanted lock state visibility (locked/unlocked) in Home Assistant and Apple Home, without installing a true smart lock.

  • Household preference: :x: no remotely unlockable lock
  • Solution: :white_check_mark: read-only lock state using internal hardware

:brain: Concept

Use:

  • Existing mechanical limit switch inside the lock
  • Feed it into a Z-Wave sensor with dry contact input
  • Expose as a lock entity in Home Assistant β†’ HomeKit

No motor control. No unlocking. Just state.


:toolbox: Hardware Used

  • Kwikset keypad deadbolt (existing)
  • Aeotec Door/Window Sensor 7 Pro (ZWA012)
    • Key feature: dry contact input terminals

:closed_lock_with_key: Original Lock

Exterior:

Interior:


:wrench: Step 1 β€” Gut the Lock

I opened the lock and exposed:

  • Motor + gearbox
  • Large plastic gear
  • Built-in microswitch (limit switch)

Key insight:
The gear already presses a microswitch when the lock is in the locked position.

No need to add a separate sensor.


:electric_plug: Step 2 β€” Use the Existing Microswitch

The switch behaves like a dry contact:

  • Closed when locked
  • Open when unlocked

I verified this with a multimeter, then soldered wires to the switch terminals.



:link: Step 3 β€” Wire to Aeotec Sensor

Wiring:
Microswitch β†’ Aeotec Terminal 2 (Digital)
Microswitch β†’ Aeotec Terminal 3 (VCC reference)

No connection to ground (Terminal 1) required.


:gear: Step 4 β€” Configure Aeotec Sensor

In Home Assistant Z-Wave configuration:

  • Parameter 1: External terminal inputs
  • Parameter 2: Switch mode

This disables the internal magnet sensor and uses your external switch.


:battery: Step 5 β€” Power Decision

Initially considered reusing the lock’s 4Γ—AA battery pack, but rejected due to:

  • Voltage mismatch (6V vs ~3V required)
  • Need for regulator
  • Added complexity

Final choice: Use Aeotec’s native 1/2 AA battery.


:brick: Step 6 β€” Fit Everything Inside

  • Removed original batteries
  • Used a Dremel to cut battery compartment
  • Mounted Aeotec sensor inside lock housing



:warning: Mechanical Tuning

Problem:

  • Switch worked when disassembled
  • Failed intermittently when fully assembled

Solution:

  • Slightly bent the microswitch lever arm

Result: Reliable actuation in final installed state.


:house: Step 7 β€” Home Assistant Template Lock

lock:
  - platform: template
    name: "Back Door Lock"
    unique_id: back_door_lock
    value_template: >
      {{ is_state('binary_sensor.back_door_lock_binary_sensor', 'on') }}

:apple: Step 8 β€” HomeKit Integration

  • Mode: Accessory
  • Include domain: lock

After adding, the lock appears in Apple Home.


:dart: Final Result

  • :closed_lock_with_key: Lock shows Locked / Unlocked in Apple Home
  • :no_entry_sign: Cannot be unlocked remotely
  • :zap: Fully local Z-Wave
  • :battery: Long battery life
1 Like