Skip to main content

@stack72/ubiquity

v2026.03.10.1

Collects and monitors traffic data from a Ubiquiti UniFi Dream Machine (UDM, UDM Pro, UDM SE, etc.).

Data Collected

  • Site Traffic - Hourly WAN and WLAN traffic totals for the past 24 hours
  • Client Traffic - Per-device usage, signal strength, and connection details
  • DPI Stats - Deep packet inspection category breakdown (when available)

Connection Modes

  • Local - Direct connection to the UDM over your local network
  • Cloud - Via Ubiquiti's cloud API (better device name resolution)
  • Both (recommended) - Cloud mode with local credentials as fallback

Repository

https://github.com/stack72/swamp-ubiquity

Quality score

How well-documented and verifiable this extension is.

Not yet scored.

A score will be generated the next time this extension is published. The owner can also trigger scoring manually.

Install

$ swamp extension pull @stack72/ubiquity

@stack72/unifi-trafficv2026.03.06.13unifi_traffic.ts

Global Arguments

ArgumentTypeDescription
modeenumConnection mode: 'local' for direct UDM access, 'cloud' for remote via api.ui.com
host?stringUDM IP address or hostname (required for local mode, e.g. 192.168.1.1)
username?stringLocal admin username (required for local mode)
password?stringLocal admin password (required for local mode)
sitestringUniFi site name
apiKey?stringUniFi Cloud API key (required for cloud mode)
collectCollect traffic data from the UniFi Dream Machine for the past 24 hours (local or cloud)

Resources

siteTraffic(infinite)— Hourly site traffic data for the past 24 hours
clientTraffic(infinite)— Current client traffic snapshot with top talkers
dpiStats(infinite)— Deep packet inspection category breakdown

Files

log(text/plain)— Collection log