Mailing List
Mailing List
Sign Up Here
Like, follow & share: visit DrayTek UK's Facebook page visit DrayTek UK's Twitter page visit DrayTek UK's Linkedin page
DrayTek

 

Controlling the VigorSwitch V1281 using Telnet / SSH
(Command line API)

 

In normal use, you can select sources from either the V1281's web interface or the smartphone app.   If you wish to integrate with 3rd party control systems, you can use telnet/SSH to connect to the switch and send commands to switch sources for each output (screen).  The login uses your existing user logins, which can be admin or standard users.  In the case of regular users, if that account has restricted access to specific sources or outputs, they will only be able to control those.  You may wish to have a separate account for your telnet/control system access.

 

Command syntax and port names are all case sensitive, so commands should be lower case (e.g. 'hdmi save' not 'HDMI SAVE'), port numbers are upper case (e.g. GE24 not ge24) and port names should be entered as defined, so if the port is capitalised as "Dining Room" you cannot type "DINING ROOM" or "dining room" etc.

 

Security  : Telnet sessions are not encrypted and therefore should never be used across the Internet - you should go via a VPN, or use SSH. SSH is preferred and recommended in all instances, including local configuration, even if you are remotely accessing through a VPN. 

 

To access the V1281's command prompt, you use a telnet or SSH terminal program - which may be installed as part of your OS or there are many free telnet programs and scripting tools.  Your 3rd party control system may have its own control or scripting facility. If you telnet to the router, log in and you will be presented with a command prompt which looks like this ('Home' is the switch's name in this example:

 


 login: admin

Password: *********  
                                             
 V1281-Home>
(Type your commands here)       
   

 

Please note that only the commands shown in this document are supported.  Other commands are intended only for engineering or special application and not intended or supported for user or installer use, except where specifically directed by DrayTek's own support personnel.  Usage or experimentation of commands which are not documented or supported here for this product may make the unit malfunction, are not fully implemented yet or may give unpredictable results.

 

show hdmi table

 

This command will output a list of all defined ports and their role (source or output).

 

                                                        
 V1281-Home> show hdmi table                                        
                                                        
 Output  | Port Name       | Source  | Port Name        
 -------------------------------------------------------
 GE4     | Lounge          | GE12    | DVD Player        
 GE5     | Playroom        | GE13    | CCTV             
 GE6     | Master Bed      | GE14    | Satellite        
 GE7     | Dining Room     | GE15    | CableTV          
 GE8     | Milo’s Bedroom  |                            
        

 

show hdmi table output [Port Name | Port GE<1-28>]

 

This command will display the currently selected source for a specific output. You can specify an output port by its name. e.g.


 V1281-Home> show hdmi table output Lounge 
                                             
 Source  | Port Name            
 --------------------------------
 GE14    | Satellite        
   

Or, using port number instead of name:


 show hdmi table output GE4 
                                             
 Source  | Port Name            
 --------------------------------
 GE14    | Satellite        
   

 

show hdmi table source [Port Name | Port GE<1-28>]

 

This command will display all outputs which have currently selected the specified source. Again, you can enter the source port as a name or a port number.


 V1281-Home> show hdmi table source Satellite 
                       
 Output  | Port Name               
 --------------------------------
 GE4     | Playroom             
 GE5     | Master Bed   
 GE6     | Dining Room  
              

 

hdmi set output [Port Name | Port GE<1-28> ] source [Port Name | Port GE<1-28>]

 

This command will set a source for a specific output (screen). You can use port names or port numbers but spaces are not permitted in port names so if your name has a space in in, use the port number instead (e.g. ‘GE12’). The command takes effect immediately.

 


V1281-Home>
hdmi set output Lounge source CableTV
    

 

Remember that use upper/lower case should match the name correctly. If your port name has spaces, you must enclose it in quotes:

 


V1281-Home>
hdmi set output Lounge source "Living Room"
    

 


or using port numbers (GE1-GE28), adding the prefix 'port':

 


V1281-Home>
hdmi set output port GE14 source port GE23
    

 



 

hdmi save

 

After chaging an output, as above (using 'hdmi set output') you need to enter this command to save the settings otherwise the switch will revert to previous settings when the switch is next restarted. If you make several output changes, you need only use ‘hdmi save’ once at the end:

 


V1281-Home>
hdmi save