aiounifi
aiounifi copied to clipboard
WAN stats for unifi controller
Would like to see WAN statistics for Unifi Controller:
- TX
- RX
- IP
- 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:
-
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. -
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:
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
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
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