Webhook with ubiquiti protect

I have tried using the logic in homey using the URL provided with the myevent tag and = it to a name and paste it into the customer webhook in ubiquiti protect alarm and set as POST and it doesnt work when triggered. Anyone facing the same issue? Or did i use a wrong webhook for this? Not expert with webhook need some help on this.


What’s the value of (ⓐ Tag) in the first card? It should be my_event

Just an FYI, Might not be possible to use a tag in the trigger card, and has to be written.

1 Like

what i did was … https://webhook.homey.app/ [homey id] /my_event?tag=fingerprint is place in unifi protect alarm webhook post
where fingerprint is my tag value.

so in the trigger i check tag is exactly fingerprint.

The “When” card should contain the event name, so my_event

so putting this in the unifi protect UI for post
https://webhook.homey.app/ [homey id] /my_event?tag=fingerprint is not correct? Cos my_event doesnt has a naming convention here.

should i change to …my_event=fingerprint?tag=yes

If you have this:

The URL should be:

https://webhook.homey.app/[homey id]/event_from_ubiquiti?tag=fingerprint
1 Like

that works. thanks a lot. finally understand that statement in the icon.

1 Like

Any idea if it is also possible to pass json or variable from Unifi Protect?
Or do I need to hard code each tag in Unifi Protect Alarm for Homey?

According to this article the Unifi HTTP POST Alarm should send additional information but I haven’t been able to capture it with ‘tag’:

Homey’s webhooks are very limited, only “event” and “tag” (passed in the URL) are supported.

1 Like

Thanks for your reply!
This triggered me to check if someone had made an alternative webhook app and there is :slight_smile:

When using the webhook URL as can be found in the config of this app
(e.g. https://webhooks.athom.com/webhook/123456789abcde?homey=homey id of your homey’&event=‘event name as defined in unifi protect’)
The json can now be read…

E.g. these Unifi Protect Alarm settings


now returns the expected json:

{
  "alarm": {
    "name": "Person of interest (Webhook)",
    "sources": [
      {
        "device": "E0631DABCDE",
        "type": "include"
      }
    ],
    "conditions": [
      {
        "condition": {
          "type": "is",
          "source": "face_of_interest"
        }
      },
      {
        "condition": {
          "type": "is",
          "source": "face_unknown"
        }
      },
      {
        "condition": {
          "type": "is",
          "source": "face_known"
        }
      }
    ],
    "triggers": [
      {
        "device": "E0631DABCDE",
        "value": "John Doe",
        "key": "face_known",
        "eventId": "678e5b1b022dd903e400e376"
      },
      {
        "device": "E0631DABCDE",
        "value": "John Doe",
        "key": "face_of_interest",
        "eventId": "678e5b1b022dd903e400e376"
      }
    ]
  },
  "timestamp": 1737382688066
}
1 Like

I forgot about that app :sweat_smile: