Welcome to TP-LINK Tech Support Forum
+ Reply to Thread
Results 1 to 3 of 3
  1. #1

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

    Model :

    Hardware Version :

    Firmware Version :

    ISP : [/COLOR]

    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

  2. #2
    Members TPTHZ is on a distinguished road
    Join Date
    Aug 2017
    Posts
    150
    Quote Originally Posted by Tempeltown View Post
    Model :

    Hardware Version :

    Firmware Version :

    ISP : [/COLOR]

    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.

  3. #3
    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


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Copyright 1996-2018 TP-LINK Technologies Co., Ltd. All rights reserved.