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

Can't connect to Protect #1012

Closed amuetste closed 8 months ago

amuetste commented 8 months ago

Describe The Problem: This is a new setup. I cannot get homebridge-unifi-protect to connect to my CloudKey2 Plus. Version CloudKey: Unifi OS 3.2.5 Version Protect: 2.9.33 (released today)

Error message in the screen: Unable to login to the UniFi Protect controller. Please check your controller address, username, and password.

I tried hostname and IP. I can ping the cloudkey IP. The HomeBridge install can both reach IP and resolve hostname. , I can log in with the username into the cloudkey appliance just fine.

To Reproduce: Install HomeBridge, install plugin, try to connect

Logs:

[11/2/2023, 2:48:41 PM] Homebridge v1.6.1 (HAP v0.11.1) (Homebridge C6EF) is running on port 51958.
[11/2/2023, 2:48:41 PM] [UniFi Protect] Using FFmpeg version: 6.0-homebridge-alpine-x86_64-static.
[11/2/2023, 2:48:41 PM] [UniFi Protect] Hardware-accelerated decoding and encoding using vaapi will be unavailable: unable to successfully validate capabilities.
[11/2/2023, 2:48:41 PM] [UniFi Protect] Hardware-accelerated decoding and encoding using qsv will be unavailable: unable to successfully validate capabilities.
[11/2/2023, 2:49:06 PM] [Homebridge UI] [homebridge-unifi-protect] Incoming Request: /getDevices
[11/2/2023, 2:49:06 PM] [Homebridge UI] [homebridge-unifi-protect] (node:17468) [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)
[11/2/2023, 2:49:06 PM] [Homebridge UI] [homebridge-unifi-protect] Incoming Request: /getErrorMessage

Homebridge Configuration:

{
    "bridge": {
        "name": "Homebridge C6EF",
        "username": "**********",
        "port": 51958,
        "pin": "***-**-***",
        "advertiser": "bonjour-hap",
        "bind": [
            "ens160"
        ]
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "controllers": [
                {}
            ],
            "name": "UniFi Protect",
            "platform": "UniFi Protect"
        }
    ]
}

Screenshots: Environment:

hjdhjd commented 8 months ago

Thanks for the report, but there's nothing in the logs that indicates an issue. If your issue is an error message with using the HBUP webUI...a future update might improve a few things there, but just close the HBUP webUI, wait a minute or so, and open it up again.

There's nothing in the logs you posted that indicates there is an actual issue with HBUP itself when accessed in the Home app. If there is, then please post the complete startup logs for HBUP and I'll have a look. But the above log entries you posted are not helpful.

amuetste commented 8 months ago

That's exactly why I'm stuck. I can't find WHY it's not working. I just get the error message on the config page, plus these log entries: [homebridge-unifi-protect] Incoming Request: /getDevices [homebridge-unifi-protect] Incoming Request: /getErrorMessage

Every time I press 'Login', it creates those 2 entries. That is it, nothing more. I have no idea where to start looking. At first I was trying this with Docker and I suspected it could not connect or resolve, but as it turned out, that was not the issue.

Just to be sure, I created a quick virtual machine with Ubuntu 22.04, installed Homebridge on there, only to get the exact same error message on the config page and zero in the logs other than the entries above.

I have no idea where to go troubleshooting.

amuetste commented 8 months ago

`[11/2/2023, 4:53:31 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [11/2/2023, 4:53:36 PM] [HB Supervisor] Restarting Homebridge... [11/2/2023, 4:53:36 PM] [HB Supervisor] Starting Homebridge with extra flags: -P /var/lib/homebridge/node_modules --strict-plugin-resolution [11/2/2023, 4:53:36 PM] [HB Supervisor] Started Homebridge v1.6.1 with PID: 52205 [11/2/2023, 4:53:37 PM] Loaded config.json with 0 accessories and 2 platforms. [11/2/2023, 4:53:37 PM] Loaded 0 cached accessories from cachedAccessories. [11/2/2023, 4:53:37 PM] --- [11/2/2023, 4:53:38 PM] Loaded plugin: homebridge-unifi-protect@6.15.1 [11/2/2023, 4:53:38 PM] Registering platform 'homebridge-unifi-protect.UniFi Protect' [11/2/2023, 4:53:38 PM] --- [11/2/2023, 4:53:38 PM] Loading 2 platforms... [11/2/2023, 4:53:38 PM] [UniFi Protect] Initializing UniFi Protect platform... [11/2/2023, 4:53:38 PM] [UniFi Protect] Initializing child bridge 0E:3D:F5:D1:E6:E9 Setup Payload: X-HM://00252WKEJ5H7V Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐
│ ***-**-***│
└────────────┘

[11/2/2023, 4:53:38 PM] Homebridge v1.6.1 (HAP v0.11.1) (Homebridge C6EF) is running on port 51958. [11/2/2023, 4:53:39 PM] [UniFi Protect] Launched child bridge with PID 52232 [11/2/2023, 4:53:39 PM] Registering platform 'homebridge-unifi-protect.UniFi Protect' [11/2/2023, 4:53:39 PM] [UniFi Protect] Loaded homebridge-unifi-protect v6.15.1 child bridge successfully [11/2/2023, 4:53:39 PM] Loaded 0 cached accessories from cachedAccessories.0E3DF5D1E6E9. [11/2/2023, 4:53:39 PM] Homebridge v1.6.1 (HAP v0.11.1) (UniFi Protect) is running on port 30399. [11/2/2023, 4:53:39 PM] [UniFi Protect] Using FFmpeg version: 6.0-homebridge-alpine-x86_64-static. [11/2/2023, 4:53:39 PM] [UniFi Protect] Hardware-accelerated decoding and encoding using vaapi will be unavailable: unable to successfully validate capabilities. [11/2/2023, 4:53:39 PM] [UniFi Protect] Hardware-accelerated decoding and encoding using qsv will be unavailable: unable to successfully validate capabilities. (node:52232) [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) [11/2/2023, 4:53:54 PM] [Homebridge UI] [homebridge-unifi-protect] Incoming Request: /getDevices [11/2/2023, 4:53:54 PM] [Homebridge UI] [homebridge-unifi-protect] (node:52357) [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) [11/2/2023, 4:53:54 PM] [Homebridge UI] [homebridge-unifi-protect] Incoming Request: /getErrorMessage [11/2/2023, 4:54:11 PM] [Homebridge UI] Changes to config.json saved. [11/2/2023, 4:54:12 PM] [Homebridge UI] [homebridge-unifi-protect] Terminating child process... [11/2/2023, 4:54:12 PM] [Homebridge UI] [homebridge-unifi-protect] Child process ended [11/2/2023, 4:55:14 PM] [Homebridge UI] [homebridge-unifi-protect] Incoming Request: /getDevices [11/2/2023, 4:55:14 PM] [Homebridge UI] [homebridge-unifi-protect] (node:52748) [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) [11/2/2023, 4:55:14 PM] [Homebridge UI] [homebridge-unifi-protect] Incoming Request: /getErrorMessage [11/2/2023, 4:55:43 PM] [Homebridge UI] [homebridge-unifi-protect] Incoming Request: /getDevices [11/2/2023, 4:55:43 PM] [Homebridge UI] [homebridge-unifi-protect] Incoming Request: /getErrorMessage

`

hjdhjd commented 8 months ago

You've also got no Protect controllers configured in your configuration JSON - unless you intentionally excluded them. That would be why you don't see anything.

I appreciate your frustration, but there's not much more I can do to help here. I'd suggest you raise this on the Homebridge Discord in the unifi-protect channel for configuration setup and support...I don't see a functional bug here in HBUP that needs to be addressed, and the Discord is a more interactive and better resource to help you get up and running.

Best of luck.

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.