Not sure if some one already achieved and shared it, here is my setup for the doorbell face recognition using DoorBird, Facebox and google home assistant
Prerequisites:
Facebox setup
Doobird Setup
Google home setup
My challenge was to setup capture the image using doorbird api link and pass it to Facebox api and update the sensor in HA for name of person. To achieve this I created a custom Python script and running it as API using flask. On doorbird button press an automation triggers and calls the API exposed by Python script which calls the Facebox API passing the Doorbird image link(API) to it. Results are from Facebox are processed by script and REST API for HA is called to set a sensor value to Name passed by facebox.
Link to script: https://github.com/coder1313/HA-Face-Detection.git
Steps to setup
Install flask using PIP and run the script
Setup a rest command in HA in configuration.yaml like this
rest_command:
face_detect:
url: http://:5000/
Example URL for me url: http://127.0.0.1:5000/test as its running locally
Setup an HA automation for doorbird button press and call above service(face_detect) in first action
Setup an other action for automation to announce name on google assitant
My automation look like below
- id: ‘1593866668302’
alias: Door Ring
description: ‘’
trigger:- event_data: {}
event_type: doorbird_front_door_somebody_pressed_the_button
platform: event
condition: []
action: - service: rest_command.face_detect
- data_template:
message: ‘{{ states(’‘sensor.face’’) }} is at door’
entity_id: media_player.living_room_speaker
service: tts.google_translate_say
- event_data: {}
sensor.face will be created automatically once python script API is called first time, as it call HA rest API in the end to set value of face sensor to name. More information on this here
I might not be able to explain it well as this is my first project posted here, but feel free to ask questions