Notification attachments not working for me

I have never been able to get image attachments to work. Dynamic camera feed works fine but not images. I’ve tried JPEG, PNG, and GIF. Any ideas what might be wrong with my setup? HA .46, iOS 1.04

action:
    service: notify.ios_iphone6s
    data:
      message: "Front Porch Motion Detected!"
      data:
        attachment: url: https://upload.wikimedia.org/wikipedia/en/2/24/Lenna.png
        content-type: png
        hide-thumbnail: false

This is also not working for me with a similar setup. I tried all the camera image options and then just trying a default web image with no luck.

I’m throwing in the towel. Still no idea why this fails and no one on the forums offering ideas. I guess I’ll revisit in a few releases. Bummer.

I have the same problem, did any of you get i working?

I have seen other threads on the same issue that did not seem to get fixed either.

Try putting the “url:” on a seperate line, not behind “attachment:”. And push url, content-type and hide-thumbnail two spaces to the right.

attachment:
  url: http://url.com/image.png
  content-typ: png
  hide-thumbnail: false

I am specifically interested in getting the camera snapshots attached. But I guess I can try an image URL just to see what happens.

If I understand it correctly, the attachment must be an image URL accessible from the internet. Local files won’t work.

Read more about it here.

I have it working by a bash script that uploads image files to an FTP in a folder accessible from the Internet.

I would rather not expose anything online like that.

What I don’t understand is that according to the docs it should work getting the camera snapshot attached without doing anything than just adding in the config lines with the category of camera.

I don’t think apple allow for actual files to pass through their notfication servers. I think they link to the attachment and your phone download it. If you would like to use a service where you can attach actual files, try something like Telegram.

According to this: https://home-assistant.io/docs/ecosystem/ios/notifications/content_extensions/ and Camera Stream section it should work.

1 Like

Force touch needed to be used… but the stream only works once for some reason. Then I have to restart my phone to get it working :frowning:

this still isnt working in 2022!
i found that if i added my external url to clickAction: then it worked but this is just a fudge on yet another broken element of home assistant

service: notify.mobile_app_samsung21
data:
message: Click to see snapshot
title: Hall snapshot taken
data:
url: >
https://nabu.casa/local/cam2.jpg
clickAction: >
https://nabu.casa/local/cam2.jpg

Use relative URLs like the examples in the docs instead of the full URL

Edit: your format is not correct too, I take it you didn’t read the docs completely?

please don’t misunderstand.
i of course followed the doc first with local urls and confirmed that files existed on each try before seeing it fail when posted as a notification.
the result is just the end of many variations.
are you commenting because you have a working setup that you can share a working example that can be posted into services ?

I am commenting because I am one of the contributors to the app and both features image and clickAction works as intended when the format is followed correctly.

Examples for using the proper image attribute as url was no longer used a while ago.

https://companion.home-assistant.io/docs/notifications/notification-attachments#example-service-call

Example of using clickAction: https://companion.home-assistant.io/docs/notifications/notifications-basic#opening-a-url

in retracting my steps to post my exact steps taken i noticed that i had used url and not image. i think today is my monday

1 Like