Skip to content

UniFi

localby ALYT

adds sensors and cameras.

Method: form. An API key from the console: UniFi Network, Settings, Control Plane, Integrations, Create API key. It stays on your network.

FieldKindRequired
Console address (consoleUrl)textyes
API key (apiKey)password, secretyes
Phones that mean someone is home (phones)textno

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.

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"
}
}

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.

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.

The connector brings three useful views:

  • presence sensors for the named phones, with home and since
  • the network’s own devices, such as the router and each access point, as network things
  • 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.

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.

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.

Last updated