Face/Fingerprint Recognition Unlock
This script/process allows a face or fingerprint detection to unlock a door.
Smart Motion Sensor
- Create a
Smart Motion Sensorinside the Video Analysis Plugin. - When creating the
Smart Motion Sensorselect your doorbell camera as theObject Detector. - Set the
Detectiontype toface(Scrypted NVR) orfingerprintIdentified(Unifi Protect). - Set the
Object Detection Timeoutto15to reset the automation after 15 seconds. - In the
Recognitionsettings on theSmart Motion Sensor:
- 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
Unifiuser UUID which is captured in the logs for the sensor.
- Sync this new
Smart Motion SensorwithHomeKitorHome Assistant. - Set up an automation in
HomeKitorHome Assistantto 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
Automationin Scrypted. - Set the
Triggerto the newSmart Motion Sensor. - Set the
Trigger ConditiontoeventData === trueso it only triggers when motion detection starts. - Create an
Actionof typeScript, replacing theDoorbelldevice 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);