Setting Up Automated Notifications with Camera Integration

Hi everyone! I’ve been working on setting up automated notifications with my doorbell camera, and I wanted to share my experience in case it helps anyone else. The goal was to receive a notification on my phone whenever motion is detected, complete with a picture from the camera. It’s been a bit of a learning curve, but I’ve got it working smoothly now!

First, I configured the automation using the Home Assistant platform. The trigger is based on the motion sensor detecting activity, and it sends a notification through the notify service. Initially, I noticed that about 1-2 times a day, the notification would come through without the image, which was a bit confusing. My wife, who also has the same setup, never had this issue, so it was puzzling.

After some research and checking the logs, I realized that the problem might be related to the image URL or the way it’s being processed. I adjusted the configuration to ensure the image path was correctly formatted and tested different notification channels. Eventually, the issue resolved itself, and now I consistently receive notifications with the image attached.

Here’s a snippet of the automation setup I used:
yaml
alias: Doorbell Motion
description: ‘’
trigger:

  • platform: state
    entity_id: binary_sensor.doorbell_motion_detected
    from: ‘off’
    to: ‘on’
    condition:
  • condition: template
    value_template: >-
    {{ (as_timestamp(now()) - as_timestamp(states.automation.doorbell_motion.attributes.last_triggered | default(0)) | int > 60)}}
  • condition: time
    before: ‘22:00:00’
    after: ‘06:00:00’
    action:
  • service: notify.all_phones
    data:
    title: Motion Detected
    message: Front door
    image: /api/camera_proxy/camera.doorbell_cropped
    ttl: 0
    priority: high
    mode: single

I also found that using the camera_proxy endpoint for the image source was crucial for ensuring the image loads correctly. If anyone else is experiencing similar issues, double-checking the image URL and ensuring it’s accessible might help!

Overall, this setup has been a great addition to my home security, and I’m happy to share my experience. If you have any questions or need help troubleshooting, feel free to reach out!

Cheers,
[Your Name]