Turn Poe Port on/off by ssh / TL-SG2424P

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.

Turn Poe Port on/off by ssh / TL-SG2424P

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
Turn Poe Port on/off by ssh / TL-SG2424P
Turn Poe Port on/off by ssh / TL-SG2424P
2018-02-06 14:41:58
Model :

Hardware Version :

Firmware Version :

ISP :

Hi,

is somebody able to tell how i can turn on/off one single poe port using ssh.

I want automatically restart a Camera via a script if an problem occur.

Thanks you
  0      
  0      
#1
Options
2 Reply
Re:Turn Poe Port on/off by ssh / TL-SG2424P
2018-02-09 17:02:40

Tempeltown wrote

Model :

Hardware Version :

Firmware Version :

ISP :

Hi,

is somebody able to tell how i can turn on/off one single poe port using ssh.

I want automatically restart a Camera via a script if an problem occur.

Thanks you


You can read CLI Guide. https://static.tp-link.com/1910012176_T1600G_CLI.pdf

In my opinion, command power inline supply { enable | disable } can meet your demand.
  0  
  0  
#2
Options
Re:Turn Poe Port on/off by ssh / TL-SG2424P
2018-02-12 15:39:42
Thank you very much! You're right that's the solution.

- login
- enable
- config
- interface gigabitEthernet 1/0/xxx (port)
- power inline supply disable
- power inline supply enable

For the raspberry pi it would work with expect.
Connect via SSH - Autologin - Power down port 16 for 20 sec und restore power:

Install expect:
- sudo apt-get install expect

and the program would look like this:

#!/usr/bin/expect -f
set timeout 120
spawn ssh -o StrictHostKeyChecking=no admin@192.168.2.101
expect "*?assword:*"
send -- "admin\r"
sleep 1
send -- "enable\r"
sleep 1
send -- "config\r"
sleep 1
send -- "interface gigabitEthernet 1/0/16\r"
sleep 1
send -- "power inline supply disable\r"
sleep 20
send -- "power inline supply enable\r"
send -- "exit\r"
send -- "exit\r"
send -- "exit\r"
send -- "exit\r"
expect eof
  0  
  0  
#3
Options

Information

Helpful: 0

Views: 3543

Replies: 2

Related Articles