unifi

Review·Scanned 2/18/2026

This skill monitors a local UniFi gateway and runs bundled shell scripts to fetch read-only data from the device. It reads credentials from ~/.clawdbot/credentials/unifi/config.json, uses curl to call https://10.1.0.1, and runs bash scripts (scripts/*.sh), requiring network and local credential access.

from clawhub.ai·v1.0.1·35.7 KB·0 installs
Scanned from 1.0.1 at ca12714 · Transparency log ↗
$ vett add clawhub.ai/jmagar/unifiReview findings below

UniFi Skill

Monitor your UniFi network via the local gateway API from Clawdbot.

What It Does

  • Devices — list APs, switches, gateway with status and uptime
  • Clients — show connected devices (hostname, IP, signal, AP)
  • Health — site-wide health status (WAN, LAN, WLAN)
  • DPI — top applications by bandwidth
  • Alerts — recent alarms and events

All operations are read-only and safe for monitoring.

Setup

1. Create a Local Admin Account

  1. Open your UniFi OS console (e.g., https://10.1.0.1)
  2. Go to OS Settings → Admins & Users
  3. Create a new local admin (not cloud/Ubiquiti account)
  4. Note the username and password

2. Create Credentials File

mkdir -p ~/.clawdbot/credentials/unifi
cp config.json.example ~/.clawdbot/credentials/unifi/config.json
# Edit with your actual values

Or create manually:

{
  "url": "https://10.1.0.1",
  "username": "api",
  "password": "your-password-here",
  "site": "default"
}

3. Test It

./scripts/unifi-api.sh
source ./scripts/unifi-api.sh && unifi_get "stat/health"

Usage Examples

Full dashboard

bash scripts/dashboard.sh          # Human-readable
bash scripts/dashboard.sh json     # JSON output

Devices

bash scripts/devices.sh            # All UniFi devices
bash scripts/devices.sh json       # JSON output

Clients

bash scripts/clients.sh            # Active clients
bash scripts/clients.sh json       # JSON output

Health

bash scripts/health.sh             # Network health status

Top applications (DPI)

bash scripts/top-apps.sh           # Top 10 by bandwidth
bash scripts/top-apps.sh 15        # Top 15

Alerts

bash scripts/alerts.sh             # Last 20 alerts
bash scripts/alerts.sh 50          # Last 50

Environment Variables (Alternative)

export UNIFI_URL="https://10.1.0.1"
export UNIFI_USER="api"
export UNIFI_PASS="your-password"
export UNIFI_SITE="default"

Troubleshooting

"UniFi not configured"
→ Check your config file exists at ~/.clawdbot/credentials/unifi/config.json

"Login failed (empty cookie file)"
→ Wrong username/password. Must be a local admin, not Ubiquiti cloud account.

SSL certificate error
→ UniFi uses self-signed certs. The scripts use -k to skip verification.

Empty data or "Invalid site"
→ Most setups use default. Check your site name in the UniFi Network URL.

License

MIT