Show camera snapshot when alarm to HA app

Hi, may i know how can i push the snapshot into HA app notification whenever my home alarm is triggered? I have multiple Xiaomi Dafang and Foscam camera.

Thanks in advance.

Sorry I’m not home so i won’t be able to format this use
service camera.snapshot
entity_id: camera.mycamera
filename: www/snapshots/mypic.jpg
then send it with
service notify.mobile_app
image: ‘https://mywebaddress/local/snapshots/deck.jpg
message: This is my picture

Lots of good info on how to do this here:

That’s a nice information, serves my need. Now, i just need to figure out where will my camera store the image.

You define that in the camera.snapshot service call:

I can’t seem to be able to get images to show up in notifications, doesn’t matter what I try.

This is my code (using nabu casa):

      - service: camera.snapshot
          entity_id: camera.hikvision_cam
          filename: '/config/www/images/frontdoor.jpg'
      - service: notify.mobile_app_sm_j530y
          message: "Motion detected at door {{now().strftime('%H:%M %d-%m-%Y')}}"
            image: ""

Any ideas? It works fine with other external (non-nabu casa) links…

            image: ""

the www folder in your config directory is just local so no need for the extra part

I think you can use relative paths, so you can also use:

image: "/local/images/frontdoor.jpg"

This avoids it loading the image from the external URL when you are on the local WiFi.

you can, I was just pointing out what was wrong with the URL :slight_smile: its also documented on the site that I linked to up above

Awesome - thank you. I know it’s something simple but after a few thousand lines of yaml over a couple of years it’s something I never picked up…

Can you send multiple images in the same notification? i.e. I have 8 cameras and would like to send all 8 snapshots when the alarm goes off but I am only able to send one at a time.

only 1 at a time

Thought that might the case, thanks