uniFi plugin setup help!

Posted on
Sun May 24, 2020 8:36 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi plugin setup help!

The config parameter for the web page login is wrong
Not api/s but the one with login


Sent from my iPhone using Tapatalk

Posted on
Sun May 24, 2020 10:39 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: uniFi plugin setup help!

I think you are telling me to add something to the ...http Api Login page, which is circled below. Should I put:

api/s/login,

api/s/username:password

Or something else? I have tried a bunch of stuff and keep getting errors.

Code: Select all
 uniFiAP Error                   UNIFI executeCMDOnController  login cmd:/usr/bin/curl --insecure -c /tmp/unifiCookie -H "Content-Type: application/json" --data '{"username": "UserName", "strict": true, "password": "PassWord"}' 'https://10.0.1.1:8443/api/s/login'
gives  error: {"meta":{"rc":"error","msg":"api.err.LoginRequired"},"data":[]}
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   126  100    63  100    63   1517   1517 --:--:-- --:--:-- --:--:--  1536



Also, I added in my AP, which seem to work fine. Devices populate and appear to keep track of the up/down status. However, I added switches.... both the APs and the switches use the same username and password... but getting authentication errors for the switches.

Code: Select all
uniFiAP Error                   getMessages: (1 - test connect)  error for SWdict, ip#: 10.0.1.83 wrong ip/ password or system down or ssh timed out or ..?
   uniFiAP Error                   testServerIf ssh connection to server failed, cmd: /usr/bin/expect '/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/uniFiAP.indigoPlugin/Contents/Server Plugin/test.exp' 'UserName' 'PassWord' 10.0.1.84
   uniFiAP Error                   getMessages: (1 - test connect)  error for SWdict, ip#: 10.0.1.84 wrong ip/ password or system down or ssh timed out or ..?
   uniFiAP Error                   getMessages: (1 - test connect)  error for APtail, ip#: 10.0.1.95 wrong ip/ password or system down or ssh timed out or ..?
Attachments
UDM api s login.jpeg
UDM api s login.jpeg (145.22 KiB) Viewed 1365 times

Posted on
Mon May 25, 2020 6:09 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi plugin setup help!

/api/login as shown in the line below

either
/api/login for UDM and std
or
/api/auth/login for UDMpro

Use the latest version, select the controller type you have, then click on set parameters
that should fill the fields with the proper values

Karl

Posted on
Mon May 25, 2020 8:02 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: uniFi plugin setup help!

I set login as noted in the pic.
Based on this.... api.err.Ubic2faTokenRequired"},"data":[]} I turned off 2FA and that seems to have done the trick. Thanks!

Code: Select all
   uniFiAP Error                   UNIFI executeCMDOnController  login cmd:/usr/bin/curl --insecure -c /tmp/unifiCookie -H "Content-Type: application/json" --data '{"username": "USERNAME", "strict": false, "password": "PASSWORD"}' 'https://10.0.1.1:8443/api/login'
gives  error: {"meta":{"rc":"error","msg":"api.err.Ubic2faTokenRequired"},"data":[]}
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   134  100    70  100    64     68     62  0:00:01  0:00:01 --:--:--    68
100   134  100    70  100    64     68     62  0:00:01  0:00:01 --:--:--    68


One other problem is that my switches seem to be kicking me out for SSH. Any ideas on that? Results in an error.

Posted on
Mon May 25, 2020 8:18 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: uniFi plugin setup help!

could you be more specific:
"One other problem is that my switches seem to be kicking me out for SSH"
when and how? after you login or when trying to login and how to you test?
be explicit!

Karl

Who is online

Users browsing this forum: No registered users and 1 guest