I have an automation that records a short video when motion is detected using my Reolink doorbell camera. I have been using this automation for over 1 year without issue. Recently it has been failing.
Each time it fails, I see the following in the Trace Timeline:
Triggered by the state of binary_sensor.doorbell_person at January 9, 2025 at 8:37:02 AM
Test Test if template renders a value equal to true
Perform action 'Camera: Record' on Doorbell Fluent
There are many additional actions that never occur because the ‘Camera: Record’ action hangs and never completes.
How can I find additional information to diagnose why this is happening?
Below is the full automation:
alias: Doorbell Motion Video
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.doorbell_person
from: "off"
to: "on"
for:
hours: 0
minutes: 0
seconds: 0
condition:
- condition: template
value_template: >-
{{ (as_timestamp(now()) -
as_timestamp(states.automation.doorbell_motion_video.attributes.last_triggered
| default(0)) | int > 150)}}
enabled: true
- condition: time
before: "22:00:00"
after: "06:00:00"
enabled: false
action:
- target:
device_id: []
area_id: []
entity_id: camera.doorbell_fluent
data:
filename: /config/www/tmp/video.mp4
lookback: 5
duration: 18
enabled: true
action: camera.record
- data: {}
enabled: true
action: shell_command.video_delete
- data: {}
enabled: true
action: shell_command.video_convert
- data: {}
action: shell_command.copy_video
enabled: true
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
enabled: true
- data:
message: >-
Front door {{
as_timestamp(states.automation.doorbell_motion_video.attributes.last_triggered)
| timestamp_custom("%-I:%M %p") }}
title: Motion Detected
data:
notification_icon: mdi:doorbell-video
channel: Doorbell
importance: max
group: Doorbell
video: /local/tmp/video2.mp4
ttl: 0
priority: high
clickAction: /lovelace-mine/gallery
action: notify.mobile_app_chris
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
enabled: true
- data:
message: >-
Front door {{
as_timestamp(states.automation.doorbell_motion_video.attributes.last_triggered)
| timestamp_custom("%-I:%M %p") }}
title: Motion Detected
data:
notification_icon: mdi:doorbell-video
channel: Doorbell
importance: max
group: Doorbell
video: /local/tmp/video2.mp4
ttl: 0
priority: high
clickAction: /lovelace-mine/gallery
action: notify.mobile_app_tina_pixel_4a
enabled: true
trace:
stored_traces: 40
mode: single