Use a UniFi G4 Pro Doorbell with FC and fingerprint to fire Webhooks in Home Assistant: A Complete Guide

0
2
unifi doorbell

The UniFi G4 Pro Doorbell is a feature-rich device seamlessly integrated into the Ubiquiti UniFi Protect ecosystem. With a 5MP camera, HDR video, and two-way audio, it’s a powerful tool for any smart home setup. But the G4 Pro doorbell is after a lot of complaints finally ready: NFC and the fingerprint sensor are enabled by a firmware update! What makes it even more versatile is its ability to trigger webhooks, allowing you to automate actions and notifications, especially when paired with Home Assistant.

In this guide, we’ll show you how to connect your UniFi G4 Pro Doorbell to Home Assistant using webhooks and set up advanced automations.

Video is from https://www.reddit.com/r/Ubiquiti/comments/1gl1gyl/g4_doorbell_profingerprintdanalock/


Contents

What Are Webhooks?

A webhook is an HTTP request sent by a device or service to another platform when a specific event occurs. For the UniFi G4 Pro Doorbell, a webhook can be triggered when someone presses the doorbell button. Using Home Assistant, you can leverage these webhooks to automate actions such as:

  • Sending notifications to your smartphone.
  • Turning on a porch light automatically.
  • Capturing snapshots or saving video recordings.

Step 1: Requirements to use Unifi protect webhooks

Before you start, make sure you have:

  1. A UniFi Protect system running with the G4 Pro Doorbell properly installed.
  2. Home Assistant installed and configured.
  3. Access to the UniFi Protect API via your UniFi Controller.

Step 2: Configuring UniFi Protect webhooks

  1. Log in to your UniFi Protect Controller.
  2. Navigate to the settings for the G4 Pro Doorbell. or go to the alarm manager and create a new one.
  3. Go to the Advanced Settings section and locate Webhooks.
  4. Enable webhooks and enter the URL of your Home Assistant server. The URL format is:plaintextCopy code
    1
    http://<HomeAssistant_IP>:8123/api/webhook/<webhook_id>
    Replace 
    1
    <HomeAssistant_IP>
     with the IP address of your Home Assistant instance and 
    1
    <webhook_id>
     with a unique identifier, such as 
    1
    doorbell_event
    .
    Or from the generated ID in the automation example: https://your-home-assistant:8123/api/webhook/-UkptdoDSroz8lk2JPmDsaduBq9u

Step 3: Setting Up fire Webhooks in Home Assistant

  1. Create automation
    Afbeeldingslocatie: https://tweakers.net/i/uI4jzmyK9IIrSRzpA17wQBb_chs=/fit-in/4000x4000/filters:no_upscale():strip_exif()/f/image/5XEMAM19n7wMyhtHY9f6iW0x.png?f=user_large

    Choose webhook as trigger
    Afbeeldingslocatie: https://tweakers.net/i/Uj2yelPuxPulmVlL5Tw8oyavZ3g=/800x/filters:strip_exif()/f/image/HZIIaJNVnBohEuRi9FTiC9fp.png?f=fotoalbum_large
    A predefined unique ID is generated. You can use that or rename is to a easier one. Then klik on the gear and choose post and here you can also choose to use this webhook from online or only local.
    Afbeeldingslocatie: https://tweakers.net/i/gRK3OMY4OaS8-eNiqwWrsVlTzbk=/800x/filters:strip_exif()/f/image/eb61yMQhv3dUq1Fgme09Ta3c.png?f=fotoalbum_large
    Finish your automation by adding notifications or other actions you like. and the webhook is usable from:
    https://your-home-assistant:8123/api/webhook/-UkptdoDSroz8lk2JPmDsaduBq9u
    1
     

test your webhook in a linux terminal with this command:
curl -X POST -d https://IP_or_Domain/api/webhook/-UkptdoDSroz8lk2JPmDsaduBq9u


Step 4: Testing the Integration

Press the doorbell button and check if:

  • Home Assistant receives the webhook. You can check that in the traces of the automation.
  • The configured actions (e.g., notifications and lights) execute as expected.

To debug, you can review the Home Assistant logs to confirm the webhook was successfully received.


Additional Automations

The UniFi G4 Pro Doorbell opens the door to numerous smart home scenarios:

  • Capture a Snapshot of Visitors:
    Add an action to save a snapshot from the doorbell camera
  • Welcome messages
    Trigger specific actions only when no one is home, for added security.
  • Open the door
    If you use a smart key lock like aqara, danalock or others that works in home assistant you can open them đŸ™‚

Conclusion

The UniFi G4 Pro Doorbell is an excellent choice for creating a smarter, safer home. By integrating it with Home Assistant through webhooks, you can automate notifications, control lighting, and even capture snapshots of visitors. This integration offers unparalleled flexibility and customization for your smart home setup.

If you’re looking for more tips or have any questions, feel free to reach out! Start automating your UniFi G4 Pro Doorbell today and take your smart home experience to the next level.


Cheap small and good quality NFC Tags from Aqara, they work perfect on the Aqara u200 Smart Lock and also on the Unifi G4 Pro doorbell

  • Design
  • Quality
  • Usability
  • Home-Automation compatibility
  • Price