Clean re-install of uniFi-WiFi-AP can't be configured

Posted on
Wed Dec 13, 2023 6:43 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Clean re-install of uniFi-WiFi-AP can't be configured

Line 8 in /Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/uniFiAP.indigoPlugin/Contents/Server Plugin/cyclePort.exp
This is correct:
Code: Select all
if  {[lindex $argv 4] == "yes"} {spawn  ssh -o StrictHostKeyChecking=no $userID@$ipNumber} else {spawn  ssh $userID@$ipNumber}

has a blank after else missing. (before the { )

I will publish a new version later.
You could fix that yourself quickly by editing the file and add a blank after "else"
(don't use textedit or word ..)

Karl

Posted on
Wed Dec 13, 2023 7:17 am
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Clean re-install of uniFi-WiFi-AP can't be configured

Added the blank in the file, but there is still no reaction when trying to power cycle the switch port. MAC address shows correctly on the switch port in the plugin, but nothing happens when I execute the action.

Peter

Skickat från min SM-S901B via Tapatalk

Posted on
Wed Dec 13, 2023 1:19 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Clean re-install of uniFi-WiFi-AP can't be configured

could you switch on debug 7 and 7.1 (EXPECT)

execute the action or menu point

then you should see some thing like this in /Library/Application Support/Perceptive Automation/Indigo 2023.1/Logs/com.karlwachs.uniFiAP/plugin.log:
Code: Select all
2023-12-13 13:37:19 RECYCLE: /usr/bin/expect '/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/uniFiAP.indigoPlugin/Contents/Server Plugin/cyclePort.exp' 'userid' 'password' 192.168.1.xx  8 '9\# '  yes  &
.....
2023-12-13 13:37:24 RECYCLE returned: spawn ssh userid@192.168.1.14

userid@192.168.1.14's password:


BusyBox v1.25.1 () built-in shell (ash)


  ___ ___      .__________.__
 |   |   |____ |__\_  ____/__|
 |   |   /    \|  ||  __) |  |   (c) 2010-2023
 |   |  |   |  \  ||  \   |  |   Ubiquiti Inc.
 |______|___|  /__||__/   |__|
            |_/                  https://www.ui.com

      Welcome to UniFi US-8-60W!

********************************* NOTICE **********************************
* By logging in to, accessing, or using any Ubiquiti product, you are     *
* signifying that you have read our Terms of Service (ToS) and End User   *
* License Agreement (EULA), understand their terms, and agree to be       *
* fully bound to them. The use of SSH (Secure Shell) can potentially      *
* harm Ubiquiti devices and result in lost access to them and their data. *
* By proceeding, you acknowledge that the use of SSH to modify device(s)  *
* outside of their normal operational scope, or in any manner             *
* inconsistent with the ToS or EULA, will permanently and irrevocably     *
* void any applicable warranty.                                           *
***************************************************************************

sw-Leo-US.6.5.59# telnet localhost 23


Entering character mode

Escape character is '^]'.


Warning!
The changes may break controller settings and only be effective until reboot.

(UBNT) >enable

(UBNT) #configure

(UBNT) (Config)#interface 0/8

(UBNT) (Interface 0/8)#poe opmode shutdown

(UBNT) (Interface 0/8)#poe opmode auto

(UBNT) (Interface 0/8)#exit

(UBNT) (Config)#exit

(UBNT) #exit

(UBNT) >exitConnection closed by foreign host
sw-Leo-US.6.5.59# exit
Connection to 192.168.1.14 closed.
and userid / password should be yours


Karl

Posted on
Wed Dec 13, 2023 3:42 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Clean re-install of uniFi-WiFi-AP can't be configured

Output looks like this, one attempt with action group and one attemt from plug in menu:

Code: Select all
2023-12-13 22:33:36 RECYCLE: /usr/bin/expect '/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/uniFiAP.indigoPlugin/Contents/Server Plugin/cyclePort.exp' ‘USER’ ‘PASS’ 192.168.9.7 2 '9\# '  no  &
2023-12-13 22:33:42 RECYCLE returned: spawn ssh USER@192.168.9.7

USER@192.168.9.7's password:


BusyBox v1.25.1 () built-in shell (ash)


  ___ ___      .__________.__
 |   |   |____ |__\_  ____/__|
 |   |   /    \|  ||  __) |  |   (c) 2010-2023
 |   |  |   |  \  ||  \   |  |   Ubiquiti Inc.
 |______|___|  /__||__/   |__|
            |_/                  https://www.ui.com

      Welcome to UniFi USW-Lite-16-PoE!

********************************* NOTICE **********************************
* By logging in to, accessing, or using any Ubiquiti product, you are     *
* signifying that you have read our Terms of Service (ToS) and End User   *
* License Agreement (EULA), understand their terms, and agree to be       *
* fully bound to them. The use of SSH (Secure Shell) can potentially      *
* harm Ubiquiti devices and result in lost access to them and their data. *
* By proceeding, you acknowledge that the use of SSH to modify device(s)  *
* outside of their normal operational scope, or in any manner             *
* inconsistent with the ToS or EULA, will permanently and irrevocably     *
* void any applicable warranty.                                           *
***************************************************************************

sw05studio-US.6.5.59# telnet localhost 23
-sh: telnet: not found
sw05studio-US.6.5.59# enable
-sh: enable: not found
sw05studio-US.6.5.59# configure
-sh: configure: not found
sw05studio-US.6.5.59# interface 0/2
-sh: interface: not found
sw05studio-US.6.5.59# poe opmode shutdown
-sh: poe: not found
sw05studio-US.6.5.59# poe opmode auto
-sh: poe: not found
sw05studio-US.6.5.59# exit
Connection to 192.168.9.7 closed.

-
2023-12-13 22:34:06 RECYCLE: /usr/bin/expect '/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/uniFiAP.indigoPlugin/Contents/Server Plugin/cyclePort.exp' ‘USER’ ‘PASS’ 192.168.9.7 2 '9\# '  no  &
2023-12-13 22:34:12 RECYCLE returned: spawn ssh USER@192.168.9.7

USER@192.168.9.7's password:


BusyBox v1.25.1 () built-in shell (ash)


  ___ ___      .__________.__
 |   |   |____ |__\_  ____/__|
 |   |   /    \|  ||  __) |  |   (c) 2010-2023
 |   |  |   |  \  ||  \   |  |   Ubiquiti Inc.
 |______|___|  /__||__/   |__|
            |_/                  https://www.ui.com

      Welcome to UniFi USW-Lite-16-PoE!

********************************* NOTICE **********************************
* By logging in to, accessing, or using any Ubiquiti product, you are     *
* signifying that you have read our Terms of Service (ToS) and End User   *
* License Agreement (EULA), understand their terms, and agree to be       *
* fully bound to them. The use of SSH (Secure Shell) can potentially      *
* harm Ubiquiti devices and result in lost access to them and their data. *
* By proceeding, you acknowledge that the use of SSH to modify device(s)  *
* outside of their normal operational scope, or in any manner             *
* inconsistent with the ToS or EULA, will permanently and irrevocably     *
* void any applicable warranty.                                           *
***************************************************************************

sw05studio-US.6.5.59# telnet localhost 23
-sh: telnet: not found
sw05studio-US.6.5.59# enable
-sh: enable: not found
sw05studio-US.6.5.59# configure
-sh: configure: not found
sw05studio-US.6.5.59# interface 0/2
-sh: interface: not found
sw05studio-US.6.5.59# poe opmode shutdown
-sh: poe: not found
sw05studio-US.6.5.59# poe opmode auto
-sh: poe: not found
sw05studio-US.6.5.59# exit
Connection to 192.168.9.7 closed.

Posted on
Thu Dec 14, 2023 7:53 am
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Clean re-install of uniFi-WiFi-AP can't be configured

Did some testing, it appears as this switch model can't control PoE from switch CLI but from the switch Linux OS, this is for switch port 2 and works well:

Code: Select all
sw05studio-US.6.5.59# /bin/swctrl poe set off id 2
sw05studio-US.6.5.59# /bin/swctrl poe set auto id 2

Posted on
Thu Dec 14, 2023 8:56 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Clean re-install of uniFi-WiFi-AP can't be configured

Could you send me device type defined in UniFi?

Set debug print dict to prefs directory

Then you should get one json file for each device. I need the one from the Controller.
Could you email that one to me at karlwachs at me com

You should remove userids and passwords.


Karl


Sent from my iPhone using Tapatalk

Posted on
Thu Dec 14, 2023 9:55 am
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Clean re-install of uniFi-WiFi-AP can't be configured

Sure, I have the file and was about to clear from passwords, but can't find any. Should there be passwords in the file, am I just missing them? (Or usernames?)

Posted on
Thu Dec 14, 2023 10:01 am
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Clean re-install of uniFi-WiFi-AP can't be configured

Meanwhile, the models are:

"model": "US8P150"
This can configure PoE from switch CLI.

"model": "USF5P"
This can NOT configure PoE from switch CLI, need to be done from Linux.

"model": "USL16LP"
This can NOT configure PoE from switch CLI, need to be done from Linux.

I'll send you the json file when I understand if I should clear any passwords... :-)

Posted on
Thu Dec 14, 2023 10:24 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Clean re-install of uniFi-WiFi-AP can't be configured

There might not be any password.


Sent from my iPhone using Tapatalk

Posted on
Thu Dec 14, 2023 10:30 am
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Clean re-install of uniFi-WiFi-AP can't be configured

Ok, e-mail sent.

Peter

Posted on
Thu Dec 14, 2023 2:30 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Clean re-install of uniFi-WiFi-AP can't be configured

Those new commands also work on my devices.

I have added an option to pick cli or Unix command.

Still testing.


Sent from my iPhone using Tapatalk

Posted on
Fri Dec 15, 2023 12:59 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Clean re-install of uniFi-WiFi-AP can't be configured

please check v ...369 just posted, in config switch section select unix swctrl option . that should work for all switches.

Posted on
Fri Dec 15, 2023 3:49 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Clean re-install of uniFi-WiFi-AP can't be configured

Did some quick testing, looks good. Thanks!

Peter

Posted on
Sat Dec 16, 2023 2:19 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: Clean re-install of uniFi-WiFi-AP can't be configured

Thanks for suggestion the new way of doing Poe commands.


Sent from my iPhone using Tapatalk

Who is online

Users browsing this forum: No registered users and 7 guests