Files
openclaw-workspace/skills/unifi/README.md
2026-04-11 09:45:12 -05:00

60 lines
1.6 KiB
Markdown

# UniFi Network Monitoring Skill
📡 Monitor your UniFi network via the local controller API.
## Quick Start
1. **Copy the config template**:
```bash
mkdir -p ~/.clawdbot/credentials/unifi
cp config.json.example ~/.clawdbot/credentials/unifi/config.json
```
2. **Edit the config** with your UniFi controller details:
```json
{
"url": "https://HA_IP:8443",
"username": "admin",
"password": "your_password",
"site": "default"
}
```
3. **Run a command**:
```bash
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
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:
1. Create a local admin account in UniFi (not SSO)
2. Allow insecure HTTPS (the scripts use `-k` flag)
3. Ensure DPI is enabled in UniFi settings for `top-apps.sh` to 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