I have this setup with frigate on HA, but it’s so flakey.
I cannot seem to find any help on sending an image when triggered. Any help please?
This is using the companion app: (I didn’t write this, just lifted it from the docs). You would just need to call the snapshot service and save the file to a media folder. Then you can attach it.
automation:
- alias: Notify Mobile app attachment
trigger:
...
action:
- service: notify.mobile_app_<your_device_id_here>
data:
message: "Something happened at home!"
data:
# an example of an absolute url
image: "https://www.home-assistant.io/images/default-social.png"
# example of a relative url
image: "/media/local/image.png"
# the same works for video
video: "/media/local/video.mp4"
# and for audio
audio: "/media/local/audio.mp3"
thanks, but cannot get it to work. My camera is called front_garden, how does it know to look at that?
You would need a service call to camera.snapshot
in the automation before sending the notification.
I’m mobile right now, so I can’t type out the YAML, but I can when I get back to my computer this evening (or someone else can code it up :)).
sticky: true
notification_icon: mdi:doorbell
image: /api/camera_proxy/camera.front_door
channel: doorbell
actions:
- action: URI
title: Open Camera
uri: /lovelace/cctv
This is how I got mine working for my android phone, its showing front door twice in the camera entity as its the name used for the camera in my synology nvr setup and the area in my HA setup when first setup so I just edit the entity to correct it.
The doorbell channel is auto created in the app and its in the companion app where you tell it what audio file to use for the chime (the file must be saved to the phone to work), I have yet to work out how to have it bypass silent mode via critical state and preset a volume on the phone to play the chime then mute again.
edit update: I have worked out how to get the chime working on android when the HA notification comes up without a specific filter set to the notification using tasker:
You first create a new event with the following dedicated to HA:
Then for the linked task you use the following to control the audio level of the phone and to play the chime file, (as you are setting the ringer volume it’s playing the file directly not tied to whats set in the companion app):
To have a specific file play for each notification channel/type you need to make sure that the Notification 2 Title option is selected in the If field for that specific alert and have the title you set from the notifications action in HA is exactly the same to trigger it:
I’ll check it out. I’m on iOS though.
Should be a bit more straight forward when it comes to iOS since you can or should be able to use the critical and volume modifiers in the data directly, on android not so much in this specific use case.
I updated my previous reply for others on android after I was wracking my head around best way to do it the easiest way.
You can also use the entity_id: field under image to have a live feed show in the notification on iOS, android is limited to just image snapshot but the action event works on both to pull up the page with all the feeds you have.
Where do I put this please?
data field of the call service action notifications: send a notification via yourphone
thanks. Thought so lol