hjdhjd / homebridge-unifi-protect

:video_camera: Complete HomeKit integration for all UniFi Protect device types with full support for most features including HomeKit Secure Video, and more. https://homebridge.io
Other
1.39k stars 83 forks source link

Contact Sensor for Lame Unifi API error: Unable to connect to the Protect controller. #996

Closed 0x00-00 closed 9 months ago

0x00-00 commented 9 months ago

Is your feature request related to a problem? Please describe: The lame unifi stacking (at least in my case) has plagued me with API error: Unable to connect to the Protect controller., but I don't know when this has happened until there was a missed notification event and I try and figure out why.

Describe the solution you'd like: I'd like to request a contact sensor switch that gets toggled when this error/situation is encountered.

Describe alternatives you've considered: I've considered scheduling controller reboots, but sometimes it is required more frequently than expected. With the contact switch, I adopt and as-needed approach.

Additional context: Thank you for your time and consideration. And thank you for being so awesome! I've tried a few projects out there, and the design and easy of use for this one is freaking unbelievable.

SemoTech commented 9 months ago

@0x00-00 I had the same issue and was able to get around it by rebooting my UDM-SE but after 4 days the issue came back. Interestingly I had a legacy Protect Admin account that I switched to and so far it is working great, no more need to reboot. That account was made several versions ago when you could enter both a display name and email for local accounts. Maybe someone can check via SSH to see how legacy accounts were setup?

0x00-00 commented 9 months ago

Thanks for the reply @SemoTech 🙇 I will give that a try. As I am sure you know, one of the frustrating things with unifi products is they'll work exceptionally well, then other times are plagued with these random issues from seemingly minor updates.

Overall, I think it'd still be helpful for a contact sensor to be exposed when there are potential issues that can be detected from this app. I personally rely on these notifications for safety notifications, and knowing when those could be in a compromised state is something I'd prefer to know without log diving. Plus, I can setup automations to try and automate the recovery.

SemoTech commented 9 months ago

Most welcome @0x00-00 and I agree. love the UniFi line but due to the low cost the support and QA sometimes seems to be lacking.

I have a lot of experience with Cisco Enterprise and can say that they have their issues as well but much less frequent at the expense of 5x the cost. Cisco support also used to be too knoch and I loved that they would remote into your environment and not quit till it was resolved. I did not like the price tho :-)

hjdhjd commented 9 months ago

Thanks for the compliments - genuinely appreciated and nice to know others appreciate the care that goes into developing it.

As to the request, I’ll consider it for the future. Thanks for raising the idea…it’s a tough line. Historically, this hasn’t been much of an issue in the Ubiquiti world at this scale. It’s been a far more significant issue in the 3.1.x series…and hoping they stabilize in the next couple of months. The trend has always been 6-9 months post major release things calm down. Since they just got the last of the non-UniFi OS 3 devices (UDMs) over to 3.x in the past few months, I’m hopeful it will begin to tick upwards.

Another less ideal option, is to disable the use of the timeshift buffer. This will create a suboptimal, but still perfectly functional, HKSV experience…but will alleviate the load on the Protect controller somewhat and hopefully reduce these issues.

Best of luck.

github-actions[bot] commented 9 months ago

This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.