UniFi
localby ALYT
What it adds to a house
Section titled “What it adds to a house”adds sensors and cameras.
How a person connects it
Section titled “How a person connects it”Method: form. An API key from the console: UniFi Network, Settings, Control Plane, Integrations, Create API key. It stays on your network.
| Field | Kind | Required |
|---|---|---|
Console address (consoleUrl) | text | yes |
API key (apiKey) | password, secret | yes |
Phones that mean someone is home (phones) | text | no |
What it can look for
Section titled “What it can look for”Yes: “Look at the network”.
What stops working when it is disconnected
Section titled “What stops working when it is disconnected”Presence stops updating and the network’s view of each device goes stale.
The descriptor
Section titled “The descriptor”Connection fields are served for a program at /connectors/unifi.json.
{ "source": "built-in", "visibility": "public", "listed": true, "version": "1.0.0", "docsUrl": "https://developers.alyt.com/connectors/unifi", "kind": "UNIFI", "logo": { "url": "/integrations/logos/unifi.svg", "color": "#0559C9", "ratio": 1, "background": "#FFFFFF", "inset": 0.12, "scale": 1 }, "name": "UniFi", "icon": "router", "connectivity": "local", "brings": [ "sensor", "camera" ], "connect": { "method": "form", "help": "An API key from the console: UniFi Network, Settings, Control Plane, Integrations, Create API key. It stays on your network.", "fields": [ { "key": "consoleUrl", "label": "Console address", "kind": "text", "secret": false, "required": true, "placeholder": "https://192.168.1.1", "help": "The router's address, with https." }, { "key": "apiKey", "label": "API key", "kind": "password", "secret": true, "required": true }, { "key": "phones", "label": "Phones that mean someone is home", "kind": "text", "secret": false, "required": false, "placeholder": "Luca's iPhone, Anna's Pixel", "help": "Their names as UniFi shows them in the client list, separated by commas. Each becomes a presence sensor. They must be on the Wi-Fi when you connect, so ALYT can learn which is which." } ] }, "discovery": { "surface": "integrations", "verb": "Look at the network" }, "disconnect": { "consequence": "Presence stops updating and the network's view of each device goes stale." }, "author": { "kind": "alyt", "name": "ALYT", "url": "https://alyt.com" }}The guide
Section titled “The guide”ALYT’s UniFi connector uses your local UniFi console on the LAN, not Ubiquiti’s cloud. You connect it once with the console address, an API key from UniFi Network, and optional phone names that should count as “someone is home.” After that, it reads the network, keeps presence current from Wi‑Fi association, and exposes the router and access points as network things. It cannot control UniFi; it only reads. If the console or network is unavailable, cloud-free local features can keep working, but anything that depends on the UniFi console stops until the console is reachable again.
What you connect
Section titled “What you connect”Use the console address with https://, for example a router address on your LAN. Provide the API key from UniFi Network → Settings → Control Plane → Integrations → Create API key. The key stays on your network. If you supply phone names, enter them exactly as UniFi shows them in the client list, separated by commas. Those phones must already be on the Wi‑Fi when you connect, because ALYT learns which client belongs to which person from the live client list.
The first site is used when the console has more than one site. The connector pins the console certificate fingerprint it sees at connect time and refuses a different certificate later. If the key is rejected, the connector does not store it.
What it exposes
Section titled “What it exposes”The connector brings three useful views:
- presence sensors for the named phones, with
homeandsince - the network’s own devices, such as the router and each access point, as
networkthings - the network view of other devices that appear on the client list, when the rest of the platform uses that stored view
A phone that is on the Wi‑Fi is home. When it drops off the network, ALYT waits before marking it away, because phones may sleep and leave Wi‑Fi for a few minutes at a time. The default delay is 10 minutes. Presence is tied to the client list and the last seen time, so after a restart an absence is measured from the restart until fresh state is learned again.
Network things report whether they are online, how many clients are attached, their address, and their model. Discovery reads the client list and the device list again so the stored view stays current.
What it cannot do
Section titled “What it cannot do”This connector does not write to UniFi and does not change router, access point, or client settings. It answers 400 for write attempts. It also does not discover phones that are not on the Wi‑Fi at connect time, because the console only shows connected clients for matching. For consoles with several sites, only the first site is used.
When it fails
Section titled “When it fails”Check these first:
- the console address uses
https://and reaches the local UniFi console - the API key was created in UniFi Network and copied exactly once
- the named phones are currently on the Wi‑Fi when you connect
- the console certificate has not changed since the last successful connect
- the network client list still shows the phone or device you expect
If a phone is not matched yet, reconnect when that phone is back on Wi‑Fi. If a network device stops reporting, verify that the console still lists it as connected and online. If the console is unreachable, presence and network state stop updating until the LAN path returns.