aiounifi icon indicating copy to clipboard operation
aiounifi copied to clipboard

WAN stats for unifi controller

Open Paktas opened this issue 1 year ago • 2 comments

Would like to see WAN statistics for Unifi Controller:

  1. TX
  2. RX
  3. IP
  4. Uptime

These are the Main components of any network and should be available for users.

As per UNIFI API wiki there are 2 ways to get it:

  1. api/stat/sites | GET | Get basic information for all sites on this controller with an additional information on health and new alerts for each site.

  2. stat/report/{interval}.{type} | POST | Intervals are '5minutes', 'hourly', and 'daily'. Report types are 'site', 'user', and 'ap'. Must specify attributes to be returned 'bytes', 'wan-tx_bytes', 'wan-rx_bytes', 'wlan_bytes', 'num_sta', 'lan-num_sta', 'wlan-num_sta', 'time', 'rx_bytes', 'tx_bytes'. Can be filtered with 'macs': […]

A similar JSON response is generated: image

Requested in other places:

  • #323
  • #488
  • https://github.com/home-assistant/home-assistant.io/issues/28463
  • https://community.home-assistant.io/t/unifi-global-bandwidth-monitoring/361634

Paktas avatar Dec 28 '23 11:12 Paktas

Thanks for this detailed request. I'm a bit preoccupied with other things right now so I can't promise when I can get to this

Kane610 avatar Jan 20 '24 08:01 Kane610

RX and TX has been merged and will be available with 2024.5.0 release, it's done by providing data for all ports for all devices so you can yourself select what data is interesting. Please try out the beta

Kane610 avatar Apr 23 '24 19:04 Kane610