Push Notifications now available!

@dshokouhi Think it would be possible to get ‘image’ changed to ‘image_url’ or added as a alias to ‘image’ to match the other notification services?

There is actually some discussion about that right now. The goal of this is to simplify the mobile_app platform rather than notify as a whole. However if there is a standard being used we should use that. What other platforms use image_url? When I look at discord it uses file which is under path, hangouts uses image_file everyone seems to have their own schema.

1 Like

image_file is for sending the image using the local path. It also uses image_url for sending image urls ie: https://<your HA instance>/local/yourimagefile.gif

Found the service call for it here:

Might need some kind of standardization in the whole notifications component section :stuck_out_tongue:

1 Like

Yup we do lol Make notification services more consistent · Issue #329 · home-assistant/architecture · GitHub

1 Like

Is it possible to have animated gifs animated? I tried sending a gif and it just shows the first frame.

Is there a way to open the link after clicking on the notification message? For example, go to the release notes page from an update message…

Yes use clickAction https://companion.home-assistant.io/docs/notifications/notifications-basic/#notification-click-action

1 Like

Great! Thanks for the quick reply

I want to send a camera snapshot in the notification but I can only see part of the photo. how to fix it?
System - Android

Orginal

Already answered it :slight_smile:

Do a resize first with a script and send that modified image ;(

could you help me how can i get a resized notification? What I have to do? do you have any example I would really be grateful

No, no example… But I think if you Google for a python script to resize am image, you will find enough

i cant get a picture to send for toffee!!!
i’ve tried all the following but nothing, just the text

title: "Doorbell"
message: "Someone is at the front door"
data:
 image: /local/config/www/my_image_back.jpg
title: "Doorbell"
message: "Someone is at the front door"
data:
 image: https://my_code.ui.nabu.casa/api/hassio_ingress/some random key/api/file?filename=/config/www/my_image_front.jpg
title: "Doorbell"
message: "Someone is at the front door"
data:
 image: https://my_code.ui.nabu.casa/config/www/my_image_front.jpg

but nothing seems to work i’m just calling notify.mobile_app_sm_g965f from the services tab at the moment

this is wrong the path shouldn’t contain /config/ use: https://my_code.ui.nabu.casa/local/my_image_front.jpg

1 Like

Mate your a star, pic is sending fine now.

edit: ignore comment i just need to slide it down to show full image!!!

1 Like

I’m curious what happens to notifications if the intended mobile app is inaccessible (i.e. powered off or not connected to the internet). Are notifications lost or are they queued for when phone is back online?

You’d need to poke @dshokouhi for the answer to that :stuck_out_tongue:

There is a setting in the message for how long they should be queued so I suppose they are queued :stuck_out_tongue:

There is part of it here: FCM संदेशों के बारे में  |  Firebase Cloud Messaging Just keep in mind that setting ttl to anything but 0 means the message will not be sent to the device immediately. But setting it to 0 means if it can’t be delivered it gets discarded.

:joy:

1 Like