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

API error: 499 #1079

Closed dzz5hj closed 1 month ago

dzz5hj commented 1 month ago

Homebridge UniFi Protect Version

6.22.0

Homebridge Platform and OS

Raspbian GNU/Linux Bullseye (11)

Homebridge Version

v1.8.2

Node Version

v20.13.1

UniFi OS Version

v3.2.12

UniFi Protect Controller Version

3.0.26

Describe the problem

With UniFi mandating the use of 2FA on all accounts in July, I updated my UI account with 2FA using their VERIFY App. After I setup the account and rebooted the HomeBridge, the plugin starts by using the same username and password as before but I receive a prompt on the VERIFY app to approve the login. I click YES, it's me, and it just keeps cycling through accepting the 2FA prompt but it never accepts it and loops.

Homebridge HBUP JSON configuration

{
    "controllers": [
        {
            "address": "192.168.1.1",
            "password": "XXXXXXXXXXXX",
            "username": "dzz5hj@comcast.net"
        }
    ],
    "videoEncoder": "h264_omx",
    "videoProcessor": "ffmpeg",
    "platform": "UniFi Protect",
    "options": [
        "Enable.Device.SyncName.74ACB9DA1A05",
        "Enable.Doorbell.Trigger.74ACB9DA1A05",
        "Enable.Doorbell.PhysicalChime.74ACB9DA1A05",
        "Enable.Video.Transcode.Hardware.74ACB9DA1A05",
        "Disable.Device.70A741F251B1",
        "Enable.Nvr.SystemInfo.74ACB9DA1A05",
        "Enable.Video.DynamicBitrate.74ACB9DA1A05",
        "Disable.Video.Transcode.HighLatency.D021F9937D57",
        "Disable.Log.Doorbell.D021F99224A7",
        "Enable.Video.Transcode.Hardware.D021F99224A7"
    ]
}

Relevant log output

[25/05/2024, 11:49:19] [Homebridge UI] [homebridge-unifi-protect] Incoming Request: /getErrorMessage
[25/05/2024, 11:49:46] [Homebridge UI] Starting terminal session
[25/05/2024, 11:54:07] [Homebridge UI] Terminal session ended.
[25/05/2024, 11:54:37] [Homebridge UI] Starting terminal session
[25/05/2024, 12:03:18] [Homebridge UI] Terminal session ended.
[25/05/2024, 12:04:41] [Homebridge UI] Starting terminal session
[25/05/2024, 12:04:42] [Homebridge UI] Terminal session ended.
[25/05/2024, 12:04:49] [Homebridge UI] Changes to config.json saved.
[25/05/2024, 12:04:50] [Homebridge UI] Homebridge restart request received
[25/05/2024, 12:04:51] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process
[25/05/2024, 12:04:51] [Homebridge UI] Sending SIGTERM to Homebridge
[25/05/2024, 12:04:51] Got SIGTERM, shutting down Homebridge...
[25/05/2024, 12:04:56] [Phillips Hue] goodbye
[25/05/2024, 12:04:56] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[25/05/2024, 12:05:01] [HB Supervisor] Restarting Homebridge...
[25/05/2024, 12:05:01] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution
[25/05/2024, 12:05:01] [HB Supervisor] Started Homebridge v1.8.2 with PID: 26028
[25/05/2024, 12:05:02] Loaded config.json with 0 accessories and 4 platforms.
[25/05/2024, 12:05:02] Loaded 8 cached accessories from cachedAccessories.
[25/05/2024, 12:05:02] ---
[25/05/2024, 12:05:02] ---
[25/05/2024, 12:05:02] [Homebridge UI] Starting terminal session
[25/05/2024, 12:05:04] Loaded plugin: homebridge-hue@0.13.70
[25/05/2024, 12:05:04] Registering platform 'homebridge-hue.Hue'
[25/05/2024, 12:05:04] ---
[25/05/2024, 12:05:04] Loaded plugin: homebridge-nest@4.6.9
[25/05/2024, 12:05:04] Registering platform 'homebridge-nest.Nest'
[25/05/2024, 12:05:04] ---
[25/05/2024, 12:05:05] Loaded plugin: homebridge-unifi-protect@6.22.0
[25/05/2024, 12:05:05] Registering platform 'homebridge-unifi-protect.UniFi Protect'
[25/05/2024, 12:05:05] ---
[25/05/2024, 12:05:05] Loading 4 platforms...
[25/05/2024, 12:05:05] [UniFi Protect] Initializing UniFi Protect platform...
[25/05/2024, 12:05:05] [Nest] Initializing Nest platform...
[25/05/2024, 12:05:05] [Phillips Hue] Initializing Hue platform...
[25/05/2024, 12:05:05] [Phillips Hue] homebridge-hue v0.13.70, node v20.13.1, homebridge v1.8.2
[25/05/2024, 12:05:05] [Phillips Hue] warning: recommended version: node v20.10.0 LTS
[25/05/2024, 12:05:05] [Phillips Hue] warning: recommended version: homebridge v1.7.0
[25/05/2024, 12:05:05] [Nest] Fetching Nest devices.
[25/05/2024, 12:05:05] [Phillips Hue] Hue Bridge: Signify Netherlands B.V. BSB002 bridge v1964061010, api v1.64.0
[25/05/2024, 12:05:05] [Phillips Hue] Hue Bridge: warning: not using recommended Hue bridge api version 1.61.0
[25/05/2024, 12:05:05] [UniFi Protect] Using FFmpeg version: 5.0.
(node:26028) [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)
[25/05/2024, 12:05:05] [Phillips Hue] Hue Bridge: request 1: POST / {"devicetype":"homebridge-hue#raspberrypi"}
[25/05/2024, 12:05:05] [Phillips Hue] Hue Bridge: request 1: : api error 101: link button not pressed
[25/05/2024, 12:05:05] [Phillips Hue] Hue Bridge: press link button on the bridge to create a user - retrying in 15s
[25/05/2024, 12:05:06] [UniFi Protect] 192.168.1.1: API error: 499 - 
[25/05/2024, 12:05:11] [Nest] initing home_away_sensor "Home Occupied": deviceId: 25fbca70-d9d2-11eb-9b7e-0e16f6d15b7e structureId: 25fbca70-d9d2-11eb-9b7e-0e16f6d15b7e
[25/05/2024, 12:05:11] [Nest] initing protect "Moms Room": deviceId: 18B4300041897FE1 structureId: 25fbca70-d9d2-11eb-9b7e-0e16f6d15b7e
[25/05/2024, 12:05:11] [Nest] initing protect "Upstairs": deviceId: 18B4300041879408 structureId: 25fbca70-d9d2-11eb-9b7e-0e16f6d15b7e
[25/05/2024, 12:05:11] [Nest] initing protect "Master Bedroom": deviceId: 18B430004189940D structureId: 25fbca70-d9d2-11eb-9b7e-0e16f6d15b7e
[25/05/2024, 12:05:11] [Nest] initing protect "Guest Room": deviceId: 18B4300041879BB7 structureId: 25fbca70-d9d2-11eb-9b7e-0e16f6d15b7e
[25/05/2024, 12:05:11] [Nest] initing protect "Office": deviceId: 18B4300041898E24 structureId: 25fbca70-d9d2-11eb-9b7e-0e16f6d15b7e
[25/05/2024, 12:05:11] [Nest] initing protect "Downstairs": deviceId: 18B430004189943B structureId: 25fbca70-d9d2-11eb-9b7e-0e16f6d15b7e
[25/05/2024, 12:05:11] [Nest] initing lock (P) "Entryway Lock": deviceId: 00177A00000061FE structureId: 25fbca70-d9d2-11eb-9b7e-0e16f6d15b7e
[25/05/2024, 12:05:17] [UniFi Protect] 192.168.1.1: API error: 499 - 
[25/05/2024, 12:05:20] [Phillips Hue] Hue Bridge: created user - please edit config.json and restart homebridge
  "platforms": [
    {
      "platform": "Hue",
      "users": {
        "001788FFFE7D5840": "Lc6JJ2hxa26wOzZm1dUGHX3CdVcv9k6C1Ucj5yO7"
      }
    }
  ]
[25/05/2024, 12:05:20] [Phillips Hue] Hue Bridge: 1 accessories
[25/05/2024, 12:05:20] [Phillips Hue] masked debug info dumped to /var/lib/homebridge/homebridge-hue.json.gz
[25/05/2024, 12:05:20] Initializing platform accessory 'Hue Bridge'...
[25/05/2024, 12:05:20] [Phillips Hue] Hue Bridge: 2 services
Setup Payload:
X-HM://0023XISELY8NW
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ 278-64-397 │     
    └────────────┘     

[25/05/2024, 12:05:21] Homebridge v1.8.2 (HAP v0.12.1) (Homebridge E1E8) is running on port 51249.
[25/05/2024, 12:05:21] [Phillips Hue] Hue Bridge: event stream connected to https://192.168.1.201/eventstream/clip/v2
[25/05/2024, 12:05:28] [UniFi Protect] 192.168.1.1: API error: 499 - 
[25/05/2024, 12:05:39] [UniFi Protect] 192.168.1.1: API error: 499 - 
[25/05/2024, 12:05:50] [UniFi Protect] 192.168.1.1: API error: 499 - 
[25/05/2024, 12:06:01] [UniFi Protect] 192.168.1.1: API error: 499 - 
[25/05/2024, 12:06:13] [UniFi Protect] 192.168.1.1: API error: 499 - 
[25/05/2024, 12:06:25] [UniFi Protect] 192.168.1.1: API error: 499 -

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

dzz5hj commented 1 month ago

Screenshot from the VERIFY authenticator app

IMG_85449A539906-1

hjdhjd commented 1 month ago

This has been covered in several prior issues. This won't be worked on. You're welcome to take the time to read through the previous issues to understand why this is not a problem.

Adding references to the documentation and other places this has been covered extensively:

Documentation: Prerequisites

Prior support requests on this topic: https://github.com/hjdhjd/homebridge-unifi-protect/issues/1075#issuecomment-2127858861 https://github.com/hjdhjd/homebridge-unifi-protect/issues/1057#issuecomment-2041266998