jakowenko / double-take

Unified UI and API for processing and training images for facial recognition.
https://hub.docker.com/r/jakowenko/double-take
MIT License
1.22k stars 97 forks source link

[FEAT] Open door by face. Which it the best practice configuration + automation? #324

Open antonbek89 opened 1 year ago

antonbek89 commented 1 year ago

OK so I want open the door with face recognizion.

I didn't found the best HA automation for that mission

Until now I success open the door with face The second time in a row the problem happend

Any suggestions?

townsmcp commented 1 year ago

I am in the process of building similar automation in Node Red based on an old automation I used to use with previous door lock. Some important scenarios to think of are only allowing a window of opportunity for the door to unlock when a home occupant gets home and is recognised by DT - by tracking devices for something like a 10 minute window of when they come into the area. For this, my people entities have connection with Unifi Wi-Fi connection, zone location of HA companion app, input_boolean that is turned on when a person gets home via HomeKit, presence of iPhone and Apple Watch using iCloud3 integration. Other things to think of are and code for are not unlocking the door randomly at night - even with a well trained system, DT can think one of your known people is in front of your camera. If that person is in the property you don’t want a false positive to unlock the door

Fromnboobto commented 4 months ago

I have a this up and running :)

Using home assistant with node red, I am also running Frigate and Double-Take and compreface In node red

I have state nodes for my family and they are basically confifured lilke this: image and if they are avaialbe/on it unlocks a door (using a magnetic lock form ubuiti)

townsmcp commented 4 months ago

@Fromnboobto it would be a good idea to share your flow please

Fromnboobto commented 4 months ago

[{"id":"4d8aff5fc142a54d","type":"server-state-changed","z":"c86eaada5f7441de","g":"df9266f24614080b","name":"doubletake - Micke","server":"ef85dd2a.8629e","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.double_take_something","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"framsida","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"1","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":130,"y":380,"wires":[["9fba4fdb7e600bc5"],[]]},{"id":"9fba4fdb7e600bc5","type":"time-range-switch","z":"c86eaada5f7441de","name":"Dag","lat":"59.4024341","lon":"17.9464824","startTime":"08:00","endTime":"21:00","startOffset":0,"endOffset":0,"x":450,"y":440,"wires":[["0246abecace0defc"],[]]},{"id":"0246abecace0defc","type":"api-call-service","z":"c86eaada5f7441de","name":"Unlock framsida","server":"ef85dd2a.8629e","version":5,"debugenabled":true,"domain":"lock","service":"unlock","areaId":[],"deviceId":["c6470093383015e3a106b5cf62a23420"],"entityId":["lock.main_door"],"data":"$abs(1)\t","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":760,"y":460,"wires":[["8f24370703016c56","37584ff5956b1571"]]},{"id":"ef85dd2a.8629e","type":"server","name":"Home Assistant","addon":true}]