Art-of-WiFi / UniFi-API-browser

Tool to browse data exposed by Ubiquiti's UniFi Controller API
MIT License
1.1k stars 150 forks source link

Error loading sites or no sites available #110

Open durkin3930 opened 3 months ago

durkin3930 commented 3 months ago

i am looking at a way to monitor unifi network using additional ssh commands remotely from my office. i have 7 companies i look after. my office uses mobile 4g broadband and therefore doesnt have a public ip address, in case this matters. my initial reporting i need is to monitor WAN1 and WAN2 throughput so i know that should a customers ISP fail the ISP will keep them online. Unifi current network controller doesnt offer this as far as i can see but i have stumbled on your tool which apparently will allow me to monitor. i have a Synology NAS which i have installed Web Station and installed PHP 8.2 and APache. i can get the index.php to appear but will not show me any controllers under unifi.ui.com, even though i have specified the same credentials i use when accessing unifi.ui.com and also created a local admin account on one of the sites called api_access but dont see how this would solve the access to the unifi controller. Any help would be appreciated

scyto commented 5 days ago

the app talks directly to the unifi controller device, you should be pointing the app to the IP address of the controller, never unifi.ui.com AFAIK unlesss the author confirms that works, as such you need direct IP connectivity at all times to the controller consider using something like tailscale to do that (you could have one tailnet that includes all sites).

as for what API browser shows you, everything thats availabale via the API

in the health site metrics it will tell you if the WAN port is ok....

for example

"subsystem": "wan",
        "num_gw": 1,
        "num_adopted": 1,
        "num_disconnected": 0,
        "num_pending": 0,
        "status": "ok",

not sure ho reliable this is, but worth looking

you might also find my container an easier way to play (so long as you have the connectivity)