Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection stability issues #1172

Open
1 task done
chriscooil opened this issue Jan 29, 2025 · 2 comments
Open
1 task done

Connection stability issues #1172

chriscooil opened this issue Jan 29, 2025 · 2 comments

Comments

@chriscooil
Copy link

Homebridge UniFi Protect Version

v7.11.0

Homebridge Platform and OS

macOS Sonoma 14.5 (23F79)

Homebridge Version

v1.8.5

Node Version

v22.13.1

UniFi OS Version

4.1.13

UniFi Protect Controller Version

5.2.42

Describe the problem

After a while the plugin starts reporting errors in trying to communicate with UniFi Protect and says that it will pause trying for 5 mins. This is resolved with a reboot of home bridge.

Homebridge HBUP JSON configuration

{
    "bridge": {
        "name": "Homebridge 5F3E",
        "username": "****",
        "port": 51760,
        "pin": "****",
        "advertiser": "bonjour-hap"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "controllers": [
                {
                    "address": "192.168.0.1",
                    "password": "****",
                    "username": "****"
                }
            ],
            "name": "UniFi Protect",
            "options": [
                "Enable.Device.SyncName.9C05D6A04A4D",
                "Enable.Video.Transcode.Hardware.9C05D6A04A4D",
                "Disable.Doorbell.Messages",
                "Disable.Log.Doorbell",
                "Disable.Video.Transcode",
                "Disable.Video.Transcode.HighLatency",
                "Disable.Doorbell.Messages.9C05D6A04A4D",
                "Disable.Log.Doorbell.9C05D6A04A4D",
                "Disable.Video.Transcode.9C05D6A04A4D",
                "Disable.Video.Transcode.HighLatency.9C05D6A04A4D",
                "Disable.Log.Doorbell.AC8BA90DD880",
                "Disable.Video.Transcode.AC8BA90DD880",
                "Disable.Video.Transcode.HighLatency.AC8BA90DD880",
                "Enable.Video.Transcode.Hardware.AC8BA90DD880",
                "Enable.Device.SyncName.70A7418FD7F5",
                "Disable.Log.Doorbell.70A7418FD7F5",
                "Enable.Video.Transcode.Hardware.70A7418FD7F5",
                "Enable.Video.Transcode.70A7418FD7F5",
                "Enable.Video.Transcode.HighLatency.70A7418FD7F5"
            ],
            "platform": "UniFi Protect",
            "_bridge": {
                "username": "****",
                "port": 31104
            }
        },
        {
            "name": "Sonos",
            "alarms": true,
            "forceS2": true,
            "service": "switch",
            "speakers": false,
            "platform": "ZP"
        },
        {
            "name": "Virtual Accessories Platform",
            "devices": [
                {
                    "accessoryID": "GrgWin1",
                    "accessoryName": "Windows",
                    "accessoryType": "windowcovering",
                    "windowCoveringDefaultState": "closed",
                    "transitionDuration": 30,
                    "accessoryIsStateful": true
                }
            ],
            "platform": "VirtualAccessoriesForHomebridge",
            "_bridge": {
                "username": "****",
                "port": 43060
            }
        }
    ],
    "disabledPlugins": [
        "homebridge-zp"
    ]
}

Relevant log output

[1/29/2025, 6:23:58 AM] [UniFi Protect] Using FFmpeg version: 7.0.2-homebridge-darwin-arm64.
(node:3914) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version.
(Use `node --trace-deprecation ...` to show where the warning was created)
[1/29/2025, 6:23:59 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: Connected to 192.168.0.1 (UniFi Protect 5.2.42 running on UniFi OS 4.1.13).
[1/29/2025, 6:23:59 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: Discovered nvr: Dream Machine Pro Max [UDM Pro Max] (address: 192.168.0.1 mac: 9C05D6A04A4D).
[1/29/2025, 6:23:59 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: Discovered camera: G5 PTZ [G5 PTZ] (address: 192.168.0.58 mac: 28704E176749).
[1/29/2025, 6:23:59 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: Discovered camera: G5 Dome [G5 Dome] (address: 192.168.0.56 mac: 70A7418FD7F5).
[1/29/2025, 6:23:59 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: Discovered camera: G5 Bullet [G5 Bullet] (address: 192.168.0.218 mac: AC8BA90DD880).
[1/29/2025, 6:23:59 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: Syncing Protect device names to HomeKit.
[1/29/2025, 6:23:59 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: Hardware-accelerated decoding and transcoding enabled.
[1/29/2025, 7:24:03 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: API error: Protect controller is taking too long to respond to a request. This error can usually be safely ignored.
[1/29/2025, 7:24:06 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: API error: Protect controller is taking too long to respond to a request. This error can usually be safely ignored.
[1/29/2025, 7:24:09 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: API error: Protect controller is taking too long to respond to a request. This error can usually be safely ignored.
[1/29/2025, 7:24:16 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: API error: Protect controller is taking too long to respond to a request. This error can usually be safely ignored.
[1/29/2025, 7:24:16 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: API error: Unable to retrieve the UniFi Protect controller configuration.
[1/29/2025, 7:24:33 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: API error: Protect controller is taking too long to respond to a request. This error can usually be safely ignored.
[1/29/2025, 7:24:40 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: API error: Protect controller is taking too long to respond to a request. This error can usually be safely ignored.
[1/29/2025, 7:24:40 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: API error: Unable to retrieve the UniFi Protect controller configuration.
[1/29/2025, 7:24:57 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: API error: Protect controller is taking too long to respond to a request. This error can usually be safely ignored.
[1/29/2025, 7:25:03 AM] [UniFi Protect] Dream Machine Pro Max [UDMPROMAX]: API error: Throttling API calls due to errors with the 10 previous attempts. Pausing communication with the Protect controller for 5 minutes.
[1/29/2025, 7:25:04 AM] [UniFi Protect] 192.168.0.1: API error: Protect controller is taking too long to respond to a request. This error can usually be safely ignored.
[1/29/2025, 7:30:04 AM] [UniFi Protect] 192.168.0.1: API error: Resuming connectivity to the UniFi Protect API after pausing for 5 minutes.

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

  • I acknowledge that I am not running any early access / beta firmwares or operating systems from either Ubiquiti or Apple.
@Yositimy
Copy link

Yositimy commented Jan 31, 2025

I have been seeing the same issue for awhile and was about to also ask what was going on. I notice this as every day or two sensors disapear from homekit. (issue #1145) It was suggested to lengthen the DVR timeout but that caused numerous crash/restarts. I did roll back the timeout and reduced the frequency, but the logs now seem to be full of connection errors.

homebridge-unifi-protect.log.txt

@gnoto
Copy link

gnoto commented Jan 31, 2025

Same problem here.
Partial copy of log follows:

....
[31/01/2025, 14:22:29] [homebridge-unifi-protect] Beethoven_UDM Pro Max [UDMPROMAX]: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during device reboots.
[31/01/2025, 14:22:51] [homebridge-unifi-protect] IP Cam09 soggiorno [G4 Instant]: Motion detected.
[31/01/2025, 14:23:29] [homebridge-unifi-protect] Beethoven_UDM Pro Max [UDMPROMAX]: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during device reboots.
[31/01/2025, 14:24:29] [homebridge-unifi-protect] Beethoven_UDM Pro Max [UDMPROMAX]: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during device reboots.
[31/01/2025, 14:24:45] [homebridge-unifi-protect] IP Cam09 soggiorno [G4 Instant]: Motion detected.
[31/01/2025, 14:25:05] [homebridge-unifi-protect] IP Cam07 studio [G4 Instant]: Motion detected.
[31/01/2025, 14:25:29] [homebridge-unifi-protect] Beethoven_UDM Pro Max [UDMPROMAX]: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during device reboots.
[31/01/2025, 14:26:29] [homebridge-unifi-protect] Beethoven_UDM Pro Max [UDMPROMAX]: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during device reboots.
[31/01/2025, 14:26:33] [homebridge-unifi-protect] IP Cam07 studio [G4 Instant]: Motion detected.
[31/01/2025, 14:26:56] [homebridge-unifi-protect] Doorbell cancelletto [G4 Doorbell]: Reconnecting to the livestream API.
[31/01/2025, 14:27:29] [homebridge-unifi-protect] Beethoven_UDM Pro Max [UDMPROMAX]: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during device reboots.
[31/01/2025, 14:28:29] [homebridge-unifi-protect] Beethoven_UDM Pro Max [UDMPROMAX]: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during device reboots.
[31/01/2025, 14:28:31] [homebridge-unifi-protect] IP Cam07 studio [G4 Instant]: Motion detected.
[31/01/2025, 14:28:41] [homebridge-unifi-protect] IP Cam08 salone [G4 Instant]: Motion detected.
[31/01/2025, 14:28:52] [homebridge-unifi-protect] IP Cam09 soggiorno [G4 Instant]: Motion detected.
[31/01/2025, 14:29:22] [homebridge-unifi-protect] IP Cam09 soggiorno [G4 Instant]: Motion detected.
[31/01/2025, 14:29:29] [homebridge-unifi-protect] Beethoven_UDM Pro Max [UDMPROMAX]: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during device reboots.
[31/01/2025, 14:29:40] [homebridge-unifi-protect] IP Cam09 soggiorno [G4 Instant]: Motion detected.
[31/01/2025, 14:29:57] [homebridge-unifi-protect] IP Cam08 salone [G4 Instant]: Motion detected.
[31/01/2025, 14:30:10] [homebridge-unifi-protect] IP Cam07 studio [G4 Instant]: Motion detected.
[31/01/2025, 14:30:29] [homebridge-unifi-protect] Beethoven_UDM Pro Max [UDMPROMAX]: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during device reboots.
[31/01/2025, 14:30:51] [homebridge-unifi-protect] IP Cam09 soggiorno [G4 Instant]: Motion detected.
[31/01/2025, 14:31:29] [homebridge-unifi-protect] Beethoven_UDM Pro Max [UDMPROMAX]: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during device reboots.
[31/01/2025, 14:32:11] [homebridge-unifi-protect] IP Cam09 soggiorno [G4 Instant]: Motion detected.
[31/01/2025, 14:32:29] [homebridge-unifi-protect] Beethoven_UDM Pro Max [UDMPROMAX]: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during device reboots.
[31/01/2025, 14:32:29] [homebridge-unifi-protect] Doorbell cancelletto [G4 Doorbell]: Motion detected.
[31/01/2025, 14:32:32] [homebridge-unifi-protect] IP Cam07 studio [G4 Instant]: Motion detected.
[31/01/2025, 14:32:43] [homebridge-unifi-protect] Doorbell cancelletto [G4 Doorbell]: Streaming request from 192.168.67.211: 1600x1200@30fps, 2,000 kbps. Hardware accelerated transcoding 1600x1200@30fps (High) [HEVC], 3,000 kbps [API].
[31/01/2025, 14:32:58] [homebridge-unifi-protect] Doorbell cancelletto [G4 Doorbell]: HKSV: 27 second event.
[31/01/2025, 14:33:02] [homebridge-unifi-protect] IP Cam09 soggiorno [G4 Instant]: Motion detected.
[31/01/2025, 14:33:13] [homebridge-unifi-protect] Doorbell cancelletto [G4 Doorbell]: Stopped video streaming session.
[31/01/2025, 14:33:28] [homebridge-unifi-protect] IP Cam07 studio [G4 Instant]: Motion detected.
[31/01/2025, 14:33:29] [homebridge-unifi-protect] Beethoven_UDM Pro Max [UDMPROMAX]: API error: Unable to connect to the Protect controller. This is usually temporary and will occur during device reboots.
...

Tnx
Giampiero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants