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

Version 1.5 Beta 3 - 3 Oct 2023

  • Cleanup: Descriptions for Version 1.5 release
  • Added: Camera Entity default value and domain validation
  • Added: Prefix compatibility layer for iOS Action Icons

:warning: Please note, this is not a production release.

This beta release is meant help me find testers who have access to camera entities with video streams. Use at your own risk.


Again, thanks for testing it out @KameDomotics.

You can once again try the above script with this version, it should work right out of the box.

If you are not using the attachment_camera_entity and attachment_type fields, you may remove them from the yaml config (I’ve added checks for them anyway so the script should also work if you leave it in).

Example
alias: " Conferma Disattivazione Allarme"
icon: mdi:shield-check
use_blueprint:
  path: samuelthng/notifications.yaml
  input:
    notify_type: notify_service
    notify_service_name: inanu
    title: Home Assistant
    message: Disattivare Allarme?
    confirm_text: Conferma
    dismiss_text: Annulla
    confirm_action:
      # Fire notify service to ensure service is called, remove after testing.
      - service: notify.notify_mobile_app_inanu 
        data:
          message: Conferma Test
      - service: alarmo.disarm
        data:
          entity_id: alarm_control_panel.alarmo
          code: "1111"

I’m sorry but it doesn’t work, it doesn’t activate the action.
The test notification doesn’t even arrive

Hmm, then I’m really at wits end. 🥲

Sorry about that @KameDomotics, also thank you for trying the many variations.

I’ve checked out a few other popular notification blueprints and they use very similar methods to send the notification, so I’m really perplexed as to why it won’t show devices for your setup, nor send the notification via the notify service.

If you ever want to try debugging the issue, do feel free to hit me up in a direct message. :pray:t2:

You don’t have to thank me, I’m the one thanking you for the effort you’re putting into fixing the blueprint.
Could it be an iOS problem? Or do you need to configure something in the Companion app regarding iOS?

If you explain to me how to debug I can try it

1 Like

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