#UniFi Protect G4 Doorbell Fingerprint Event

26 messages · Page 1 of 1 (latest)

loud prism
quaint field
#

Following this. I'm interested to know as well. Mine comes in today

loud prism
#

I have the fingerprint we hook working and automation to unlock. But I saw this new stuff yesterday so I wanted to explore it some. But couldn’t get anything back when testing it.

loud prism
#

Hmmm…. Someone else said it worked on WiFi and much faster than a webhook.

I deleted the integration and added it back. And now it is logging events for me.

split portal
#

To those that are wondering how to do it:

In HA create a new automation. Click Trigger -> other triggers -> Webhook (all the way at the bottom)
HA will automatically assign a random Webhook ID #. I believe you can change it to whatever you want.
A simple Then Do action send to unlock your smart lock.
Now in Unifi Protect Alarm Manager, create a new alarm.
The Trigger is Activity and check Fingerprint Scan and whatever registered fingerprints you want to use
In Target, include the doorbell
In Action, select Webhook and change Slack Post to Custom Webhook
For Delivery URL, you want to use your IP address where HA is connected to including port number. It should look like this "http://YourHAIPAddress:8123/api/webhook/YourWebhookID"
Still in Action, check the Advanced Settings and the Method is POST

loud prism
# split portal To those that are wondering how to do it: In HA create a new automation. Click ...

It is easier now… you don’t need to use webhook with the latest HA. Which also means a lot less delay.

They give you an example here to create a notification. Just modify that notification part to allow you unlock your door.

https://www.home-assistant.io/integrations/unifiprotect/#fingerprint-identified-event

Home Assistant

Instructions on how to configure the Ubiquiti UniFi Protect integration.

split portal
#

Do you just change the action from notification to unlock?

loud prism
split portal
#

Would you mind to paste the YAML?

loud prism
#

So in the example they give. They have this.

trigger.event.data.new_state.attributes.event_type == 'identified' and
(trigger.event.data.new_state.attributes.ulp_id|default('')) != '' and
trigger.event.data.new_state.attributes.ulp_id in ['ALLOWED_ID1', 'ALLOWED_ID2']
}}

I had to find the Allowed_ID1 and Allowed_ID2 in the developer settings.

#

alias: Lock/Unlock Door
description: ""
triggers:

  • event_type: state_changed
    event_data:
    entity_id: event.doorbell_fingerprint
    trigger: event
    conditions:
  • condition: template
    value_template: |
    {{
    trigger.event.data.new_state is not none and
    trigger.event.data.new_state.attributes.event_type == 'identified' and
    (trigger.event.data.new_state.attributes.ulp_id|default('')) != '' and
    trigger.event.data.new_state.attributes.ulp_id in ['AllowedID1', 'AllowedID2']
    }}
    actions:
  • choose:
    • conditions:
      • condition: device
        device_id: 6ec5ac7439447dc68c0c8f9b7cc32b0c
        domain: lock
        entity_id: 2a682fa39c4120c2418ad62906e261e4
        type: is_locked
        sequence:
      • device_id: 6ec5ac7439447dc68c0c8f9b7cc32b0c
        domain: lock
        entity_id: 2a682fa39c4120c2418ad62906e261e4
        type: unlock
    • conditions:
      • condition: device
        device_id: 6ec5ac7439447dc68c0c8f9b7cc32b0c
        domain: lock
        entity_id: 2a682fa39c4120c2418ad62906e261e4
        type: is_unlocked
        sequence:
      • device_id: 6ec5ac7439447dc68c0c8f9b7cc32b0c
        domain: lock
        entity_id: 2a682fa39c4120c2418ad62906e261e4
        type: lock
        mode: single
split portal
#

thanks

#

how did you find the allowed_id?

loud prism
#

In Developer Tools. Go to States. And for Entity type in Fingerprint. You will look for the Event.

#

The ulp_id will have it which is unique for each person

#

So sign in yourself and you will see your own. Copy and paste that. Maybe to the Secrets!

#

But then everything is local. It HA is just accessing the NVR or Protect application on your network for it

#

They want to expand the ulp in future. To maybe have someone name. But for now it’s this

split portal
#

Thanks

#

Do you have set person detection notifications to the companion app as well by any chance?

loud prism
#

I didn’t. I had fingerprints registered for who I wanted on the doorbell setup. In my case myself and my wife. Placed both ULP ID in the automation.

split portal
#

I have issues with the doorbell motion detection notifications

loud prism
#

Hmmm… that is beyond my scope.