1.6 KiB
1.6 KiB
UniFi Network Monitoring Skill
📡 Monitor your UniFi network via the local controller API.
Quick Start
-
Copy the config template:
mkdir -p ~/.clawdbot/credentials/unifi cp config.json.example ~/.clawdbot/credentials/unifi/config.json -
Edit the config with your UniFi controller details:
{ "url": "https://HA_IP:8443", "username": "admin", "password": "your_password", "site": "default" } -
Run a command:
cd ~/.openclaw/workspace/skills/unifi bash scripts/devices.sh
Available Commands
| Command | Description |
|---|---|
dashboard.sh |
Full network dashboard (all stats) |
devices.sh |
UniFi devices (APs, switches, gateway) |
clients.sh |
Connected clients |
health.sh |
Network health overview |
top-apps.sh [N] |
Top bandwidth apps (default: 10) |
alerts.sh [N] |
Recent alerts (default: 20) |
All commands support json argument for raw JSON output:
bash scripts/clients.sh json
For USG with Controller on Home Assistant
Since your controller runs on the HA box at 192.168.0.39, the API URL is:
https://192.168.0.39:8443(standard UniFi controller port)
You may need to:
- Create a local admin account in UniFi (not SSO)
- Allow insecure HTTPS (the scripts use
-kflag) - Ensure DPI is enabled in UniFi settings for
top-apps.shto work
Troubleshooting
Login fails: Check username/password, ensure local admin account (not UniFi SSO) Empty data: DPI may be disabled in UniFi settings Connection refused: Verify controller is running and accessible at the URL