Notification lost when tapping them

Hi all.
I just made my first notification automatition based on existing blueprint:
:camera_flash: Send camera snapshot notification on motion - Blueprints Exchange - Home Assistant Community (home-assistant.io)

It works like expected and my device recieves a notification, however when tapping the notification to get a large view of the notification (to actually be able to see the little picture), im forwarded to app mainscreen and the notification is gone and nowhere to be found.

This is perhaps default behavior with this notification type or is this a device specific issue on my side?

The Home Assistant Companion App notifications are not persistent. Tapping them dismisses them.

This is why some people move to a notification service with a history, like Telegram.

Try a long press on the notification. That may do something different.

1 Like

Android or iOS? On Android you can add sticky: 'true' when you create it and then the notification will stick around even if you tap it or one of its actions. That option is android only though, there’s no equivalent option for iOS unfortunately.

You also need to set the clickAction to the picture as well so when you click on it you get taken to the image.

Thanks for all replies.
I was testing the options provided above and the “clickaction” was the right move for me. Sticky worked as well but i was not able to get the picture in “full screen” with that way.

When providing a link to the image in the clickaction, i also realized that that the image it self is open to public without authentication through the app/webserver it self so as long as you can get a hold of the direct URL to the image, its open to everyone? Could be me that have made something bad here where the file it self is located by the automation (/local/tmp)

Can this be prevented? Its perhaps not a Android companion question but a general one instead.

Thanks

Anything in the www directory is open without auth. Things placed in the media directory require authentication. There should be a HA core doc that covers this.

Definitely, but you can’t use the blueprint.

What you’re seeing is how the blueprint you linked works. It takes a camera entity, calls camera.snapshot on it, puts the snapshot in a location that is accessible with no auth whatsoever and then references it in the notification. Basically it follows this path to getting an image from a camera into a notification. It has no options around this so there is no way to use that blueprint without having the image be publicly accessible without auth.

However you definitely do not have to do that. The section right above the one I linked shows the recommended way to get a camera snapshot into a notification. By putting the snapshot in /media/local and linking to it there instead. This works exactly the same except now the image is not accessible without auth.

Or even easier you don’t actually have to call camera.snapshot first at all, you can use the automatic snapshot option like I do. You just set /api/camera_proxy/{camera entity} as the image URL for the notification and let it handle it for you.

But the blueprint author choose not to do either of those. So if you want to use the blueprint you’ll have to request an update. Or you can make your own automation taking one of these better options.

Ill have to create a manual automation without the blueprint and do a test =) . Ill start with the easy adjustment to media directory for testing but the Auto snapshot seems like the way to go.

Thanks all for taking time to answer

1 Like

On a related note, Android 10 or 11 introduced the last 24 hours notification history for all notifications. A History button is displayed at the bottom of the pull down menu or just search Notification History in settings. Works for all notifications.

The android app also keeps its own history of notifications regardless of android version.

Configuration > Companion App > Notification History