New here and trying to install the unifi protect integration on a brand new Home Assistant Blue. I cannot find it when I search for a new integration typing “unifi protect” the page is just blank.
Can’t find it on this website either : Integrations - Home Assistant
Start testing if motion is triggered in the Protect APP - just to make sure that we should expect motion.
Then what setup do you have. Unifi Protect V? running on “What HW”
This is a Custom Integration, so you cannot find it without adding it first. Please read this and then I recommend you install HACS so that you easy can add non standard integrations.
I see the live feed on HA (every 10 seconds shot) with around 10 seconds delay (same internal 1Gbps network)
Unifi Protect 1.18.1 running on CloudKey G2+ 2.1.12
HA OS 5.13 / Core 2021.5.5 / Supervisor 2021.04.3 running on a rpi 4
Unifi Protect integration 0.8.8
I might have found the culprit of the problem. I had the “sensor.motion_recording_” entity disabled and only the “binary_sensor.motion_” activated. Now that I have both activated, the second one does updates (which I think makes no sense, but maybe there’s an explanation for that).
What I’m noticing now is that it’s very slow to get the motion event, sometimes 10sec+, and if you get a motion event, it takes much longer to be able to trigger it again just after the first one is off. Is this a know limitation?
Firstly, thank you so much for creating such an awesome component. It really does work well!
I have a couple of questions about using the person detection in an automation and I was hoping someone could help me with:
1. Thumbnail 404 error
About 50% of the time the automation is triggered my automation fails with the following error when calling the unifiprotect.save_thumbnail_image service.
Thumbnail Request failed: 404 - Reason: Not Found
I believe others have solved this by putting a timeout in before calling the service, which I have also tried and is currently set to 15s but it still currently fails regularly. Does anyone know how to implement some sort of retry for this step?
2. Trigger automation for Person Events within a smart detection zone only
I have configured a smart detection zone on the camera, but it seems that the automation is triggering for person events that are detected outside the zone as well. Is it possible to only trigger the automation when the person is detected in the zone?
This is not normal behavior. I see the binary motion sensor triggering instantly in Home Assistant. There is a delay in the Video Stream as described several times, so these might be out of sync, but motion triggering should be close to as instant as in the Protect APP.
There is not a direct correlation between the sensor_motion_recording_x and the binary motion sensor, so it surprises me that this makes the binary sensor work.
I am not really sure how to help, as I cannot reproduce what you experience. Is there anything in the Log files?
The thumbnail is created once the recording has finished, so hitting the right delay might be hard. I recommend that you use the camera.snapshot service instead, which will always work.
Motion events are not tied to detection zones, so that is expected behavior. I recommend that you test for the event_object attribute to check if it is a SmartDetection event. Something like this
With that said, this might be something I should look at. If you could create an issue on Github describing how you would prefer it to work, I will add this a feature request.
@briis , is there a way to access the UDM PRO NVR with this integration to playback recorded footage? My guess is that we can’t since you are using live streaming through RSTP stream but just wanted to check.
First off, thanks for this amazing integration!
I’ve been able to create an automation based off person & vehicle detection and its working awesome!
I do have a question though, I have a last triggered entities card, is it possible to change this to only trigger on vehicle or person detection rather than just motion?
This will be hard. The last-changed is updated every time HA detects a change in state, and that will mean also on basic motion detection.
I noticed that with UniFi Protect Application 1.19.0-beta.10 there seems to have been a change in the API, so that motion is now only triggered when the Motion Recording is NOT set to Never. That will be good for you in this use case, but not so good for people who use the Cameras as basic motion sensors.
I am still investigating what has changed, and if possible I will fix it so that it works as it does right now.
For some reason a doorbell press of my G4 doorbell is not recognised anymore. The binary sensor stays at “not detected” Only the attribute “last tripped time” changes.
I don’t have a harddisk installed in my UDM Pro…is that causing the issue? Switching the input booleans for motion detection and recording also don’t result in different behaviour (they switch back to their original state themselves)
The doorbell binary is not like a normal binary, as the doorbell by nature goes off as soon as people release the button. If the last_tripped attribute changes, then it works.
So use this in automations when it triggers the on state, and then do what you need to do.