Smart Door + Lock Detection Using Zigbee Sensor, Home Assistant & Alexa

Smart Door + Lock Detection Using Zigbee Sensor, Home Assistant & Alexa

Using homeassistant from 2019, have been doing lot of things, thought this could be interesting to be shared

I wanted a simple way to know:

  • when my kids open the main door
  • whether the door is locked or unlocked

So I built this setup using:

  • Zigbee door sensor
  • Zigbee2MQTT
  • Home Assistant
  • Alexa announcements

Features

  • Door open/close detection
  • Lock/unlock detection
  • Alexa voice announcements
  • Phone notifications
  • Custom 3D-printed lock magnet holder

How It Works

The normal door sensor detects:

  • closed = magnet near sensor
  • open = magnet away from sensor

For lock detection, I added a custom magnet setup inside the door knob mechanism using a 3D-printed holder.

This lets Home Assistant detect:

  • locked
  • unlocked

Automation Example

When the door opens:

  • Alexa announces:
    “Main door opened.”

You can also trigger:

  • phone notifications
  • security automations
  • night alerts

Installation Notes

  • Sensor alignment is very important
  • Magnet should face the sensor line properly
  • Initial knob-mounted magnet setup was unreliable
  • Custom 3D design solved it

PIC

3D Design

https://makerworld.com/en/models/1910582-dumb-knob-to-smart-knob-zigbee-home-assistant#profileId-2048724

Please feel free to ask any questions

i have full video of it working ( NOT in ENGLISH Apologies ) if interested pls ask

Unable to add pics here as its my first post , check out my blog