API URL as Attachment

Im am trying to get a picture from my Generic Camera sensor to show as an attachment in an iOS notification, this is allowed and doable?

My code seems correct but i dont get the image on the notification, if i browse to the URL it does work in a browser.

Can you show the automation or payload you are sending? Thanks!

Hi Robbie,

I think this is fixed actually, i wasnt suppling the content-type but if i put jpeg it seems to work. Ill monitor it and report back if its still broken.

Thanks

1 Like

How did you to about exposing the camera image?

I am using some generic camera objects right now… Obviously these can be seen externally VIA an authenticated connection to HASS.

I would really like to attache a point in time image or a live link to the camera when the doorbell is run so if you open it on iOS you can immediately see who is there.

Is there a HASS native way to link to the camera for this or are you just using something the camera publicly exposes or automating an image upload?

The camera image for me is an external URL - it wasnt working without telling the notificaiton it was a jpeg.

However you can send out local camera via the RESTFUL API - https://home-assistant.io/developers/rest_api/

For example: https://address.domain/api/camera_proxy/camera.[name]

You would also need to add ?api_password=yourpassword to the URL for it to work externally however i didnt like having that because i coudnt use a secret in my yaml