Hey everyone! I wanted to share my journey in setting up camera notifications in Home Assistant. It was a bit of a learning curve, but I managed to get it working smoothly. Here’s how I did it:
Problem: I wanted my doorbell camera to capture images and send them in notifications, but I kept getting a 404 error. I tried using the camera.snapshot service and passing the image to my phone, but it didn’t work as expected.
Solution: After some research, I realized the issue was with how I was referencing the image path. I adjusted the filename to ensure it was correctly formatted and accessible. Here’s the working configuration:
yaml
-
service: camera.snapshot
data:
filename: >-
/media/snapshots/{{ trigger.to_state.last_changed | as_timestamp | timestamp_custom(“%Y-%m-%d_%H-%M-%S”) }}-frontdoor.jpg
target:
entity_id: camera.g4_doorbell_pro_high
enabled: true -
service: notify.mobile_app_iphone
data:
title: Frontdoor Notification
message: Person detected at {{ now().strftime(‘%H:%M:%S’) }}
data:
image: >-
/media/snapshots/{{ trigger.to_state.last_changed | as_timestamp | timestamp_custom(“%Y-%m-%d_%H-%M-%S”) }}-frontdoor.jpg
Tips:
- Ensure the image path is correctly formatted and matches your Home Assistant setup.
- Check your
configuration.yamlfor any typos or syntax errors. - If you’re still having trouble, try restarting Home Assistant or checking the logs for more detailed error messages.
It’s such a relief to have this working now! I can monitor my front door from anywhere, and the notifications are super helpful. If anyone has questions or needs further assistance, feel free to ask!
Happy automating! ![]()