🔔 Notifications - Actionable Mobile Notifications Script, with optional Timeout Feature and Camera Snapshots [works with iOS/Android]

thank you for beeing so vocal :smiley:
something is broken on my end, i dont get any messages on my phone but the companian app is installed and i get all data on the sensors.

Edit: After 10-15 minutes I got the timeout message…

last edit: Icon reference: https://sfsymbols.com/. <— does not exsist btw.
It’s late and I am confused, I will dig further tomorrow haha

Regarding Option Icons:

For confirm_icon and dismiss_icon, they should be icons that exists in the Apple SFSymbols library.

You can check if they are preventing the notifications by removing these icon fields and running the notification again.


Regarding device specific fields:
As you seem to be using an iPhone, the icon field will also not apply for you as that’s for Android phones only.

You can see which fields apply to which devices in the labels of the fields.

Changes recommended for you

Hope this helps clarify!

thanky you for reply i will try your suggestions out now, just to clearfy the url sfsymbols.com does not exsist anymore, so maybe you can remove it.

1 Like

YES!!This now triggers instantly and reaches my iPhone 13 Pro Max.
image


Thank you very much :slight_smile:

1 Like

Yup thank you for pointing it out as well, I have the change on the next beta, but that release is still in testing.

New version is expected to drop in a couple of weeks once I am sure I’ve covered most of the primary use cases of the script.

:new: Action Buttons Customisations: Version 1.6

:link: Github Link | :male_detective:t2: Compare Changes | :question: How to update
See historical changelogs here.

:warning: Known Issues:

:memo: What’s New

As usual, new additions are optional, existing scripts should not be affected this release. :crossed_fingers:t2:🫳🏻🪵

  • :see_no_evil: You can now show/hide actions

  • :three: Notifications can now have up to 3 actions

  • :globe_with_meridians: Actions now support Links
    (*with caveat on Android)

  • :exclamation: iOS: Destructive - sets options to be red to indicate a destructive action.

  • :closed_lock_with_key: iOS: Authentication Required - require device to be unlocked to select option.

:mag_right: Things to check after updating:

  • As usual, existing scripts should be loaded.

  • Script should show Version: 1.6.

  • Check out and configure the new third option (disabled by default).

  • :apple: iOS users, note that you should leave the mode option blank.

  • :apple: iOS users, to disable either links or actions, just leave the respective fields empty.

  • :robot: Android users, take note of the caveats if you are planning to use the URI.

    Show/hide caveats and workaround
    • Due to limitations, android links will not stop the timeout feature from counting down.
    • Workaround: You may clear the notification to prevent a timeout from triggering.
    • Be sure that you do not have ⌛️ Run timeout action(s) when notification cleared enabled for this to work

Version 1.6 - 26 Oct 2023

  • Added: Show/Hide options toggle
  • Added: URI action options and iOS specific action options
  • Added: Third option

@samuelthng

Awesome blueprint, thank you!

I am having trouble getting the camera screenshot to work…any ideas?

alias: 🔔 Notifications
use_blueprint:
  path: samuelthng/notifications.yaml
  input:
    notify_device: 7a5cd78b94e0d952c2883b3e716f02fd
    title: Doorbell
    confirm_option_mode: action
    confirm_text: Open App
    confirm_action:
      - service: notify.mobile_app_lee_s_phone
        data:
          data:
            package_name: com.mcu.reolink
          message: command_launch_app
    dismiss_enabled: false
    notification_link: app://com.mcu.reolink
    attachment_type: camera_entity
    attachment_camera_entity: camera.doorbell_snapshots_main
    importance: high
    visibility: public
    message: Motion Detected!
    confirm_enabled: false
    clear_on_timeout: false
    timeout:
      hours: 0
      minutes: 5
      seconds: 0
    icon: phu:reolink-doorbell
icon: phu:reolink-doorbell

Hey @Ldc2335 thank you for trying out the script!

This is a great chance for me to ask, is the image not sent to the notification?

Secondly, could you navigate to this page:
Open your Home Assistant instance and show your state developer tools.

And send me a screenshot of what can be seen in this field:

Feel free to message me directly instead if it concerns some private information that needs to be redacted.

I did not have a camera myself when I implemented the snapshots feature and built it based on documentation purely, so it would be a golden opportunity to get real usage information wherever I can. :+1:t2::pray:t2:

Thank you, PM sent.

:beetle: Bugfix - Camera Snapshots: Version 1.6.1

:link: Github Link | :male_detective:t2: Compare Changes | :question: How to update
See historical changelogs here.

:memo: What’s Fixed

Existing scripts should not be affected this release. :crossed_fingers:t2:🫳🏻🪵

  • :beetle: Issue was found with camera snapshots template
    Huge thanks to @Ldc2335 for letting me know and helping me with the debug process!

:mag_right: Things to check after updating:

  • As usual, existing scripts should be loaded.
  • Script should show Version: 1.6.1.

Version 1.6.1 - 26 Oct 2023

  • Fixed: Camera Snapshots not showing
1 Like

Awesome! Working perfectly now!

If anyone needs it for android, the path to open the reolink app is: app://com.mcu.reolink

1 Like

Whoa. Can you share your entire setup for this automation? I need this!

All you have to do is import the blueprint for this script. Open it, then fill out the fields that you need for your devices and options (if any).

One done, run it and make sure it works. Once it does what you want, create a basic automation that triggers this script when motion is detected by your camera.

For me, most of the fields are blank as I did not want or need any “options.”

All I wanted was a screenshot on motion, and to open the reolink app when I tap it. It is capable of much more.

It’s been working great.

I’m new here, so I don’t really understand what most of this means or how to do most things yet, but is it possible to send the snapshot to an email instead?

Hey @zombies.aaargh,

Firstly, welcome onboard your Home Assistant journey!

Unfortunately, it’s not possible to use this blueprint to send emails.

You can however check out the SMTP Integration which adds a notify service to Home Assistant that allows sending notifications via emails.

You’d have to add the integration to your setup, then create an automation, calling the notify service provided by the SMTP Integration when something happens.

High level overview:

  1. Add and configure SMTP Integration.
  2. Add automation based on your requirements.
  3. Trigger notify service provided by the SMTP Integration.

According to the SMTP Integration documentation, it does seem possible to send images.

Trying to import this Blueprint (first blueprint) and getting the following error after hitting the “preview” button:

Invalid blueprint: extra keys not allowed @ data['blueprint']['input']['confirm_icon']['selector']['prefix']. Got None extra keys not allowed @ data['blueprint']['input']['dismiss_icon']['selector']['prefix']. Got None extra keys not allowed @ data['blueprint']['input']['notify_service_name']['selector']['prefix']. Got None extra keys not allowed @ data['blueprint']['input']['option_three_icon']['selector']['prefix']. Got None

Hello @trobnc,

Welcome to the community, and thanks for trying out the script.

I have tried to import the blueprint using the first link on the page on a clean system without an existing blueprint, did not encounter the issue you faced. The script also does not have syntax issues at the points listed in the error above according to the text selector’s documentation. The prefix feature causing the crash listed was added just 3 months ago it seems, so it’s a fairly fresh feature.

My guess is that you might be using an older version of Home Assistant that does not support the required selector options, it might just be as simple as an update to fix the issue.

Maybe to help us identify the issue, I would need your assistance to check through a couple of items:

  1. Have you used this blueprint before?

  2. Could you post a screenshot of your Home Assistant version?
    You can get the version information here:

    Open your Home Assistant instance and show your Home Assistant version information.

I’ve read the document in the link but I’m afraid that it’s mostly Greek to me.

I understand the meaning of the individual components such as the variables and the procedural calls but I don’t understand how to put them together to make something usable. I think that I’m probably getting the nuances of the syntax wrong more than anything else.

Is there there a full functional example somewhere that I can just copy and paste in to the right place?

I’m only really experiences in OO coding that’s completely agnostic to things like capitalization and layout, so I’m struggling here.

Hey @zombies.aaargh apologies if the link was too cryptic. :sweat_smile:

Well, the topic at hand is a little out of scope of this blueprint. In general there are three moving parts at play.

  1. SMTP Integration - Synonymous with a configuration file you’d have on other programming languages.

  2. Notify Service (provided by SMTP Integration) - Synonymous with a function.

  3. Automations and scripts that calls the Notify Service. - Synonymous with a daemon or program that has been configured to execute a service in its life cycle.

Note that the examples used are only intended as a thought guide and are in no way representative of what they actually are.

I have highlighted the important terms in bold, hopefully this makes sense to you. It’ll get easier as the terms become more familiar to you. YouTube tutorials help a lot as well. I’ll plug a Home Assistant related YouTuber whose content I enjoy here.

Because the Pushover-App has a history.
In HA it is not possible to find an already read notification.

I like Pushover and I am using is since years.