Face/Fingerprint Recognition Unlock
This script/process allows a face or fingerprint detection to unlock a door.
Smart Motion Sensor
- Create a
Smart Motion Sensor
inside the Video Analysis Plugin. - When creating the
Smart Motion Sensor
select your doorbell camera as theObject Detector
. - Set the
Detection
type toface
(Scrypted NVR) orfingerprintIdentified
(Unifi Protect). - Set the
Object Detection Timeout
to15
to reset the automation after 15 seconds. - In the
Recognition
section.
- If recognizing faces, enter the name of the person(s) to match. These names must match the names labelled within Scrypted NVR.
- If recognizing fingerprints, any known fingerprint will trigger the sensor. Specific fingerprints can be filtered by entering the
Unifi
user UUID which is captured in the logs.
- Sync this new
Smart Motion Sensor
withHomeKit
orHome Assistant
. - Set up an automation in
HomeKit
orHome Assistant
to unlock the door when the sensor detects motion.
Confirmation Chime Automation
This step is optional/recommended as it provides the person positive audio feedback when recognized.
- Create a new
Automation
in Scrypted. - Set the
Trigger
to the newSmart Motion Sensor
. - Set the
Trigger Condition
toeventData === true
so it only triggers when motion detection starts. - Create an
Action
of typeScript
, replacing theDoorbell
device name with the one matching your doorbell:
ts
const doorbell = systemManager.getDeviceByName<Intercom>('Doorbell');
const mo = await mediaManager.createFFmpegMediaObject({
inputArguments: [
'-re',
'-i',
'https://cdn.pixabay.com/download/audio/2023/06/01/audio_77fe776ce5.mp3?filename=simple-notification-152054.mp3',
]
});
await doorbell.startIntercom(mo);