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

Will chat with you over direct message!

Thank you for the quick processing.
I have tested it briefly with a camera at my house. Works flawlessly! Thank you!
Unfortunately NabuCasa is very slow right now and the notifications take more than 15 minutes… otherwise I could have tested more.

Hey @Yannik, thank you so much for confirming!
Was excited to see how the camera feature would pan out for you.

I’ll be doing some cleanup and testing before releasing a stable version.

I’m curious, however, do the notifications send slowly only with the camera entity attached for you, or all the time?

Thanks!
The delay probably came from NabuCasa. Today, notifications arrive within seconds, whether with or without a photo.

1 Like

So I did some more tests:
With a snap, no message is displayed. Just the title and subtitle.

Very good: if the camera is faulty, the message is sent without a snap.

I hope this will help. Thanks!

1 Like

:new: Camera Snapshots: Version 1.5

:link: Github Link :male_detective:t2: Compare Changes
See full changelog and historical changelogs here.
As usual, new additions are optional, existing scripts should not be affected this release. :crossed_fingers:t2:🫳🏻🪵

  • :camera_flash: Send notifications with snapshots from camera entities!

  • :iphone: Users for whom devices do not show in the selector, the script now supports triggering the service by name now.

  • :broom:Updated and cleaned up input descriptions and blueprint description.

How to update

Things to check after updating:

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

Thanks for the script,

question, once i use my phone to confirm the notification, it doesn’t remove the notification from the phone but instead it trigger another notification to the phone again. Do i just have to wait for it to time out and then swipe it away?

here is the log when I tried to swipe away the notification after confiming the action.

Notification - Garage Door Open turned on triggered by automation Garage Door Open Notification triggered by state of Garage Door

11:45:50 AM - 21 minutes ago

:bell: Notifications started triggered by automation Garage Door Open Notification triggered by state of Garage Door

11:45:50 AM - 21 minutes ago - Traces

Notification - Garage Door Open turned off

11:45:50 AM - 21 minutes ago

Garage Door was closed

11:45:47 AM - 21 minutes ago

Notification - Garage Door Open turned on triggered by automation Garage Door Open Notification triggered by state of Garage Door

11:45:43 AM - 21 minutes ago

:bell: Notifications started triggered by automation Garage Door Open Notification triggered by state of Garage Door

11:45:43 AM - 21 minutes ago - Traces

Notification - Garage Door Open turned off triggered by automation Garage Door Open Notification triggered by state of Garage Door

11:45:43 AM - 21 minutes ago

Notification - Garage Door Open turned on triggered by automation Garage Door Open Notification triggered by state of Garage Door

11:45:39 AM - 21 minutes ago

:bell: Notifications started triggered by automation Garage Door Open Notification triggered by state of Garage Door

11:45:39 AM - 21 minutes ago - Traces

Notification - Garage Door Open turned off

11:45:39 AM - 21 minutes ago

Thanks for trying out the script! Well it should not trigger another instance of the script unless it is being called by another automation. There might have been a loop between your notification script and the automations using it, or it might be a miss on my end as well.

There are a couple of things to check, I have dropped you a direct message, we can debug it together.

Hello and thank you for creating this blueprint.

Sorry if my questions is noobish but where do I choose for example this
sensor “binary_sensor.lumi_lumi_vibration_aq1_vibration” ←
I want that I get a notification when the state of this Sensor changes.

Hey there @IssaSFX, thanks for checking out the blueprint.

First, you’ll have to craft a 🔔 Notifications script using this blueprint.
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

After you’ve setup the notification script and have tested it with your device, you’ll be ready to create an automation. You can find the automations page here:
Open your Home Assistant instance and show your automations.

To use the script in the automation, you simply have to use the Call a service option in the Actions section of the page.

Hope this helps point you in the right direction.

1 Like

perfect thank you for the pointings, i will follow thru.
can you maybe give a short advise how i can test the script?
i importet the blueprint and setup the script.
Do i just run the new notification script to get a notification?

KR

@IssaSFX, you’re on the right track!

After you’ve created your script, you can simply test the notification without any automations setup.
Simply go to the script you’ve created, and select Run script from the menu button (three vertical dots) on the top right of the page.

You can perform a similar procedure to test the notification action on your automations.

As for the triggers and conditions of an automation, it’s a little more tricky to test automation conditions - that will have to depend heavily on how you are using your sensor and the conditions you’ve set. Might not be able to advise you fully regarding those.

P.S. I just realised there’s a leak in the screenshot. :wink: New features brewing and under testing phase.


P.P.S - When testing your notification script, it is sometimes useful add notifications to the same device in the option actions and timeout actions so that you get a feedback on your device after clicking on a notification action. Gives you immediate feedback on which action has been performed.

You can do so by calling the notify service in the action of the script itself.
Example:

1 Like

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: