new error

Posted on
Fri Mar 27, 2020 8:18 pm
farberm offline
Posts: 393
Joined: Feb 24, 2008

new error

Karl:
I upgraded the plugin recently and now notice the following error. Not sure why. I have not changed my username or pw or ip address of the USG


uniFiAP Error UNIFI executeCMDOnController error: (wrong UID/passwd, ip number?) ...>>{"meta":{"rc":"error","msg":"api.err.Invalid"},"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 49 0 0 100 49 0 34 0:00:01 0:00:01 --:--:-- 34
100 106 100 57 100 49 26 22 0:00:02 0:00:02 --:--:-- 48
100 106 100 57 100 49 26 22 0:00:02 0:00:02 --:--:-- 48
Connection

Posted on
Fri Mar 27, 2020 9:31 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: new error

could you open config and check if the userid /pass wd are correct.

You can also do menu "PRINT parameters to logfile" / "PRINT Config parameters to logfile "
the output will be in /Library/Application Support/Perceptive Automation/Indigo 7.4/Logs/com.karlwachs.uniFiAP/plugin.log

Karl

Posted on
Fri Mar 27, 2020 9:55 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: new error

Also could you switch debug expect on

Email me the plugin.log file

It will contain userid and passwords!!


Sent from my iPhone using Tapatalk

Posted on
Sat Mar 28, 2020 9:00 am
farberm offline
Posts: 393
Joined: Feb 24, 2008

Re: new error

Thanks for your help.

I updated the USG controller software which which now recognized capital letters and lowercase differently. I adjusted my login name which had a capital instead of a lower case letter in it
Thanks for your help.

They only error now is the following which is standard I think.

Correct?

uniFiAP Error logger enabled for ERROR ==> TEST ONLY
uniFiAP Critical Error logger enabled for CRITICAL ==> TEST ONLY

Posted on
Sat Mar 28, 2020 9:12 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: new error

Yes as it states: It’s a test.

Should show you what kind of logging is enabled.


Sent from my iPhone using Tapatalk

Posted on
Thu Apr 02, 2020 10:01 am
Different Computers offline
User avatar
Posts: 2541
Joined: Jan 02, 2016
Location: East Coast

Re: new error

Same error?
Code: Select all
uniFiAP Error                    Connection error: >>{"meta":{"rc":"error","mac":"a4:f1:e8:12:f1:1a","msg":"api.err.UnknownStation"},"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   137  100    90  100    47    707    369 --:--:-- --:--:-- --:--:--   708


Not regular, and the plugin appears to be working correctly, with no recent changes to my setup.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Thu Apr 02, 2020 10:57 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: new error

how often does it happen? Anything < 3 minutes could be a problem , if it happens infrequently , the box might be busy and does not answer properly, and it is fixed in the next cycle

Karl

Posted on
Fri May 22, 2020 6:15 pm
DPattee offline
Posts: 453
Joined: Jan 14, 2004
Location: Redmond, WA

Re: new error

I started getting the user/pass error too immediately after upgrading the plugin. No changes to the user/pass on my controller in a long time, and the Indigo plugin UI shows the correct info still.

Code: Select all
   uniFiAP Error                   UNIFI executeCMDOnController error: (wrong UID/passwd, ip number?10.0.4.2) ...>>{"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   132  100    63  100    69    465    509 --:--:-- --:--:-- --:--:--   511


Plugin v: 7.30.238
Controller type is a Cloud Key Plus v2

Posted on
Fri May 22, 2020 10:10 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: new error

could you switch on debug (7) and (8)
connection and expect

then restart the plugin, in plugin.log check the "expect" statements if the proper userid / password are used.

you are looking for a line w
... curl --insecure -c /tmp/unifiCookie -H \"Content-Type: application/json\" --data {"username":youruserid,"password":yourpasswd,"strict":self.useStrictToLogin}) ...
and
...curl+" --insecure -b /tmp/unifiCookie " ... + " 'https://" ...

Posted on
Sat May 23, 2020 7:51 pm
DPattee offline
Posts: 453
Joined: Jan 14, 2004
Location: Redmond, WA

Re: new error

Okay, so here's some more information...

In the plugin settings, in the 'user IDs' section I have:
1. http fopr controller: <name1>, <password1>
2. ssh: <name2>, <password2>

And those match teh accounts that I've set in the UniFi dashbaord:
1. <name1><password1> is a custom Admins : Network Administrator, given the Administrator role
2. <name2><password2> is the Network Settings : Device Authenticaion : SSH Authentication : SSH Username & password

What I see in the logs is:


Code: Select all
18:47:40 Connection: /usr/bin/curl --insecure -c /tmp/unifiCookie -H "Content-Type: application/json" --data '{"username": "<name1>", "strict": false, "password": "<password1>"}' 'https://10.0.4.2:8443/api/s/'
2020-05-23 18:47:40.740   ERROR          Plugin.executeCMDOnController    UNIFI executeCMDOnController error: (wrong UID/passwd, ip number?10.0.4.2) ...>>{"meta":{"rc":"error","msg":"api.err.LoginRequired"},"data":[]}<<


Happening either every few seconds or minutes depending on... maybe when I restart the plugin it does it a bunch in a row then settles in to the minute or so timing.

Posted on
Sat May 23, 2020 8:34 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: new error

could you open a terminal and try:
Code: Select all
/usr/bin/curl --insecure -c /tmp/unifiCookie -H "Content-Type: application/json" --data '{"username": "<name1>", "strict": false, "password": "<password1>"}' 'https://10.0.4.2:8443/api/login/'

put in userid and password

your config should look like:
Screen Shot 2020-05-23 at 21.31.33.png
Screen Shot 2020-05-23 at 21.31.33.png (34.96 KiB) Viewed 2088 times


Karl

Posted on
Sun May 24, 2020 10:49 am
DPattee offline
Posts: 453
Joined: Jan 14, 2004
Location: Redmond, WA

Re: new error

Code: Select all
  /usr/bin/curl --insecure -c /tmp/unifiCookie -H "Content-Type: application/json" --data '{"username": "<user1>", "strict": false, "password": "<pass1>"}' 'https://10.0.4.2:8443/api/login/'

{"meta":{"rc":"error","msg":"api.err.Invalid"},"data":[]}


And that screenshot doesn't match what I see in the config... Specifically the http: Api Login Page: is set to /api/s. I'll edit that and see what happens.
Attachments
Screen Shot 2020-05-24 at 9.47.49 AM.png
Screen Shot 2020-05-24 at 9.47.49 AM.png (84.28 KiB) Viewed 2057 times

Posted on
Sun May 24, 2020 10:54 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: new error

1. site ID should be default --Only if you have done MAJOR configs w several sites this parameter could be something else than default
2. the lines under login and web site are the known options to be used.
==>> YOU NEED TO PICK THE RIGHT ONE!! the option fields are setup as a text field (read only) so that you can copy the text

Karl

Posted on
Sun May 24, 2020 1:35 pm
DPattee offline
Posts: 453
Joined: Jan 14, 2004
Location: Redmond, WA

Re: new error

1. site ID should be default --Only if you have done MAJOR configs w several sites this parameter could be something else than default


Yes, my site id is correct

2. the lines under login and web site are the known options to be used.
==>> YOU NEED TO PICK THE RIGHT ONE!! the option fields are setup as a text field (read only) so that you can copy the text


Sure. I've updated it and that seems to have solved the problem. My point is that I used to have a working install, I updated, and it stopped working. Something caused that field to become corrupt/wrong/ changed/etc, because I certainly didn't type "s" in there :) I didn't even look at that part of the settings as part of troubleshooting, because I was paying attention to the username/password as the problem. Perhaps an error message could be created that identifies when a parameter is set to something unexpected / unrecommended.

Posted on
Sun May 24, 2020 2:27 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: new error

I understand your frustration, I am not perfect

as for the options: I have made it a free text field to enable the user to put in anything they need
A menu option would limit it to fixed options.

It looks as if UNIFI is changing web pages and other things frequently without notice.

That is why I thought a text field is the proper choice. Limiting the choices to the known options makes it less flexible. Thats why I added the option fields to list the know variations.

Karl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron