Hello, looks like I missed this for a while, not sure if it still applies to you, but it might be interesting for others.
The way I have my E12 unit setup is by using different elements for different purposes.
- SIP for 1 way video and 2 way voice calls (when I am not at home), using 3CX free tier service
- Video stream to my Synology NAS, running surveillance station (for NVR purposes), and image analysis with movement detection notfications
- Home assistant automation to decide which action to take and send notifications
My basic idea was that, I do no need to receive a phone call when Iâm at home, and the bell chime does not need to ring and disturb the dog while nobody is at home.
This is where HA comes into play. The YAML of my automation can be helpful:
alias: Deurbel
description: Actions run when the doorbell is pressed.
trigger:
- platform: webhook
allowed_methods:
- POST
- PUT
- GET
local_only: true
webhook_id: XXXXXXXXXXXXXXX
enabled: true
condition:
- condition: state
entity_id: timer.knock_knock_prevention
state: idle
action:
- metadata: {}
data: {}
target:
entity_id: timer.knock_knock_prevention
action: timer.start
- action: llmvision.image_analyzer
data:
provider: Anthropic
model: claude-3-5-sonnet-20240620
target_width: 1024
detail: high
max_tokens: 100
temperature: 0.5
message: >-
Describe door camera image in 20 words. Focus only on persons, cars or
actions. Ignore all background of normal residential area. ignore white
station wagon (BMW), timestamp. no mention of (brick) driveway. No yapping. No
markup. For push notification.
image_entity:
- camera.deurbel
response_variable: response
- action: camera.snapshot
metadata: {}
data:
filename: >-
/config/www/snapshots/{{ now().strftime('%Y%m%d_%H%M%S')
}}_deurbel_snapshot.jpg
target:
entity_id: camera.deurbel
- data:
message: "{{response.response_text}}"
title: Deurbel
data:
entity_id: camera.e12w_profile_name
push:
category: camera
sound:
name: default
critical: 1
volume: 1
actions:
- action: Bel Deurbel
title: Bel Deurbel
uri: tcxcallto://xxx
action: notify.mobile_app_iphone_1
- data:
message: "{{response.response_text}}"
title: Deurbel
data:
entity_id: camera.e12w_profile_name
push:
category: camera
sound:
name: default
critical: 1
volume: 1
actions:
- action: Bel Deurbel
title: Bel Deurbel
uri: tcxcallto://xxx
enabled: true
action: notify.mobile_app_iphone_2
- alias: "Chime OR Dial ? "
if:
- alias: Personen Thuis
condition: numeric_state
entity_id: zone.home
above: 0
then:
- target:
entity_id: media_player.sonos_roam
data:
media_content_id: media-source://media_source/local/411521__mcmacca__samba-jingle.mp3
media_content_type: audio/mpeg
metadata:
title: Deurbel
thumbnail: null
media_class: music
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://media_source
enabled: true
action: media_player.play_media
else:
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- data:
message: " "
alias: Call
action: notify.doorbell_call
mode: single
This automation listens to a webhook, which is send by adding it in the E12 as an action to perform when the button is pushed.
To avoid messing up when people push multiple times, i have a âknock knock preventionâ, which uses a 10sec timer helper.
It uses Claude LLM model to analyse a snapshot for custom notification. For this to work, you need to include the ONVIF stream in HA to capture the image, install Vision LLM HACS addon, and you might need to modify the prompt to your needs. (you can leave this action out if you want and use a generic notfication)
From the notification I can call in to the E12 by pressing the call action (the url structure is iphone and 3CX specific)
When we are at home, a chime sound is played over my sonos, if weâre away, the notify.doorbell_call is trigered, which is an API call to the E12, to tell it to call my (softphone number).
notify:
- name: doorbell_call
platform: rest
resource: http://xxx.xxx.xxx.xxx/api/call/dial?Phone=xxx