Ring Door Bell Snapshot for Facial recognition

With ffmpeg feature on Ring Door Bell component. Is it possible to take the snapshot of the person ringing the bell, save it locally & send a notification to mobile with that picture using say telegram.?
or
Is it possible to take the snapshot of the person ringing the bell and use facial recognition to run automation (say the name of the person who is ringing the bell, if he/she is configured by some apps like Facebox/tensor flow) ?

Hey
Did you get anywhere with this?

No
its stagnant

You can certainly integrate facial recognition with a doorbell cam, I wrote an entire step-by-step tutorial on how to setup facial recognition and trigger automation based upon facial identity using Facebox. The example uses a remote RasPi cam streaming RTSP (FFMPEG camera integration) but you could easily adapt it for a doorbell as its compatible with any camera entity.

I have also written a detailed step-by-step guide for setting up telegram and you can certainly send pictures to a Telegram chat or group using your own bot :slight_smile:

2 Likes

Great tutorial Thanks @Siytek
I tried the same but the testing is failed :frowning: Can you please help to troubleshoot.
This is what i see on my HA UI
image

Config is as follows:

camera:   
  - platform: local_file
    name: FB Test
    file_path: /config/www/image.jpg
image_processing:
  - platform: facebox
    ip_address: 192.168.1.23
    port: 8080
    source:
      - entity_id: camera.fb_test
        name: Fb Test IP

Please help

Hey @easwaran83, your configuration looks fine so I think everything on the Home Assistant side is good. Can you please provide details of your setup? Which OS are you running Facebox on? Same or seperate machine to your HA server?

First you should confirm if Facebox is running by navigating to the configuration page:

http://your-facebox-ip-address:8080/

Or you can check if the container is running by using the Portainer add-on:

If your Facebox container is not running, please can you post the output from the terminal window after you execute the steps in this part of the tutorial?

Can you confirm if you got this output…?

1 Like

my Face box is running on ubuntu docker same dell machine which Home assistant also installed as another docker.


image

Everything certainly looks correct there and I tried your code exactly as you have written it and it works for me.

You also seem to be connecting to Facebox ok, if I falsify the IP address or port to simulate a connection failure HA just doesn’t initialize the image processing entity.

It is also not related to not being able to recognise any faces, as this just returns ‘0.’

What does your log file look like? Do you have any errors relating to the local_file camera entity?

1 Like

Not sure why its happening but i found few things in my troubleshoot
hence i assume mine is working now
I uploaded my image as mentioned in facebox tutorial & uploaded my pic as follows
Below is what i get
image
Also i uploaded a scenery i get the following results
image
Not sure why it dint work earlier :frowning:

My queries:

  1. Ring Being a cloud-based video doorbell, I could not figure out how to get the snapshot of something like local_file camera. Everything is stored in the cloud.
    Hence I cannot use this facebox using Ring video doorbell?

  2. I also observe face box forgets the faces that we upload when the machine restarts, is there a way to make it rember all the stored faces??

Thank in advance

Great news! Looks like everything is working perfectly now :slight_smile:

  1. I don’t have a Ring doorbell but I think you can just bring the video feed into HA using the Ring integration. If you can get the live feed as a camera entity, you should just be able to use it with your Facebox integration.
    I am guessing you can set up the doorbell button as a switch too, so you could set up an automation to get the snapshot when it is pressed. The snapshot will come from the camera entity within HA, I don’t think you need to use the cloud.

  2. This is a limitation of the free version of Facebox. It is possible to work around this limitation by saving the state of Facebox and then re-uploading the state if the docker container is reset. I didn’t have time to set this up yet but I plan to add it and I will likely write a follow-up tutorial about it :slight_smile:

State saving (from GitHub - robmarkcole/HASS-Machinebox-Facebox: Home Assistant face detection using Machinebox.io)…

Once you have trained facebox you can download the state file using:

curl -o state.facebox http://localhost:8080/facebox/state

If you restart facebox and loose the state, you can upload your saved state file using:

curl -X POST -F '[email protected]' http://localhost:8080/facebox/state
1 Like

Thanks @Siytek
I need to explore if ring can get the live feed as a camera entity
also to get the snapshot when it is pressed.

This is not currently possible in the ha-integration, but it’s done in other libraries that calls on Ring. For example the one for Homebridge I think. So it should be possible to do this in ha as well.

2 Likes