Push Notifications now available!

Pictures in portrait mode? I have managed to get my camera snapshot into the notification using below, but when expanding full size, I only get half of the picture. My security cam create portrait picture and it seems the “full size” image is expanding by width, not height. Is there a way to get the “full, portrait mode” picture in the notification?

data:
actions: null
image: https://xxxx.ui.nabu.casa/local/images/snapshot.jpg
message: Arrival at the front door!
title: Arrival

I would like to send a picture in a push message. unfortunately not send. why?
2020-02-12_132154

You need the full url of the image, so it would be something like:

message: Rings
title: Gate
data:
  image: http(s)://home-assistant-url/local/cam_captures/snap1.jpg

If your Home Assistant instance is available externally you should use the external url, otherwise the image will only be displayed when you are on your home network.

1 Like

I can confirm that for @rufiik, mine is completely locked down and the notifications work wonderfully! (Thanks @robbiet480!)

in this format, it works.
thank you

You need to supply an image in 2:1 ratio…this is a android thing so not much we can do but send a proper image

1 Like

Thanks. I managed to find a workaround. By using “ClickAction”, I now get the full image on my phone. As the new image overwrites, I sometimes need to refresh to get the latest image, but it works OK.

data:
actions: null
clickAction: >-
https://xxxx.ui.nabu.casa/local/images/snapshot.jpg
image: >-
https://xxxx.ui.nabu.casa/local/images/snapshot.jpg
message: Arrival!
title: Arrive

1 Like

Thanks for sharing. Had the same use case.

I had this working great last week and receiving notifications to my phone no problem. Then then I tested it last night notifications no longer work and I am also having the same error message.

Refresh issue can be solved with unique link…

here is an exact example :

https://xxxxx.ui.nabu.casa/local/images/snapshot_camxx.jpg?{{ states.automation.your_automation_here.last_triggered }}

1 Like

Try to start fresh with the app if you find notifications are not working, something probably needs to be cleaned up

So I just tested the cached image issue you were talking about. I have a simple script setup that will take a picture from a camera and it uses the same name. Calling the script shows the updated image in the notification, and not the old one that was sent. I can tell its a new image by the timestamp taken from the camera. Is it maybe cached if you send them back to back or something?

Did you use a local path or url?

External URL is all that is accepted at this time. We can’t use the local path yet.

Also, I had this issue with html5 platform, not yet tested it with these notifications… But if I read other user comments about refresh issue, I think it’s the same issue i had with html5… It was always a cached image if I used the url link…

Same behaviour if you browse to a website with chrome… It displays the cache

So i just turned on the lights in the room to see if the image would change when I called my script and the updated image showed up immediately so it does not appear to be a cached issue here.

This is the test I am running: https://github.com/dshokouhi/Home-AssistantConfig/blob/bb259e6ed24f5cfd7c29ffc58424af1875e579be/scripts.yaml#L315

Also since we spoke the other day about ttl and priority I have yet to see a delayed notification. The show up within 5 seconds, including images :slight_smile:

Yeah, testing it also, seems indeed better with priority and ttl setup…

But as I said, I had it with html5 , with this platform not tested yet… But it seems logical if it’s based on html5 , no? It’s an expected behaviour to show cache if the image comes from an http link…?

Maybe it’s because of the priority and ttl that it’s not using cache? :wink:

They may be similar but to my understanding mobile_app does things in a different fashion as we have our own FCM push repo that handles the messages.

Ok, gonna test again, without my unique url, cause I now just copy pasted from my working pushover notifications :wink: , so didn’t change my code