Open IvSan opened 2 months ago
This is supposedly fixed in Protect 5 Beta.
Fixed an issue where Smart Detection events were triggered at the end of the event.This improves the use of Alarm Manager and resolves an issue with 3rd party integrations.
This is supposedly fixed in Protect 5 Beta.
Indeed, here are the release notes under Bug Fixes:
Great news! and good on Ubiquiti for responding quickly.
Just installed the new beta and things are back to normal in terms of the specific smart detection sensors. Haven't tested everything yet, but looks good so far.
I have worked out how to downgrade Unifi Protect back to 4.0.33. This fixed the issue for me, note that I am no expert so this is at your own risk but hopefully it may save you the couple of hours that I have spent on this today ... thankfully the Test Match was on to keep me sane [cricket]!
1. Enable SSH in the Unifi Site Manager - Control Plane. Give it a password if you need to. 2. Stop Unifi Protect in Site Manager 3. Open a SSH terminal (I just use Window's CMD in administrator mode) 4. root@192.168.1.30 (whatever the IP is of your CK / CK G2+) 5. Enter your SSH password Type: 6. unifi-os shell (not needed on UCKG2+) 7. apt-get update 8. apt-get install --reinstall --allow-downgrades unifi-protect=4.0.33 -y Give it a few minutes to run... it will go back to "root@Home:~#" once complete
Go back into Unifi Site Manager, refresh your page and you are back with Unifi Protect 4.0.33 which will have already started. 9. Switch off automatic updates! And disable SSH if you so wish.
Everything then worked again for me in HA. I hope this helps!
Super nice thx a lot. Hope unifi will get this to work in a update soon.
Unifi Protect Release 5.0.20 EA has a fix for this...
See 4th bullet in bug fixes....
Bugfixes
Has anyone actually tried v5.x EA yet?
I just tried it (with v5.0.21) and this issue is not fixed. Maybe its a regression from v5.0.20 to v5.0.21?
Working fine here on 5.0.21. I also had good results with 5.0.20, but it had some stability issues for others so I went ahead and updated.
Yes, I have been up and running on it since it was released. I have had occasion for pretty much all of the smart detections (Person, Vehicle, Package) on a number of different cameras (G4 Doorbell Pro, G4 Bullets, and AI 360).
It may be worth double checking your settings (I had turned off everything but Person detections during the workaround).
I'm on EA 5.0.21 now and the detections issue appears to be fixed for "Detect person" from a few tests. I note my cameras were updated too. I don't have them on auto update, the update of Protect seemed to force them to update. I'm running with this for the time being.
Also Im on a UNVR with OS 4.0.18
I'm not sure if this is the same issue, however I'm having issues sending through numberplate info off the AI cameras, happened at exactly the same time as other people are reporting detection, which makes sense as it's just another type of detection.
My issue is that it misses around 30% of the detected numberplates via the HA integration.
Running UNVR with multiple AI Cameras and EA 5.0.21 and UniFi OS v4.0.18
@markpetrie1980 as I understand on the unifi community thread it is related but perhaps not fixed for that feature in the version I mentioned. I don't use that capability so can't confirm.
Some posts are bringing confusion. The original issue here is that smart detections don’t work since the start trigger is sent together with the stop trigger at the moment detection ends. I can confirm that today this issue is still there. It’s the Protect version that counts in my opinion. Version of Protect running is 4.1.53. We’ll need to wait for a new Protect update I guess.
Some posts are bringing confusion. The original issue here is that smart detections don’t work since the start trigger is sent together with the stop trigger at the moment detection ends. I can confirm that today this issue is still there. It’s the Protect version that counts in my opinion. Version of Protect running is 4.1.53. We’ll need to wait for a new Protect update I guess.
Check Ubiquiti release notes. It's been identified as a bug and fixed in EA v5.0.33. So now we just all wait unless you want to go to EA.
The EA version I've been running seems to have another issue with very poor response times, the CPU seems to be congested. it may even be a memory leak as the main process is consuming 12GB Memory
@sethkor This is unrelated to this issue, but try resetting Alarm Manager.
That did make a big and noticeable difference @TheJulianJES
@IvSan hi have you tried downgrading to 4.0.33? since right now there are 2 problems in this issue
UPDATED actually after I reloaded the integration, now smart detection works in HA(unifi protect is downgraded to 4.0.33)
Using the latest official Unifi Protect release (5.0.26) this doesn't seem fixed. Has anyone got it to work? On my side "start" and "end" events of person detections are still triggered at the same time. Restarting HA, reloading the Protect Integration, restarting the Unifi Console didn't help.
The latest official version is 5.0.26 and the fix was supposed to be in 5.0.20 (as the last bug fix listed here). But I'm still seing the "start" and "end" events at the same time...
The latest official version is 5.0.26 and the fix was supposed to be in 5.0.20 (as the last bug fix listed here).
But I'm still seing the "start" and "end" events at the same time...
Am I reading something wrong here? V5.0.26 is not official it's still EA.
Here is the latest official version of Protect:
There is no official release of v5.x of the Protect app yet. The latest version is v5.0.28 EA as of right now.
This backs my experience with a previous release in the v5.x branch. They said they fixed the issue but I too still saw HA events at the same time at the end of the event.
arg sorry you're right, I was mislead by yesterday's newsletter announcing protect 5.0... Anyways, it's not working on EA either. At least not in 5.0.26 and 5.0.28.
That is what I have found as well. I posted above the same results but thought it was just me as others said it has indeed been fixed in v5.x. I have since moved back to v4.0.33 as HA still doesn’t work properly in v5.x, despite ubiquiti saying it was fixed in the very first EA release of v5.x. :(
On Tue, Sep 17, 2024 at 9:16 AM Christian Daguerre @.***> wrote:
arg sorry you're right, I was mislead by yesterday's newsletter announcing protect 5.0... Anyways, it's not working on EA either. At least not in 5.0.26 and 5.0.28.
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/124967#issuecomment-2355760450, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQWJ7DMJOVFFO55HEHLWVDZXATUHAVCNFSM6AAAAABNNXKO2GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJVG43DANBVGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Anyone worked out why some people seem to have found Smart Detections are fixed (but initially turned off in Protect someone reported) with versions 5.0.21 and later but others are still having the issue up to the latest EA 5.0.28?
I'm not 100% sure but I think the bugfix in 5.0.21 is only a partial fix:
This causes the "end" event to be ignored in "single" automation mode. Moving to "queued" as a temporary workaround fixes it for me at least...
I'm not 100% sure but I think the bugfix in 5.0.21 is only a partial fix:
- The "start" event is now indeed triggered when the smart detection starts
- However there is still a "start" event triggered at the same time as the "end" event
This causes the "end" event to be ignored in "single" automation mode. Moving to "queued" as a temporary workaround fixes it for me at least...
I don’t fully get this, have you got a screenshot please? Has it been flagged to Ubiqui? The vast majority of the comments on the releases is about ONVIF so this may not be getting much attention now.
Updated to 5.0.31, person detection back to working! happy ubiquiti was able to fix it, relatively quickly
Same here! A previous version of v5.0.x still didn't fix it for me. But with v5.0.31 we had a vehicle detected in HA, and it stayed detected in HA until it left the frame! 🥳
Perfect thanks, I’ve upgraded to 5.0.31 (currently EA) from 4.0.33 and it’s playing well with HA.
UniFi Protect Application 5.0.33 has been released as release candidate today, let's hope it will be promoted to Official soon.
I just upgraded to the latest, 5.0.33 seeing how everyone's detections were working again. I was really hoping that the "License Plate Detected" sensor would work again but it's still stuck on Clear. Normally, when a license plate is detected in Protect, that entity will display the license plate. I use it as an automation to open and close my garage door for specific license plates (ie. my vehicles). It's a lot more precise than dealing with a phone's zones and wifi signal. Here's hoping they also fix that...
I just upgraded to the latest, 5.0.33 seeing how everyone's detections were working again. I was really hoping that the "License Plate Detected" sensor would work again but it's still stuck on Clear. Normally, when a license plate is detected in Protect, that entity will display the license plate. I use it as an automation to open and close my garage door for specific license plates (ie. my vehicles). It's a lot more precise than dealing with a phone's zones and wifi signal. Here's hoping they also fix that...
I'm on v5.0.33 and I did get a license plate detected in HA on my AI Pro camera this morning. Did you make sure license plate detection is enabled on your camera?
I think there are two different issues going on here, and if you read through all the comments you'll see. Some people had an issue where the detection wasn't reported until the event ended. That issue has been fixed. Some people are not getting detections at all. I don't think that has been addressed. I am having the latter issue, but only on one of my cameras strangely (my doorbell). The doorbell ring event is not even being fired, let alone object detections.
I just upgraded to the latest, 5.0.33 seeing how everyone's detections were working again. I was really hoping that the "License Plate Detected" sensor would work again but it's still stuck on Clear. Normally, when a license plate is detected in Protect, that entity will display the license plate. I use it as an automation to open and close my garage door for specific license plates (ie. my vehicles). It's a lot more precise than dealing with a phone's zones and wifi signal. Here's hoping they also fix that...
I'm on v5.0.33 and I did get a license plate detected in HA on my AI Pro camera this morning. Did you make sure license plate detection is enabled on your camera?
Yeah, license detection is enabled in Protect and set ON in the switch entity "camera_name.detections_license_plate" in HA. It's been fine detecting license plates in Protect. I've reloaded the integration and restarted the AI Pro, but I've still had no luck.
I just upgraded to the latest, 5.0.33 seeing how everyone's detections were working again. I was really hoping that the "License Plate Detected" sensor would work again but it's still stuck on Clear. Normally, when a license plate is detected in Protect, that entity will display the license plate. I use it as an automation to open and close my garage door for specific license plates (ie. my vehicles). It's a lot more precise than dealing with a phone's zones and wifi signal. Here's hoping they also fix that...
I'm on v5.0.33 and I did get a license plate detected in HA on my AI Pro camera this morning. Did you make sure license plate detection is enabled on your camera?
Yeah, license detection is enabled in Protect and set ON in the switch entity "camera_name.detections_license_plate" in HA. It's been fine detecting license plates in Protect. I've reloaded the integration and restarted the AI Pro, but I've still had no luck.
Another thing you can try is delete the integration in HA and reload it. I'm assuming you also tried restarting the NVR/UDM?
UniFi Protect Application 5.0.33 has been promoted to Official.
UniFi Protect Application 5.0.33 has been promoted to Official.
Right on time. Or just a little too late actually. Had a burglar trying to break in the house this morning and obviously the alarm didn't go off since no person was detected. Let's see now if the alarm works again when/if he comes back tonight.
I just upgraded to the latest, 5.0.33 seeing how everyone's detections were working again. I was really hoping that the "License Plate Detected" sensor would work again but it's still stuck on Clear. Normally, when a license plate is detected in Protect, that entity will display the license plate. I use it as an automation to open and close my garage door for specific license plates (ie. my vehicles). It's a lot more precise than dealing with a phone's zones and wifi signal. Here's hoping they also fix that...
I'm on v5.0.33 and I did get a license plate detected in HA on my AI Pro camera this morning. Did you make sure license plate detection is enabled on your camera?
Yeah, license detection is enabled in Protect and set ON in the switch entity "camera_name.detections_license_plate" in HA. It's been fine detecting license plates in Protect. I've reloaded the integration and restarted the AI Pro, but I've still had no luck.
Another thing you can try is delete the integration in HA and reload it. I'm assuming you also tried restarting the NVR/UDM?
Tried both methods and still no detections. Was hoping with 5.0.34 that was just released today, it would start working again...
I just upgraded to the latest, 5.0.33 seeing how everyone's detections were working again. I was really hoping that the "License Plate Detected" sensor would work again but it's still stuck on Clear. Normally, when a license plate is detected in Protect, that entity will display the license plate. I use it as an automation to open and close my garage door for specific license plates (ie. my vehicles). It's a lot more precise than dealing with a phone's zones and wifi signal. Here's hoping they also fix that...
I'm on v5.0.33 and I did get a license plate detected in HA on my AI Pro camera this morning. Did you make sure license plate detection is enabled on your camera?
Yeah, license detection is enabled in Protect and set ON in the switch entity "camera_name.detections_license_plate" in HA. It's been fine detecting license plates in Protect. I've reloaded the integration and restarted the AI Pro, but I've still had no luck.
Another thing you can try is delete the integration in HA and reload it. I'm assuming you also tried restarting the NVR/UDM?
Tried both methods and still no detections. Was hoping with 5.0.34 that was just released today, it would start working again...
Same issue here, License plates are detected in Protect, but only around 40% of them turn up on the HA Sensor... does not seem to have changed in many of the recent EA releases so not sure if Ubiquiti are actually aware of this..
I use vehicle and license plate detection through Node-RED in Home Assistant, and when I updated Protect to version 5.0.34, all the integrations I had were broken. I had to roll back to version 4.0.33. On the other hand, Protect started showing errors when I needed playback in recordings.
For those whose detections still aren't working, can you check your logs and see if you have "Error while running subscription handler" from the protect integration? I think this may be related to issue #122408. I removed the custom lux settings on my cameras and detections are firing again.
For those whose detections still aren't working, can you check your logs and see if you have "Error while running subscription handler" from the protect integration? I think this may be related to issue #122408. I removed the custom lux settings on my cameras and detections are firing again.
Thanks for the tip. I reviewed the lux settings and they were set to default. I tried to update again, and once more the integration stopped working. I noticed that now the sensor often stays on and doesn’t switch back off until another car passes by. The detection of people has completely stopped, and the integration with the pallet in Node-RED dies completely. Once again, I rolled back to version 4.0.33, which, so far, is the most stable for the integration.
I just upgraded to the latest, 5.0.33 seeing how everyone's detections were working again. I was really hoping that the "License Plate Detected" sensor would work again but it's still stuck on Clear. Normally, when a license plate is detected in Protect, that entity will display the license plate. I use it as an automation to open and close my garage door for specific license plates (ie. my vehicles). It's a lot more precise than dealing with a phone's zones and wifi signal. Here's hoping they also fix that...
I'm on v5.0.33 and I did get a license plate detected in HA on my AI Pro camera this morning. Did you make sure license plate detection is enabled on your camera?
Yeah, license detection is enabled in Protect and set ON in the switch entity "camera_name.detections_license_plate" in HA. It's been fine detecting license plates in Protect. I've reloaded the integration and restarted the AI Pro, but I've still had no luck.
Another thing you can try is delete the integration in HA and reload it. I'm assuming you also tried restarting the NVR/UDM?
Tried both methods and still no detections. Was hoping with 5.0.34 that was just released today, it would start working again...
it works again with version 5.0.34?
Im confused because my HA also stopped reporting people motion on August 30th but I didn’t update my protect system. I was still on 3.x. Then I upgrade to 4.021 to see if that would fix the issue but it didn’t.
Why did my motion activations stop working on August 30th when I didn’t update anything at all?
I think there are two different issues going on here, and if you read through all the comments you'll see. Some people had an issue where the detection wasn't reported until the event ended. That issue has been fixed. Some people are not getting detections at all. I don't think that has been addressed. I am having the latter issue, but only on one of my cameras strangely (my doorbell). The doorbell ring event is not even being fired, let alone object detections.
I am now also getting this issue. The Unifi Protect integration stops getting any sensor changes. The sensors don't become unavailable, they just stick in their previous state ("recording", "off", "is dark" etc) even when the smart detections are shown in Unifi Protect. The cards stop displaying, but clicking on them pops-up the feed that is live. Reloading the integration results in all of the entites going unavailable. Rebooting HA does not work. Rebooting the Cloud Key Gen2+ does not work. Disabling then immediately re-enabling the integration gets everything back.
I have had this happen 3 times in the past week, having been rock-solid for 2 years until now. I can't think of a way to detect when the states become frozen otherwise I could send an alert/automate the disable/enable workaround. I am running 5.0.34 and HA 2024.10.1
For those whose detections still aren't working, can you check your logs and see if you have "Error while running subscription handler" from the protect integration? I think this may be related to issue #122408. I removed the custom lux settings on my cameras and detections are firing again.
Was getting this too, fresh install, thought I was going mad! Person detection appears to work for a while, then all of a suden; Person Detection (specifically) stops (which was the most useful part to me currently)
After much troubleshooting it seemed this had something to do with the LUX settings (for night vision kick in) and it being set to < 1 (as I wanted colour vision always and for it not to go into IR mode)
As @dyno0919 mentioned earlier last week, issue #122408 is wreaking havoc - This is mainly because those who have unifi cameras may opt for colour footage (at night) and have changed their lux or image settings for finer tuning.
@IvSan - May be worth updating the original issue if you can confirm?
@mib1185 , @bdraco - I can see you have been most active recently, do you think this could possibly be something to prioritise that could bring you less headache once more people realise? or perhaps worth tagging anyone else that may be able to help?
I think there are two different issues going on here, and if you read through all the comments you'll see. Some people had an issue where the detection wasn't reported until the event ended. That issue has been fixed. Some people are not getting detections at all. I don't think that has been addressed. I am having the latter issue, but only on one of my cameras strangely (my doorbell). The doorbell ring event is not even being fired, let alone object detections.
I am now also getting this issue. The Unifi Protect integration stops getting any sensor changes. The sensors don't become unavailable, they just stick in their previous state ("recording", "off", "is dark" etc) even when the smart detections are shown in Unifi Protect. The cards stop displaying, but clicking on them pops-up the feed that is live. Reloading the integration results in all of the entites going unavailable. Rebooting HA does not work. Rebooting the Cloud Key Gen2+ does not work. Disabling then immediately re-enabling the integration gets everything back.
I have had this happen 3 times in the past week, having been rock-solid for 2 years until now. I can't think of a way to detect when the states become frozen otherwise I could send an alert/automate the disable/enable workaround. I am running 5.0.34 and HA 2024.10.1
So this is my issue. I don't get ANY motion events at all in my Logbook. However, I didn't upgrade my system. It just stopped working on August 30th. That's why I'm so confused.
For those whose detections still aren't working, can you check your logs and see if you have "Error while running subscription handler" from the protect integration? I think this may be related to issue #122408. I removed the custom lux settings on my cameras and detections are firing again.
Was getting this too, fresh install, thought I was going mad! Person detection appears to work for a while, then all of a suden; Person Detection (specifically) stops (which was the most useful part to me currently)
I don't have any custom LUX settings enabled. All my cameras are on auto.
How can I check my logs for errors btw? Would love to help contribute to figuring out what's going on here.
@VeniceNerd - I had to do some googling to find this as well (to find the logs that is)
Relatively simple, in HA: go to Settings > System > Logs
Since resetting any night time settings (I had mine set to <1 lux to force no night time mode)
Currently Auto and anything set to "1" and over works.
Plus, I could be wrong here but setting any advanced image tuning could also cause it to error in logs.
See how you go and if you a.) get errors in your log RE: lux and b.) if that improves when setting lux to 1 or over (or auto) noting you may need to reset your fine turning in advanced etc.
Edit: Also! What version of protect are you running out of curiosity? You can mouse over the words "Up to date" when you see all your services. Currently I am running:
@VeniceNerd does disabling the Protect integration and then enabling it again bring your sensors back?
I am thinking about trying to use one of the variable sensors on the CK eg temperature or memory use that should naturally fluctuate as a monitor for the sensors becoming frozen, assuming it also sticks.
@VeniceNerd does disabling the Protect integration and then enabling it again bring your sensors back?
I am thinking about trying to use one of the variable sensors on the CK eg temperature or memory use that should naturally fluctuate as a monitor for the sensors becoming frozen, assuming it also sticks.
Yes, I disabled and immediately re-enabled the integration 2 days ago and it’s been working since then. So that seems to fix the issue. I’m just not sure if it’s a permanent fix?
I still would like to to understand why this all started happening on August 30th when I didn’t upgrade anything on my system…
@VeniceNerd does disabling the Protect integration and then enabling it again bring your sensors back? I am thinking about trying to use one of the variable sensors on the CK eg temperature or memory use that should naturally fluctuate as a monitor for the sensors becoming frozen, assuming it also sticks.
Yes, I disabled and immediately re-enabled the integration 2 days ago and it’s been working since then. So that seems to fix the issue. I’m just not sure if it’s a permanent fix?
I still would like to to understand why this all started happening on August 30th when I didn’t upgrade anything on my system…
Really glad we got you back online relatively simply at least. I’m waiting to see if mine goes again then hopefully the logs will reveal something useful and also whether we could have an automation to see a stuck sensor and disable/reenable automatically to at least provide a workaround. Our issue doesn’t seem very widespread (yet?)
I also formatted the CKG2 HDD as I was starting to get “auto recovery” events every couple of days in protect and also entries in HA for ONVIF cameras that I had deleted so wondering (long shot) if the condition of the HDD might be a part of the issue.
@VeniceNerd does disabling the Protect integration and then enabling it again bring your sensors back? I am thinking about trying to use one of the variable sensors on the CK eg temperature or memory use that should naturally fluctuate as a monitor for the sensors becoming frozen, assuming it also sticks.
Yes, I disabled and immediately re-enabled the integration 2 days ago and it’s been working since then. So that seems to fix the issue. I’m just not sure if it’s a permanent fix? I still would like to to understand why this all started happening on August 30th when I didn’t upgrade anything on my system…
Really glad we got you back online relatively simply at least. I’m waiting to see if mine goes again then hopefully the logs will reveal something useful and also whether we could have an automation to see a stuck sensor and disable/reenable automatically to at least provide a workaround. Our issue doesn’t seem very widespread (yet?)
I also formatted the CKG2 HDD as I was starting to get “auto recovery” events every couple of days in protect and also entries in HA for ONVIF cameras that I had deleted so wondering (long shot) if the condition of the HDD might be a part of the issue.
Ok interesting! I also had some issues with auto recovery on my UNVR after I tried to update the firmware. Granted this is AFTER the problem initially started.
I’m currently out of the country but in two weeks I’ll be back and then I’ll update my system to latest HA and protect and also reset my UNVR and set it up from scratch. Just to be safe… (if the issue comes back that is…)
please keep us updated on your end as well.
The problem
The G5 Bullet camera, which has smart detection for persons enabled, is integrated into Home Assistant via the
unifiprotect
integration. This setup includes a binary sensorPerson Detected
associated with the camera. However, starting from August 30, 2024, this sensor has stopped triggering, even though the general motion detection sensor continues to work correctly. The person detection feature is functioning properly on the UniFi OS side, so it seems the issue lies within the integration between Home Assistant and UniFi OS. This may have occurred due to a recent update to the UniFi Protect app by UniFi OS.What version of Home Assistant Core has the issue?
core-2024.6.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
unifiprotect
Link to integration documentation on our website
https://www.home-assistant.io/integrations/unifiprotect
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response