Delete me 10char

I’m working on a solution to this.
To get the last event image I’m saving the url in input_text, and then I’m using this input_text as the url for a static_image in a “generic camera”, following this example for a dyamic url Template inside a Picture Entity Card - #2 by Noto
Then I’m using a picture-card connected to this generic camera in a lovelace view.
What do you think about it?

I have a question wrt to the “Motion / Smart Detection Notifications” blueprint
I DO receive notification messages but there is no snapshot/thumbnail attached. Kindly advise if this is a known issue or that I might have misunderstood the instructions :slight_smile:

Hi,

I am able to have the smart detection notification working using that blueprint provided. However, when I setup the doorbell with tts notification and response, doesn’t appear to work. What Am I doing wrong?

What Service are you using for tts.speak? I was trying to use the Nabu Casa Cloud and had to change that field to “tts.cloud_say”

[UPDATE] changed the Pull Request to support generic HA Alarm.

I’ve created additional functionality for this blueprint, to support Alarmo integration.

This pull request allows you to integrate your home alarm system through Alarmo integration. It allows to specify Alarmo entity panel and arm states that act as filters as to when to send notifications. The code respects the presence filter and works together. You can specify the presence filter and/or Alarmo entity.

This helped me to unblock several additional use cases:

  1. When I & my family are away and someone is looking after the home, it does not send us a notification every time the person is in camera fields, only if the home is armed. (previously, I had to disable automation)
  2. If the home is armed for a night, I receive notification if someone is on the territory (duplicate of the automation with presence filter off, but respecting “night arm”)
  3. When both the presence filter and Alarmo are enabled, it doesn’t send any notifications to you while you are leaving or entering the house even if an alarm is set.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Pull request link

1 Like

For me, I get the small thumbnail in the notification and if I long press this notification on iOS it’s supposed to show the video clip that triggered the alert. However, it sometimes just shows a black image instead of the video…I really wish it would just show me a larger version of the thumbnail instead.

A history of the images would be great, or at the very least, the ability to show the larger version of the thumbnail on longpress. Does anyone have any pointers on how to adjust the blueprint to do either of these?

The video clips are cool when they work, but it fails enough for me that I’d rather just have the image.

If you want to watch the live stream from the notification, I suggest using a low-res stream, which you can get using the ffmpeg (go2rtc integration) via the RTMP streams. In fact, if you wait on that black screen, eventually, it will start streaming.

Regarding the history of the images, it’s stored on your Protect app, which I would use in case you need to check on something that happened instead of relying on HA.

Great suggestion regarding the stream quality…how do you configure these push alerts from the automation to pull from the low-res stream only? Yes, the black eventually loads, but I’d like quicker alerts that are more reliable, so getting that to be low-res should be fine if I can figure it out.

All of my UniFi Protect cameras in HA are set up with High by default through the Protect integration and then a WebRTC camera pulling from the Medium RTSP stream. So which camera feed is this blueprint pulling from?

Do I have to disable the High and make it so all of my cameras only have the low stream available via the integration? I’d like the ability to still have the WebRTC camera feeds to access via my dashboards in higher resolution.

For example, you set this stream

go2rtc:
  streams:
    g4_pro_med:
      - rtspx://192.168.200.200:7441/q8fWgdupi2tXdckv 

and the camera

  g4_pro_med:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/g4_pro_med?video=copy&audio=aac

Then your automation should look something like this:

  - service: notify.mobile_app_user_iphone
    data:
      title: Notification
      message: Person detected
      data:
        image: >-
          /api/unifiprotect/thumbnail/{{ config_entry_id(trigger.entity_id)
          }}/{{ state_attr(trigger.entity_id, 'event_id') }}
        channel: Motion
        icon: mdi:cctv
        entity_id: camera.g4_pro_med
        actions:
          - action: URI
            title: Open Camera
            uri: /lovelace/cameras
          - action: DISABLE_ALARM
            title: Disable Alarm
            icon: mdi:shield-home
          - action: URI
            title: HA Security
            uri: /lovelace-security/home

I hope it helps

I noticed some lag with the med resolution as well, I didn’t try the low yet.

Thank you. How do you use this with the UniFi Protect Motion / Smart Detection Notifications blueprint from this thread? I only have the options in the automation to set the smart detection and it automatically figures out which camera to show as I understand it. Are you not using this blue print and just set it up directly as you shared here?

To clarify my original message above, I’m using the Blueprint from this thread, so I’m trying to find a way to either modify it to image only or switch it to the low res stream to avoid the black screen when long pressing on the iOS notification.

I am not using that Blueprint. I think I tried it at some point, but it is very limited for what I needed. So I have done my automation on my own. If you want to use the blueprint you just need to pick the low/med res camera instead of the regular one and stick with all the other options in the blueprint.

Just ignore my last piece of the automation config.

@AngellusMortis do you know if it’d be possible to force a lower resolution feed for the push notification videos that come from the Motion / Smart Detection Notifications blueprint?

As I shared above, this automation is awesome and used across several of my cameras. However, for some reason I regularly get a black screen when long pressing on iOS to see the feed, so I’d like to see if forcing a lower resolution stream to my device improves that performance.

I’ve already gone through the UniFi Protect integration and disabled the HIGH streams and enabled the LOW streams instead. I’m also using RTSPtoWebRTC for the feeds that are in my dashboard, but I’m assuming this automation is not using that feed source.

Am I supposed to get multiple notifications or just the last one?

Should this blueprint work with UniFi Protect 2.9.16?

I am running 2.8.35

Maybe a stupid question but how do I edit the message and the title of the notification? Everything works great and it is very cool that a video is shown in the notification on iOS, I just want to edit the text in the notification:)

Edit: 1
Solved this by makeing an automation from the trace of the blueprint, gives me full control of all the details on the automation.

Edit 2:
Does anyone know why some video clips in the notification are several seconds (maybe 5-7) while some are just 0.5 seconds and sometimes there is only a static image?

Forgive me if this has been already asked, but I’m looking to:

  1. Use the license plate data as cars come up the driveway (I have a long one) to automatically open the correct garage door based on the vehicle that has the plate.

  2. If it isn’t one of my plates, then send a notification but only then.

  3. Do facial recognition and link that to persons in home assistant to know if the person is home, and to not notify me if it’s one of my family.

Is any of this possible?

1 Like

As I (also) prefer not opening remote access for anything unless really needed, I came up with the idea of handling motion & doorbell notifications through Home Assistant. Very happy to see others already solved this and the blueprints are great!

I do however have a an issue which I cannot really explain nor properly consistently reproduce: I sometimes simply do not get an image preview in the motion trigger notification.

This seems to happen more often when not connected to my local network, but I have setup the correct access to /api/unifiprotect/* and /api/webhook/* via Nginx Proxy Manager and can confirm it works, it just sometimes doesn’t.

If I trigger the automation manually after receiving a notification without a thumbnail, using the ID of that event in the Debug Event ID field… it does show the thumbnail!

Could if be the notification is send/received before the image was actually created and therefor not shown? Any other ideas? Would love to have this working consistently.

(post deleted by author)