Closed alexruffell closed 2 months ago
Hey there @angellusmortis, @bdraco, mind taking a look at this issue as it has been labeled with an integration (unifiprotect
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
unifiprotect documentation unifiprotect source (message by IssueLinks)
Yep, I'm seeing the same thing. No issues either.
If I recall correctly the detection works by checking https://github.com/uilibs/unifi-discovery/blob/a539b751c8e343fe50c61a471381599d7c5ea37e/unifi_discovery/__init__.py#L61 to see if it will error, and once protect has ever been installed, the protect proxy url will not error anymore because uninstalling protect still leaves the proxy url in place and unifios never fully cleans up to return it to the original state.
It looks like newer unifi os always returns a 401 so it always gets detected as available.
I'm not sure there is a way to tell if protect is installed or not anymore
@bdraco Unfortunately I cannot remember what I did, however my UDMP is no longer being discovered as a Protect device, only my UNVR. Let me know if you need me to do any test to see why. There is a chance I went into the registry files and removed it there...
No worries. I think the result here is that the current implementation is the best we can do currently and there isn't a path to improve it based on what we can discover without authentication
The problem
I am not sure how the integration discovers instances of Unifi Protect on the network, whether it is by compatible hardware or an instance of the application running on the network. I've had Unifi Protect integrated into HA for quite a while and up until last week Protect was running on my UDMP. I now have a Unifi NVR and I have therefore removed Protect from the UDMP as it now runs on the UNVR.
While I can easily click "Ignore" and forget about this, I wanted to report it in case it was a bug. I would expect the integration to detect the Protect application running, and offer to integrate it pointing to the hardware it is running on (UNVR in my case, not the UDMP). Given the UDMP no longer runs Protect, I am not sure why it wants to integrate Protect on my UDMP even after rebooting (when conditions for the integration offer go away, the integration offer also goes away after a reboot. When I first got this offer Protect was only stopped, but then I uninstalled it too, so I wonder why the integration offer remains).
What version of Home Assistant Core has the issue?
core-2024.2.2
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
Unifi Protect
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