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 84 forks source link

HBUP API behaviour is impacting local admin login to Protect (4.0.3) #1070

Closed bondskin closed 1 month ago

bondskin commented 1 month ago

Homebridge UniFi Protect Version

6.22.0

Homebridge Platform and OS

Raspberry Pi 4, Linux raspberrypi 5.10.103-v7l+

Homebridge Version

1.8.1

Node Version

v18.20.2

UniFi OS Version

4.0.3

UniFi Protect Controller Version

4.0.7

Describe the problem

Disclaimer: I am running 4.0.3 and I am sharing my experience for the benefit of making you aware of the issue and to help. I am not expecting or demanding a solution.

Since upgraded to UDR 4.0.3 I am frequently not able to logon using my local Unifi account.

SCR-20240510-mnxh

HBUP is using a different, local account.

Feedback from Unifi: "Got any automations/3rd party integrations? Something is happning the login api:" (See log below)

Homebridge HBUP JSON configuration

{
    "controllers": [
        {
            "address": "192.168.2.98",
            "password": "Artemis1",
            "username": "hb"
        }
    ],
    "name": "UniFi Protect",
    "options": [
        "Enable.Device.Standalone.784558B70E8D",
        "Enable.Device.SyncName.784558B70E8D",
        "Enable.Device.StatusLed.784558B70E8D",
        "Disable.Doorbell.Messages.784558B70E8D",
        "Disable.Log.Doorbell.784558B70E8D",
        "Disable.Log.Doorbell.68D79AE2FF87",
        "Disable.Log.Doorbell.D021F9978EC7",
        "Disable.Log.Doorbell.70A7418F47A0",
        "Disable.Device.784558B13098",
        "Enable.Video.DynamicBitrate.784558B70E8D",
        "Disable.Video.Transcode.HighLatency.784558B70E8D",
        "Disable.Video.Transcode.HighLatency.68D79AE2FF87",
        "Disable.Video.Transcode.HighLatency.D021F9978EC7",
        "Disable.Video.Transcode.HighLatency.70A7418F47A0",
        "Enable.Video.Stream.Only.Low.D021F9978EC7",
        "Enable.Video.Stream.Only.Low.784558B70E8D",
        "Disable.Video.HighResSnapshots.784558B70E8D",
        "Enable.Video.HighResSnapshots.68D79AE2FF87",
        "Enable.Video.HighResSnapshots.D021F9978EC7",
        "Enable.Video.HighResSnapshots.70A7418F47A0",
        "Enable.Nvr.SystemInfo",
        "Disable.Nvr.SystemInfo.784558B70E8D",
        "Enable.Motion.SmartDetect.70A7418F47A0",
        "Enable.Video.HKSV.Record.Only.Medium.68D79AE2FF87",
        "Disable.Video.HKSV.Record.Only.Low.68D79AE2FF87",
        "Enable.Video.HKSV.Record.Only.Medium.D021F9978EC7",
        "Disable.Video.HKSV.Record.Only.Low.D021F9978EC7",
        "Enable.Video.DynamicBitrate.70A7418F47A0",
        "Disable.Video.Stream.Only.Low.70A7418F47A0",
        "Enable.Video.DynamicBitrate.68D79AE2FF87",
        "Enable.Log.HKSV.784558B70E8D"
    ],
    "videoProcessor": "/usr/local/bin/ffmpeg",
    "_bridge": {
        "username": "0E:F6:69:C3:75:2A",
        "port": 52653
    },
    "platform": "UniFi Protect"
}

Relevant log output

2024-05-10T13:04:50.827+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=13.716 tx=0 u_rt=13.214 u_tx=0
2024-05-10T13:04:50.827+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=8.210 tx=0 u_rt=4.703 u_tx=0
2024-05-10T13:04:50.827+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=11.504 tx=0 u_rt=11.002 u_tx=0
2024-05-10T13:04:50.827+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=13.676 tx=0 u_rt=13.674 u_tx=0
2024-05-10T13:04:50.827+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=8.210 tx=0 u_rt=4.202 u_tx=0
2024-05-10T13:04:50.827+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=13.135 tx=0 u_rt=12.633 u_tx=0
2024-05-10T13:04:50.827+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=8.149 tx=0 u_rt=8.143 u_tx=0
2024-05-10T13:04:50.827+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=11.468 tx=0 u_rt=10.390 u_tx=0
2024-05-10T13:04:50.827+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=13.129 tx=0 u_rt=12.820 u_tx=0
2024-05-10T13:04:51.228+02:00 local  "POST /api/auth/login HTTP/2.0" 000 rt=3.539 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:51.251+02:00 local  "POST /api/auth/login HTTP/2.0" 000 rt=2.512 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:51.727+02:00 local  "POST /api/auth/login HTTP/2.0" 000 rt=4.038 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:51.755+02:00 local  "POST /api/auth/login HTTP/2.0" 000 rt=3.016 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:52.229+02:00 local  "POST /api/auth/login HTTP/2.0" 000 rt=4.540 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:52.252+02:00 local  "POST /api/auth/login HTTP/2.0" 000 rt=3.513 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:52.728+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=5.039 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:52.728+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=5.039 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:52.728+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=5.039 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:52.728+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=5.039 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:52.728+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=5.039 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:52.728+02:00 local  "POST /api/auth/login HTTP/2.0" 499 rt=5.039 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:52.731+02:00 local  "POST /api/auth/login HTTP/2.0" 000 rt=5.042 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:52.800+02:00 local  "POST /api/auth/login HTTP/2.0" 000 rt=4.061 tx=0 u_rt=- u_tx=-
2024-05-10T13:04:53.238+02:00 local  "POST /api/auth/login HTTP/2.0" 000 rt=3.525 tx=0 u_rt=- u_tx=-

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

hjdhjd commented 1 month ago

I appreciate it though as you know, HBUP provides no support for EA releases. :smile:

We'll see what Ubiquiti ultimately chooses to GA.

HBUP, and the underlying library (which I also write and maintain) doesn't login to Protect multiple times - only once. You can validate this for yourself by going to the Admin Activity section of the System Log tab on a UniFi console.

Since you clearly already know - I do not advise anyone to run EA versions of Protect. :smile:

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