* fix(integrations): use Unifi default port 8443 when no port is given The node-unifi library hardcodes https:// in its base URL and the Unifi controller API only speaks HTTPS. When a user adds the integration with a bare http:// or https:// URL, getPortFromUrl returned 80 or 443, and the library attempted a TLS handshake on the wrong port. The server's plain HTTP response caused 'EPROTO ... wrong version number'. Derive the port from the user's explicit port, or fall back to 8443 (the integration's defaultPort). Closes #6207. * style: auto-fix lint and format * fix(integrations): support UniFi controller default ports * docs(unifi): resolve review leftovers --------- Co-authored-by: ajnart <ajnart@users.noreply.github.com>
49 lines
1.9 KiB
Plaintext
49 lines
1.9 KiB
Plaintext
---
|
|
title: "Unifi Controller"
|
|
description: "Unifi Controller is a network management platform for Unifi devices."
|
|
hide_title: true
|
|
---
|
|
|
|
import { IntegrationHeader } from "@site/src/components/integrations/header";
|
|
import { IntegrationCapabilites } from "@site/src/components/integrations/widgets";
|
|
import { AddingIntegration } from "@site/src/components/integrations/adding";
|
|
import { IntegrationSecrets } from "@site/src/components/integrations/secrets";
|
|
import { IconTopologyFull } from "@tabler/icons-react";
|
|
import { unifiControllerIntegration } from ".";
|
|
import { networkControllerSummaryWidget } from "@site/docs/widgets/network-controller-summary";
|
|
import { networkControllerStatusWidget } from "@site/docs/widgets/network-controller-status";
|
|
|
|
<IntegrationHeader integration={unifiControllerIntegration} categories={["Network controller"]} />
|
|
|
|
This integration is using the [node-unifi](https://www.npmjs.com/package/node-unifi) library under the hood to connect to the Unifi Controller.
|
|
Therefore it should support CloudKey Gen1, CloudKey Gen2, UnifiOS-based UDM-Pro controllers as well as self-hosted UniFi controllers.
|
|
|
|
### Widgets & Capabilities
|
|
|
|
<IntegrationCapabilites
|
|
items={[{ widget: networkControllerSummaryWidget }, { widget: networkControllerStatusWidget }]}
|
|
/>
|
|
|
|
### Adding the integration
|
|
|
|
<AddingIntegration />
|
|
|
|
Use the local HTTPS address of your controller:
|
|
|
|
- UniFi OS consoles such as Dream Router, Dream Machine, Cloud Gateway, and CloudKey use `https://<host>` (port 443).
|
|
- Self-hosted UniFi Network Servers normally use `https://<host>:8443`.
|
|
- If you omit the port, Homarr tries port 443 first and then port 8443 when the first port cannot be reached.
|
|
|
|
Use a local administrator account. Cloud-only accounts and accounts with multi-factor authentication are not supported by the underlying client.
|
|
|
|
### Secrets
|
|
|
|
<IntegrationSecrets
|
|
secrets={[
|
|
{
|
|
credentials: ["username", "password"],
|
|
steps: [],
|
|
},
|
|
]}
|
|
/>
|