Attach photo in notification

why not just use motion; and scp the latest image by time stamp. I can do it in a one-liner in bash.

I wonder if you can do the same with NMA? I am already setup for them.

Could you elaborate on this a bit, please?

I was wondering if you can do the same thing using NMA.

No, I meant about the bash script method.

Where would you scp the image to, exactly?

For the last year Iā€™ve been sending a trigger to a mac that grabs 20 consecutive images from an ipcamera and then used imagemagik to create and animated gif and iMessage it to me. Iā€™ll have to test gifā€™s with pushbullet and ideally pushover.

Thanks for the scripts.

Pushbullet canā€™t reproduce an animated gif. I think that it only display the first frame in the phone. The GIF is only animated on Pushbullet for chrome.

I am pretty sure you could do this easily with NMA.

Iā€™m going to try to adapt all the discussion here and instead of pushbullet Iā€™ll use Gmail Email notification https://home-assistant.io/components/notify.smtp/

Just need to configure the scripts so they place the snapshots into the correct folder for code below:

burglar: 
    alias: Burglar Alarm
    sequence:
      - service: shell_command.snapshot
      - delay:
            seconds: 1
      - service: notify.NOTIFIER_NAME
        data:
            title: 'Intruder alert'
            message: 'Intruder alert at apartment!!'
            data:
                images: 
                    - /home/pi/snapshot1.jpg
                    - /home/pi/snapshot2.jpg

First of all thank you all for the scripts shared here. Helped me out alot with my doorbell image notification!

Second I am wondering if the images is stored in pushbullet? Will I eventually run out of storage room there? I am using the Perl script you posted.

Yes, The image file is stored in pushbullet. I think that it will be available in that location during some time and not forever.
Like in whatsapp that after some time the files are not longer available to be downloaded.

2 Likes

Anyone has the photo notification script with Facebook messenger?

Thatā€™s actually a good idea if it doesnā€™t exist. Plenty of options:

https://developers.facebook.com/docs/messenger-platform/reference/send-api

thanks for the url but Iā€™m not a technical guy. But how would this work with attached photo notification? Do you have a sample yaml script which I can explore? Thnx in advanced

Im using the perl script for Pushbullet which grabs a static image from the camera url and saves it to a temp folder, then passes it to the Pushbullet script to attach it to a notification.

Donā€™t see why we canā€™t use it to perform the same task but rather execute the push notifications via the messenger api instead of pb.

The url is for anyone who hopefully has a little more time than I have right now :slight_smile:

Iā€™ll paste up my grab / send image code when I get home and hope to look into this when Iā€™m a little better placed with time. Iā€™d love to get it going myself as Iā€™m not a huge fan of the whole Pushbullet thing - just more apps on more devices and not totally reliable from my POV. Others may have had a better experience but thatā€™s just my view.

Iā€™m a network professional, and hardly a programmer, but I do enjoy the odd ā€˜dammit I must make this workā€™ coding binge till 4am here and there :slight_smile:

Cheers.

George

1980georgeg, can you share your PushBullet automation script?

Anyone managed to get images to work with Zanzito?

I canā€™t get the example script to work

been trying to attach photo from HA for a while and finally figured it out today.
I use HTML5 push component but I assume requirement is same for many other component
the api link below provide image from my camera that shows in my notifications

ā€œhttps://my_HAserver.com/api/camera_proxy/camera.mycamera?api_password=MyHAPasswordā€`

reading through api I belive thiis serves mage file vs some stream data

Care to share how you went about implementing the HTML5 push photo attachment? Iā€™m trying to do the same thing at the moment.