UniFi Network Smart-Home-Integration, kostenlos und Open Source

Ubiquiti UniFi integration for UCG, UDM, Switches, APs and network presence tracking.
Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.
Connect your Ubiquiti UniFi OS console (UCG Fiber, Dream Machine UDM/UDM-SE, UniFi Express, Cloud Key, or self-hosted UniFi Controller) to Gladys Assistant.
Features
- Network Presence Tracking (Device Tracker): Real-time tracking of smartphones and connected network devices for Gladys presence/absence scenes.
- Internet Access Control: Switch button to block or unblock internet access for any connected client device.
- Switch PoE Port Control: Turn PoE power ON/OFF on switch ports (useful for power cycling IP cameras or Access Points).
- Wi-Fi SSID Control: Enable or disable Wi-Fi networks (e.g., Guest Wi-Fi) from Gladys dashboards or scenes.
- WAN & Gateway Health Metrics: Real-time Upload/Download throughput (Mbps) and Gateway online status.
Local Authentication Guide (100% Local First)
The integration connects directly to your local UniFi console using a local admin account:
Create a dedicated local admin account in UniFi OS:
- Log into your UniFi OS console (
https://192.168.1.1). - In the left navigation bar, click Admins / Users (👥) (or under Control Plane / Identity > Admins).
- Click Add Admin.
- Select Local Access Only.
- Set a username (e.g.
gladys) and password. - Grant Admin role (required to block internet or toggle PoE ports) or Read Only.
- In Gladys, enter your console IP address, username
gladys, and local password.
Usage
- Save configuration in Gladys and click Test UniFi Connection to verify.
- Go to the Discovery tab in Gladys to import your Gateway, network clients, PoE ports, and Wi-Fi networks.
Dashboard widgets
Since Gladys 5.1, the integration offers three widgets in the dashboard editor. They read the integration's last poll (every 30 seconds) and never query the console on their own. No widget shows a MAC or an IP address (the address fragments a nameless client gets in its Gladys name are removed): a dashboard can be public.
- Network: the network at a glance. Two tiles, "Download" and "Upload", and a chart follow the gateway's WAN throughput features, live; the "Clients" (active clients) and "Devices" (UniFi hardware online / total) tiles come from the last poll; the status list gives the Internet state (the console's WAN subsystem), the Wi-Fi, wired and guest clients, and the hardware offline.
- Settings: Gateway (the gateway added to Gladys; empty = the first known gateway) and Chart period (last hour, last day, last week).
- Limits: the throughput and the chart need the gateway to be added to Gladys from the Discovery tab (its features feed the tiles and the history). Without a UniFi gateway (a console that does not route), only the counters and the status list show.
- Presence: who is home, from the network clients added to Gladys, with their Gladys names. A "Present" tile (
n / N) and one row per device (present first, then by name); beyond ten rows, a "+ n more" note. The widget refreshes itself as soon as a presence changes.- Setting: Show (present and absent, or present only).
- Limits: a device not added to Gladys does not appear; rename the devices in Gladys for readable names.
- Wi-Fi: one Wi-Fi network (SSID): its state, its connected clients, whether it is a guest network, its band and security when the console gives them, and two buttons, Enable / Disable. The use case: the guest Wi-Fi, opened for the time of a visit from a wall tablet.
- Setting: Wi-Fi network (the SSID added to Gladys; empty = the first known SSID).
- Limits: the buttons go through the SSID's "Wi-Fi state" feature, so the SSID must be added to Gladys from the Discovery tab. The client count is the Wi-Fi clients whose SSID is this one at the last poll.
Konfigurationseinstellungen
Diese Einstellungen fragt UniFi Network in seinem Konfigurationsbildschirm in Gladys ab.
| Einstellung | Typ | Pflichtfeld | Beschreibung |
|---|---|---|---|
| Local UniFi Connection | section | Nein | Select your authentication mode and enter your local UniFi credentials or local API key. |
| IP Address / Hostname | string | Ja | IP address of your UniFi OS console (e.g. 192.168.1.1). |
| Port | number | Ja | |
| Authentication Mode | select | Ja | |
| Local API Key | secret | Nein | API Key generated in UniFi Network > Integrations. |
| Local Username | string | Nein | Local admin username created in Console > Users & Admins (required if Credentials mode selected). |
| Local Password | secret | Nein | |
| Site ID | string | Ja | |
| Presence Offline Delay (s) | number | Nein | Inactivity delay before marking a device as absent (prevents deep sleep toggling). |
| Device Discovery & Filtering | section | Nein | Configure which devices should be discovered and published to Gladys. |
| Discover Infrastructure (Console, APs, Switches) | boolean | Nein | |
| Discover Network Clients | boolean | Nein | |
| Only Connected Clients (Ignore historical known clients) | boolean | Nein | Only import currently connected clients to prevent importing hundreds of offline historical devices. |
| Client Connection Type | select | Nein | |
| Allowed Wi-Fi SSIDs | string | Nein | Filter Wi-Fi clients by SSID names (comma separated, e.g. Home, IoT). Leave empty to allow all SSIDs. |
So installierst du UniFi Network in Gladys
- Öffne in Gladys Integrationen: UniFi Network erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
- Klicke auf Installieren. Gladys lädt das Docker-Image (
ghcr.io/guim31/gladys-integration-unifi:1.6.0) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration). - Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
- Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/guim31/gladys-integration-unifi.
UniFi Network benötigt Gladys >=5.1.0. Der Katalog in Gladys wird stündlich aktualisiert, eine neue Version ist also spätestens eine Stunde nach ihrer Veröffentlichung verfügbar.
Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.
Über externe Integrationen
UniFi Network ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und führt sie in einer vom Kern isolierten Sandbox aus. Sie wird von guim31 veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.
- Alle externen Integrationen durchsuchen
- Die nativen Integrationen entdecken, die in Gladys eingebaut sind
- Deine eigene externe Integration bauen und veröffentlichen
- Quellcode auf GitHub — Quelle dieser Dokumentation