UniFi Protect Blueprints

Standard at the moment, but I’ll look into the webrtc since Alex makes it sound better to use. :joy:

Because the standard feed takes some time, I have a message I can send saying it takes a while for the stream to load. :wink:

I wasn’t referring to the one you made, but basically all blueprints related to this. Having a feed per tag and showing that on the page should be do-able right? The blueprint related to Hue could be shown on the Hue page, etc. Search for the correct blue print is more effort then it should be I believe. But that’s for an other tread I guess. :joy:

No I only need one URL. I mean I have a VPN for the ProtectApp because it’s slow. That by-passes the cloud and it’s really fast then. Hench why I have a link to it on my HA page for the doorbell. I setup a DNAT for the internal URL. That fixed the issue I have with sending the feed to my hub when I’m home.

I have it in a separate one now. But since the list of automations is becoming quite long I kind of want to group it all in one. Have a grouping option for scripts would help so I can just call them one by one in an automation. But have that long list at scripts. For instance one for updates. Since I can’t do them all at once if there are more then one, I’d need to plan time in between the options. :face_with_monocle:

If you don’t use locks it shouldn’t take much effort to swap the lock out with a cover option.

Yep. Not allowed to post my own blueprints on the integration docs. Even though the official place for sharing blueprints is this forum, I am not allowed to link to this forum from the docs. I am surprised they even let me link to Ubiquiti’s documentation.

Hello, I am currently the smart detection notifications with 2 G4 Bullet and it works fine with the camera streams via nabu casa connection and notify via APP.
But the visualization of the stream is qute slow.
Is it possible to get a Snapshot of the camera in the notificaton instead of the camera stream?

The notifications already use a snapshot.

I have a problem with configuring doorbell notifications to show images. blueprint says:

  • A valid HTTPS certificate and public facing Home Assistant instance
    - If you do not have these, the actionable notifications and images will not appear in the notifications.
    - You do not need your whole Home Assistant to be publicly accessible. Only the paths /api/camera_proxy/* and /api/webhook/* need to be accessible outside of your network.

Could you please help me to understand how to do this configuration? (Currently HA instance is completely locked by pfsense)

Thank you.

Thank you, but I still get a video clip in my notification. I am using nabu casa cloud and iOS App.
Do I still need to make /api/camera_proxy/* and /api/webhook/* need to be accessible outside?
How can that be done?

In my HA media folder I find the clips but no snapshots. What am I doing wrong?

At “(Optional) Base Image URL” I put my nabu casa URL, right?

Hey Folks,

Struggling to find out why my G4 cameras are not configured for Detect Object sensor when they are configured in Unifi Protect with Smart Detections. I am hoping it’s something simple I haven’t enabled so I can take advantage of these great Unifi Protecf Blueprints. Any ideas??

Thanks

PJ

Updated the blueprints to take advantage of all of the features that have been added to Home Assistant and the UniFi Protect integration since I originally created these. This is a breaking change, so the blueprints have been removed not to conflict with the old ones, but I recommend you upgrade to using the new Blueprints before v2022.3.0 as the “Detected Object” sensor that the old Smart Detection blueprint depended on will be removed.

v2022.12.0 added a bunch of new Binary Sensor for each possible detection type (Motion, Smart - Person, Smart Vehicle, etc.). All of these sensors are named in format of {type} Detected (by default). This is not to be configured with the configuration switches to enable and disable each of these detection types. The new Motion / Smart detection blueprint uses these new sensors. You can specify as many as you want from as many cameras as you want to be notified about.

Summary of changes:

  • Adds video to Motion / Smart notifications and optionally Doorbell Ring notifications. iOS can also stream the camera directly. Video is only added after the event ends (for motion/smart).
  • Uses thumbnails / video directly from your UniFi Protect instance instead of taking a camera snapshot. This should make the thumbnail significantly more reliable in catching the subject of the event.
  • Simplifies Notification URL generation and removes URL options. The HA mobile app automatically handles generating the full URL using your internal/external URL settings, so you no longer need to provide them in the blueprint
  • Removes the dynamic_doorbell blueprint. This will be replaced with the new Text entity for the Doorbell in the next HA release (v2023.1.0).
  • Adds a License Plate Smart Detection Blueprint for folks capable of detecting license plates (requires AI series camera + Protect v2.7+)
  • Removes HTML 5 and Telegram notification targets. The new URLs that are being used for the thumbnails / videos require authentication. Currently only the HA mobile app notification targets are capable of signing these URLs to securely make them available without authentication. If/when the HTML5, Telegram (or other) notification targets support auto-signing URLs, I will update the blueprints.

If you still need to use the old blueprints, you can look at the history of the OP or access them on Github.

5 Likes

@AngellusMortis thanks for updating the blueprints!

2 observations that I’m working through with the change:

  1. Presence Filter appears no longer includes person entities - the previous automation I had setup used person.xyz to determine if someone is home since multiple devices were used. It appears this blueprint requires selecting one device. What would need to be changed to include person entities?

  2. iOS Notification no longer shows thumbnail - I’m getting an error in the thumbnail on iOS, but if I click into the notification it shows the video feed. Any pointers on how to restore the thumbnail image?

Presence Filter appears no longer includes person entities

You are welcome to make a PR to add person as well to the list of domains for the presence filter.

iOS Notification no longer shows thumbnail

I am providing the image and the entity. So, if it is not showing the thumbnail, it sounds like a HA core issue you will have to open, or it is a configuration issue on your end. The thumbnail URLs are different than they were before.

Thanks.

Correction - I think the iOS notification thumbnail issue was because I was forcing a trigger in the UI of the automation, but if it happens on its own the thumbnail comes through.

Thanks for the updates, will the doorbell text blueprint be coming back now that 2023.1.2 is out?

I think I am having similar issues to some of the ios users but on android/telegram. I get notifications but no thumbnails. in the old setup you had to tell the blueprint what your external url was but now you don’t? i am not quite sure if i am doing something wrong or this isn’t working 100% yet.

It now automatically uses the external URL configured in your instance. Thus, why the new docs say you need to have it configured right.

What an amazing blueprint - well done AngellusMortis!

I’m just a bit confused by the code since it is way more complicated than my old automation for sending images on motion :slight_smile:

One problem I have is that it doesn’t work too well consistently with my smart watch (Samsung Galaxy Watch 4 together with a Pixel 6). I can’t really put my finger on why but sometimes I don’t have an image in the notification on my watch despite having it on my phone. I guess it has to do with the mobile_app_notification_cleared, I can see the image initially when I get the notification but then in the next notification replacing the first one it is sometimes gone, but it is all very inconsistent.

Is there a way to simplify this so that the notification isn’t updated several times, my watch vibrates several times for each notification because of this.

Has anyone experienced the same?

Edit:
Been running in and out to trigger the cameras now (can I debug and test it somehow) and this is my finding:

  1. When the motion is triggered I get an image to my watch with the full image, so basically a snapshot from the camera. Image “1” below.
  2. When the motion event is over the notification seems to get updated with the small thumbnail zoomed in on the object causing the camera to go off together with a video clip (animated gif kind of style). Image “2” below.

#2 above causes the notification on my watch to update so that I only get the zommed in thumbnail as an icon for the notification, the actual image thatused to be shown below the message is gone, maybe because the watch can’t show the animated image.

I guess thie is related to my watch because on my phone it looks good. As long as I look at the watch before the first notification is replaced it’s all good. But if I miss it and look first after the notification has been updated then I get a very tiny image of what happened.

Not sure there is anything to do about it but if you have any thoughts or input @AngellusMortis please share :slight_smile:

1 Like

Hey @AngellusMortis, what an incredible blueprint. I’ve got nearly everything working with my G4 Pro.

Question for you: For TTS, I’ve got the google_translate_say service filled in; however, it never triggers the TTS to play when I unlock the door or press “Respond” from the HA actionable notification on my iPhone.

From the developer tools, if I do a ‘tts.google_translate_say’ service call to ‘media_player.front_door_speaker’, the audio plays with no problem on my doorbell. But the blueprint doesn’t call it. Could it be something with the naming of the media player?

Actionable notifications require /api/webhook/* externally and if you are using Nabu Casa, I think you have to whitelist it as well (I do not actually use Nabu Casa).

Understood. It doesn’t look like the externally accessible webhook URL is the issue. To test, I setup a IFTTT trigger that plays TTS (via google_translate_say) through the doorbell when triggered–that works without issue. To be clear, I see the actionable notification with the video thumbnail. I am able to unlock the door using the notification, but the TTS script(s) doesn’t play through the doorbell.

Would it matter that the doorbell’s speaker is named: “media_player.front_door_speaker” and the doorbell’s binary sensor is “binary_sensor.front_door_doorbell”? (I don’t see anywhere in the blueprint where to specify the G4 doorbell’s media_player entity.