Can't get Unifi Doorbell to trigger a webhook correctly

Hi,
I am attempting my 1st automation within HA - using activity trigger from fingerprint scan on my Unifi Doorbell Pro - via webhook to HA to unlock yale smart lock

When running the automation, the lock unlock fine. However when triggering with my finger print, nothing happens.

Any ideas?

1 Like

Hi, I have the same problem. The magnetic locker (SUPLA ZAMEL) is integrated through MQTT brocker. The entityty created manually:

type: tile
entity: cover.Furtka_zamek
name: Furtka_zamek
icon: fas:door-open
tap_action:
  action: toggle

Tried to create dedicated alarm in which NFC card recognition was supposed to triger a webhook … unfortunatelly not working …

- id: '1735397049990'
  alias: NFC Mateusz
  description: ''
  triggers:
  - trigger: webhook
    allowed_methods:
    - POST
    - PUT
    - GET
    local_only: true
    webhook_id: -xfsssPÂŁÂŁÂŁÂŁÂŁÂŁÂŁÂŁYDJPsBAXIn
  conditions: []
  actions:
  - action: cover.toggle
    metadata: {}
    data: {}
    target:
      entity_id: cover.Furtka_zamek
  mode: single

There is now an event you can use instead of webhooks:

1 Like

Still … not working when event triggers… am I correct assuming that this should trigger a desired action with skmple automation? Or am I missing some tiny details?

Yes, if you use this example, changing to your entities it will send you a notification with the event details. You can obviously make a new automation using the same trigger

This is one of mine, I use different fingers to unlock the front door or the garage, using the correct ulp_id shown in the doorbell attributes (as explained in the link above) Don’t forget to change the entity_id to match yours

alias: Doorbell Fingerprint Opens Garage Door
description: ""
triggers:
  - event_type: state_changed
    event_data:
      entity_id: event.doorbell_fingerprint
    trigger: event
conditions:
  - condition: template
    value_template: |
      {{
         not trigger.event.data.old_state.attributes.get('restored', false) and
         not trigger.event.data.old_state.state == 'unavailable' and
         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 == 'xxxxxxxx-xxxx-4dxxxxe9-xxxx-xxxxxxxxxx'
       }}
actions:
  - action: cover.open_cover
    metadata: {}
    data: {}
    target:
      entity_id: cover.garage_door
mode: single

What’s the benefit of doing it that way instead of using a webhook?

It’s built in to the integration, and you don’t need any alarms setting up in unifi alarm manager
Not sure about speed but my fingerprint automation is pretty instant

What lock are you using?

I use a Simpled lock on the front door

Same issue here, webhook is never received by HA. I’ve tried the same URL in Rester from my browser and it correctly triggers the automation.

Update: This is being caused by SSL and the cert not matching my URL. When I try to use the external CERT url, it fails to connect even though I access this fine with a browser:

[cause]: Error: connect ECONNREFUSED xx.xx.xx.xx:8123
“code”: “ECONNREFUSED”,
“errno”: -111,
“syscall”: “connect”

When I use the local URL, cert doesnt match and it fails:
[cause]: Error: Hostname/IP does not match certificate’s altnames:

1 Like

Have you tried HAs IP instead of homeassistant.local in unifi alarm manager ?

Also, looking at my working automations the webhook id is enclosed in double quotes

I’m also having this same issue. (Although I haven’t found a log to confirm,) but my tests were the same.

adding to this. I am using a public SSL certificate. Not sure if my Unifi Dream Machine is causing the issue as the IP returned to HA would be the router?

I think we will need to setup Hairpin NAT on the UDM to get this to work (will try out tonight). There is a short discussion on that here: https://community.ui.com/questions/Hairpin-NAT-tutorial/47957602-f26d-432b-8141-4b7e2b7363c6 I’ve been able to get the doorbell to trigger automations through the unifi protect integration, but that is way more complex than I want and sometimes doesnt work for some reason. Add to this, the doorbell will randomly refuse to recognize fingerprints just a day after setup (reported by many in the forums, too) which just makes this a bit more complex on troubleshooting.

1 Like

Hi,

Pairing the Unifi Protect G4 Doorbell Pro automation to unlock my Yale doorlock.
I am able to setup the automation and it works fine and would now like to manipulate further by customising the telegram notification + speaker announcement with the person that has unlocked the door.

In the Home Assistant log, I can see the following output:

Why is the “full_name” not being populated?
I tried promoting the local user role from “Live Only” to “Full Management” but it still did not pick up this information.

event_types:
  - identified
  - not_identified
event_type: identified
event_id: 67a1a18e007f0803e4003dee
ulp_id: <redacted>
full_name: ""
attribution: Powered by UniFi Protect Server
icon: mdi:fingerprint
friendly_name: G4 Doorbell Pro Fingerprint

u need to set “ulp_id” to the person entity in HA. i believe it is different for fingerprint and NFC.

thanks for looking into this, what you’ve found makes sense. Looking forward to see how you get on.