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

Protect Controller API Error #1019

Closed justinstorms2587 closed 8 months ago

justinstorms2587 commented 8 months ago

Homebridge Platform and OS

Raspbian GNU/Linux Bullseye (11) (Pi 4)

Homebridge Version

1.7.0

Node Version

18.16.0

UniFi OS Version

3.1.16

UniFi Protect Controller Version

2.8.35

Describe the problem

Good afternoon - Love the plugin but I've been having some issues with connectivity between homebridge and the protect controller. It works well for a while and then snapshots will stop working in homekit. Initially, camera streams will function fine in Homekit but snapshots will not update. After a couple more days, camera streams will also stop working and the status log indicates the following:

[06/11/2023, 14:45:31] [UniFi Protect] 192.168.1.1: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during Protect controller reboots and firmware updates. [06/11/2023, 14:45:41] [UniFi Protect] 192.168.1.1: API error: Throttling API calls due to errors with the 10 previous attempts. Pausing communication with the Protect controller for 5 minutes. [06/11/2023, 14:50:41] [UniFi Protect] 192.168.1.1: API error: Resuming connectivity to the UniFi Protect API after pausing for 5 minutes. [06/11/2023, 14:50:41] [UniFi Protect] 192.168.1.1: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during Protect controller reboots and firmware updates.

The homebridge server is on the same subnet as my UDM Pro and is not impeded by any firewall rules. Restarting the plugin child bridge, restarting the homebridge server, power cycling the raspberry pi, stopping and starting the protect controller does not work. I even tried deleting the controller username and password from the plugin to try and login but then it can't reach the protect controller to try and login again. The only thing that resolves the issue is to restart the UDM Pro itself, after which everything starts working again for a few days before going down again.

Homebridge HBUP JSON configuration

{
    "name": "UniFi Protect",
    "options": [
        "Enable.Motion.Trigger.F4E2C60F7D2A",
        "Enable.Motion.Switch.F4E2C60F7D2A",
        "Enable.Nvr.Recording.Switch.F4E2C60F7D2A",
        "Enable.Doorbell.Trigger.F4E2C60F2C1E",
        "Enable.Motion.Trigger.F4E2C60F2C1E",
        "Enable.Motion.Trigger.F4E2C60D9BD9",
        "Enable.Motion.Trigger.F4E2C60D9886",
        "Enable.Motion.Trigger.F4E2C60DA0D0",
        "Enable.Motion.Trigger.70A7413F4A21",
        "Enable.Motion.Trigger.70A7410FF335",
        "Enable.Motion.Trigger.70A7413F4529",
        "Enable.SecuritySystem.Alarm.E438830BBA90",
        "Enable.Nvr.Recording.Switch.F4E2C60D9AE1",
        "Enable.SecuritySystem.Alarm.E438830BB4F2",
        "Enable.Video.HKSV.Record.Only.Medium.F4E2C60F7D2A",
        "Enable.Motion.Switch.E438830BBA90",
        "Enable.Motion.Switch.E438830BB4F2"
    ],
    "_bridge": {
        "username": "0E:74:06:A6:BB:63",
        "port": 49858
    },
    "platform": "UniFi Protect"
}

Relevant log output

[06/11/2023, 14:44:11] [UniFi Protect] 192.168.1.1: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during Protect controller reboots and firmware updates.
[06/11/2023, 14:44:21] [UniFi Protect] 192.168.1.1: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during Protect controller reboots and firmware updates.
[06/11/2023, 14:44:31] [UniFi Protect] 192.168.1.1: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during Protect controller reboots and firmware updates.
[06/11/2023, 14:44:41] [UniFi Protect] 192.168.1.1: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during Protect controller reboots and firmware updates.
[06/11/2023, 14:44:51] [UniFi Protect] 192.168.1.1: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during Protect controller reboots and firmware updates.
[06/11/2023, 14:45:01] [UniFi Protect] 192.168.1.1: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during Protect controller reboots and firmware updates.
[06/11/2023, 14:45:11] [UniFi Protect] 192.168.1.1: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during Protect controller reboots and firmware updates.
[06/11/2023, 14:45:21] [UniFi Protect] 192.168.1.1: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during Protect controller reboots and firmware updates.

Acknowledgment that you are only running UniFi OS and UniFi Protect releases from the Ubiquiti Official release channel

hjdhjd commented 8 months ago

Thanks for the report - there's unfortunately not much I can do here. The errors are on the Protect controller end, not HBUP...they've been quite flakey over the past 2-3 months.

Which version of HBUP are you on? If you haven't tried v6.16.0 (just released)...give it a go. Otherwise, appreciate the report...stay tuned and hope Ubiquiti continues to improve the stability on their end.

Thanks!

Terminator0007 commented 8 months ago

Thanks for the report - there's unfortunately not much I can do here. The errors are on the Protect controller end, not HBUP...they've been quite flakey over the past 2-3 months.

Which version of HBUP are you on? If you haven't tried v6.16.0 (just released)...give it a go. Otherwise, appreciate the report...stay tuned and hope Ubiquiti continues to improve the stability on their end.

Thanks!

Thanks for a new version of HBUP 6.16 . Now everything working fine even on EA version of OS UniFi . Thanks a lot for a quick reaction ! 👍

justinstorms2587 commented 8 months ago

Thanks for the reply - as this is an error on Unifi's end there must be alot of people experiencing this same issue. Have you been receiving alot of reports like this? Stands to reason that if it's happening to me it must be happening to many others as well. There's no identified cause?

github-actions[bot] commented 8 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.