hjdhjd / homebridge-unifi-access

UniFi Access plugin for HomeKit (Homebridge)
Other
50 stars 6 forks source link

API Connection failed #30

Open Jamster0815 opened 3 hours ago

Jamster0815 commented 3 hours ago

Homebridge UniFi Access Version

V1.5.0

Homebridge Platform and OS

Proxmox Server/ Ubuntu Server 22.0.4

Homebridge Version

1.8.5

Node Version

v20.18.0

UniFi OS Version

4.0.21

UniFi Access Controller Version

2.5.2

Describe the problem

Cant connect to the API of the Unifi Access Controller - Credentials are not saved Access Controller is pingable from Homebridge VM

Homebridge HBUA JSON configuration

{
    "name": "UniFi Access",
    "platform": "UniFi Access",
    "_bridge": {
        "username": "0E:CC:D1:7A:E6:E5",
        "port": 31083,
        "name": "Access",
        "manufacturer": "Unifi"
    }
}

Relevant log output

[11/18/2024, 6:58:37 PM] [UniFi Access] Restarting Process...
[11/18/2024, 6:58:38 PM] [UniFi Access] Launched child bridge with PID 18845
[11/18/2024, 6:58:38 PM] Registering platform 'homebridge-unifi-access.UniFi Access'
[11/18/2024, 6:58:38 PM] [UniFi Access] Loaded homebridge-unifi-access v1.5.0 child bridge successfully
[11/18/2024, 6:58:38 PM] Loaded 0 cached accessories from cachedAccessories.0ECCD17AE6E5.
[11/18/2024, 6:58:38 PM] [UniFi Access] No UniFi Access controllers have been configured.
[11/18/2024, 6:58:38 PM] Homebridge v1.8.5 (HAP v0.12.3) (Access) is running on port 31083.
[11/18/2024, 6:58:38 PM]

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

lattaai13 commented 2 hours ago

Hello, I tried to solve the issue.

This is what I did:

Modified the config.schema.json file to include the necessary fields for configuring the UniFi Access controller. Added 'controllers' array with required fields for address, username, and password. Updated the layout to display these fields in the configuration UI.

You can review changes in this commit: https://github.com/lattaai13/hjdhjd-homebridge-unifi-access-30/commit/5a36c086601f7b4fe213fe8af30229022f8fcd9c.

[!CAUTION] Disclaimer: The commit was created by Latta AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.


This issue was tried to solve for free by Latta AI - https://latta.ai/ourmission

If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.