User Tools

Site Tools


commandportsyntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
commandportsyntax [2008/03/06 21:37] – created seststcommandportsyntax [2018/11/03 02:59] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +{{::server:port64.png?nolink|}}
 ====== Command Port Syntax ====== ====== Command Port Syntax ======
 Several parts of the HomeServer accepts commands. The command syntax used on these places is described here. Several parts of the HomeServer accepts commands. The command syntax used on these places is described here.
Line 9: Line 10:
 Each command response begins with the word //ok// followed by the result or the word //error// followed by an error code and an error string. Each command response begins with the word //ok// followed by the result or the word //error// followed by an error code and an error string.
  
-=== Commands ===+==== Commands ====
 The following commands are supported by the command port: The following commands are supported by the command port:
   * **dir** - Returns a list of all instances in the HomeServer.   * **dir** - Returns a list of all instances in the HomeServer.
 +  * **create**,//class name,instance name// - Creates a new instance without activating it. A very strong convension is to start the new instance name with "#" and rename it without "#" when the instance is activated.
   * **get**,//instance name{,attribute name}// - Returns a list of name and value for the specified attribute. If no attribute name is specified all attributes of the instance are listed.   * **get**,//instance name{,attribute name}// - Returns a list of name and value for the specified attribute. If no attribute name is specified all attributes of the instance are listed.
-  * **set**,//instance name,attribute name,value// - Sets the attribute value in the specified instance. +  * **set**,//instance name,attribute name,value// - Sets the attribute value in the specified instance. If the instance name begins with "#", the attribute is initiated instead
-  * **call**//instance name,action name// - Calls the specified method in the specified instance. +  * **call**,//instance name,action name// - Calls the specified method in the specified instance
-  * **event**{,//attribute name,attribute value}*// - Sends an event with the specified attribute values.+  * **rename**,//current instance name,new instance name// - Renames the instance  
 +  * **exec**,//command line// - Executes the command line as an operating system command line in a separate process. This command is not allowed from remote sessions
 +  * **event**,//event type{,attribute name,attribute value}*// - Sends an event with the specified attribute values
 +  * **subscribe** - Start receive events from the event hub. After this command all events will be distributed over the connection for the duration of the session. Only valid for session based connections.
   * **quit** - Closes the session. Only valid for session based command ports.   * **quit** - Closes the session. Only valid for session based command ports.
-== Examples ==+ 
 +==== Example 1 Command Port session====
   dir   dir
   ok,Event Broker,Bedroom Lamp,Hall Lamp,Bedroom Timer,Button,Gate Keeper,TCPListener Port,TCP Command Port,UDP Command Port,Temperature Log,UDP Listener,CPU Temp,CPU Temp Alarm,InternetRadio,Home-WAP,Home-Soap,WEB-Server   ok,Event Broker,Bedroom Lamp,Hall Lamp,Bedroom Timer,Button,Gate Keeper,TCPListener Port,TCP Command Port,UDP Command Port,Temperature Log,UDP Listener,CPU Temp,CPU Temp Alarm,InternetRadio,Home-WAP,Home-Soap,WEB-Server
Line 29: Line 35:
   error,2,No Instance specified   error,2,No Instance specified
  
 +==== See also ==== 
 +[[TCPCommandPort]],[[UDPCommandPort]]
  
  
commandportsyntax.1204835822.txt.gz · Last modified: 2018/11/03 02:57 (external edit)