Perfect Automation: Link AnjieloSmart Video Doorbell to Smart Locks & Lights Using Tuya & Home Assistant
Share
A Complete Guide to Automating Anjielo Video Doorbell with Automatic Door Opening/Lighting Control using Tuya and Home Assistant
This article will provide a detailed explanation of how to use two methods – the Tuya official platform and the Home Assistant local system – to achieve automated linkage between the Anjielo video doorbell and smart door locks and lighting systems, finding the best balance between security and convenience.
Method 1: Automation via the Tuya Official Platform (Most Convenient)
This method is easy to configure and suitable for most users to get started quickly.
Core Prerequisites
Anjielo video doorbell (already connected to Tuya Smart or Smart Life App).
Smart door lock and smart lighting devices that support the Tuya ecosystem (Key: Must use the same Tuya account).
A stable home Wi-Fi network.
Automation Setup Steps Example
Create a "Automatic Unlock When Doorbell is Pressed" scene
Trigger condition: In the "Smart" section of the Tuya Smart App, select "If" → "Device is controlled" → "Select your doorbell" → "Doorbell button".
Action to perform: Select "Then perform" → "Select your smart door lock" → "Unlock".
Security advice (Important): Be sure to add conditions such as effective time periods (e.g., only weekdays 6-8 PM) to avoid triggering all day long.
Create a "Automatic Light On When Motion is Detected" scene
Trigger condition: "If" → "Device is controlled" → "Select your doorbell" → "Motion detected".
Action to perform: "Then perform" → "Select your smart light bulb/switch" → "Turn on the light".
Optimize experience: You can add an action to "Turn off the light" after a "3-minute delay," and set it to only be effective from "sunset to sunrise" to avoid accidental triggering during the day.
Tuya Method Advantages and Disadvantages
Advantages: Intuitive configuration, low learning curve, suitable for beginners.
Disadvantages: Cloud-dependent, slight response delay, fails without internet connection.
Method 2: Advanced Local Automation via Home Assistant (More Powerful)
This method offers extremely fast response, offline operation, and excellent privacy, suitable for tech enthusiasts seeking the ultimate experience.
Core Prerequisites
Home Assistant system deployed and configured.
Doorbell, door lock, lighting, and other devices successfully integrated into HA (strongly recommended to use the "Tuya Local" integration for local control). Detailed Implementation Steps
Phase 1: Device Connection (Key Steps)
Obtain the Local Key: Use the official Tuya app or tools to obtain the local communication key for your doorbell, door lock, and lighting fixtures.
Install the Integration: Install the "Tuya Local" integration in Home Assistant (this can be done via the HACS store or manually).
Add Devices: Add each device individually as a local device using its IP address, Device ID, and Local Key.
Phase 2: Creating Automation Scenarios
After successful connection, you can create complex automation logic in Home Assistant's "Settings" -> "Automations & Scenes". Scenario Example 1: Doorbell Press, Mobile Phone Confirmation and Unlock (High Security)
yaml
alias: “Doorbell Button - Mobile Notification and Unlock Selection”
trigger:
- platform: state
entity_id: sensor.doorbell_button # Doorbell button sensor
to: “on”
action:
- service: notify.mobile_app_your_phone # Send notification to mobile phone
data:
title: “Someone is ringing the doorbell”
message: “Is this a trusted visitor?”
data:
actions: # Add action buttons to the notification
- action: “UNLOCK_DOOR”
title: “Open Door”
- action: “IGNORE”
title: “Ignore”
- wait_for_trigger: # Wait for the user to click the notification button
- platform: event
event_type: mobile_app_notification_action
event_data:
action: UNLOCK_DOOR
- service: lock.unlock # Execute unlock action
target:
entity_id: lock.smart_lock # Your smart lock entity
Scenario Example 2: Doorbell Detects Motion and Turns on Light When Dark
yaml
alias: “Automatic Light On When Motion Detected at Door”
trigger:
- platform: state
entity_id: binary_sensor.doorbell_motion # Doorbell motion sensor
to: “on”
condition:
- condition: sun
after: sunset # Condition: After sunset
action:
- service: light.turn_on # Action: Turn on the light
target:
entity_id: light.porch_light
- delay: “00:05:00” # Delay 5 minutes
- service: light.turn_off # Action: Turn off the light
target:
entity_id: light.porch_light
Home Assistant Solution Advantages and Disadvantages
Advantages:
Local execution: Extremely fast response (milliseconds), can be used offline, good privacy.
Extremely flexible: Can mix devices from any brand, create complex conditions (e.g., combining facial recognition, family member geolocation, etc.).
Powerful features: Can implement notifications with confirmation, complex workflows, etc.
Disadvantages:
High technical threshold: Requires setting up and maintaining the HA system yourself. Complex configuration: Obtaining the Local Key and the initial integration process requires a certain level of technical expertise.
Summary and Recommendations
For simplicity and convenience: If you want a plug-and-play solution, ensure you purchase door locks and lighting fixtures from the same Tuya ecosystem and use the official Tuya app to create automations directly.
For the ultimate experience: If you are not afraid of technical challenges and want a faster, more stable, and more private smart home experience, Home Assistant + Tuya Local is the irreplaceable ultimate solution, but this requires considerable learning and debugging effort.
Regardless of which solution you choose, please prioritize security. Be cautious when setting up unconditional automatic door opening. It is recommended to combine multiple conditions such as time and identity verification (e.g., video intercom) to build automation scenarios, ensuring the safety of your home while enjoying the convenience of technology.