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

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.

If you are using the app on Android, you can actually view the last 25 notifications with the following URI:
settings://notification_history

Or via the companion app:

Edit: Ah I see, I misunderstood the original query from @grampasso-lento. Thank you @Herr.Vorragend for replying to the message and allowing more insights to what pushover does.

Unfortunately, it’s not possible to use this blueprint to send notifications via other services at this time, due to the vastly different data payloads required.

I just wanted to say why I don’t use the HA notifications. I am happy with my Pushover integration. I have duplicated the notifies with different sounds, priorities and persons.

I do not use your blueprint. Not necessary to adjust your code (for me). BTW: I like your idea!

I am using an iPhone. No history in the companion app there. :disappointed:

1 Like

i was playing aroung with this script, and almost everyting is working, except the send to multipe mobile phons.
To get this working i tried to solve this using a group made in the config.yaml:

notify:
  - platform: group
    name: alle_mobieltjes
    services:
      - service: mobile_app_nothing_phone_2_pim
      - service: mobile_app_a065

When i test this by calling the servive from the developrs tools, its working fine, but when i tried to use this in the "Service to notify " like : notify.mobile_app_alle_mobieltjes it tells me that it failed to call the service unable to find service.
So what did i do wrong :thinking:

Hey @TheCosmicGate, thanks for trying out the script.

Unfortunately, the script really isn’t intended for sending to more than one device as that would interrupt with the timeout functionality (which is a core feature).

However, if you still do want to proceed, you can refer to this post where Joseph has kindly shared his modifications based off an earlier version of the script.

I think that his modification is very elegant and would work well with the latest version of the script to send to multiple devices.

Edit:

:test_tube: Experimental: Version 1.6.1 - Multi-device

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

:memo: What’s New

Since this has been requested quite a few times, here’s a variant of the blueprint that sends notifications to multiple devices.

  • :busts_in_silhouette: Send notifications to multiple devices.

:mag_right: Things to check after updating:

  • As usual, existing scripts should be loaded.
  • Script should show Version 1.6.1 - Multi-device .
  • Check the Device(s) to notify field.
🙋🏻‍♂️ Show/Hide: Help - I can't see any device selection in the `Device(s) to notify` field.
  1. Edit your script in yaml mode
    image

  2. Remove the notify_device field in the yaml
    image

  3. You should see the dropdown selectors now after switching back to the visual editor.

Version 1.6.1 Multiple Device - 31 Oct 2023

  • Added: Experimental Multiple Device Support
2 Likes