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:
- A UniFi Protect system running with the G4 Pro Doorbell properly installed.
- Home Assistant installed and configured.
- Access to the UniFi Protect API via your UniFi Controller.
Step 2: Configuring UniFi Protect webhooks
- Log in to your UniFi Protect Controller.
- Navigate to the settings for the G4 Pro Doorbell. or go to the alarm manager and create a new one.
- Go to the Advanced Settings section and locate Webhooks.
- Enable webhooks and enter the URL of your Home Assistant server. The URL format is:plaintextCopy code
Replace1http://<HomeAssistant_IP>:8123/api/webhook/<webhook_id>with the IP address of your Home Assistant instance and1<HomeAssistant_IP>with a unique identifier, such as1<webhook_id>.1doorbell_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
- Create automation
Choose webhook as trigger
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.
Finish your automation by adding notifications or other actions you like. and the webhook is usable from:
https://your-home-assistant:8123/api/webhook/-UkptdoDSroz8lk2JPmDsaduBq9u1
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