Difference between revisions of "Project:Java-Rako/Published API"

From London Hackspace Wiki
Jump to navigation Jump to search
m (Reverted edits by Ytogohiga (Talk) to last revision by Robert)
Line 1: Line 1:
----
 
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 
----
 
=[http://ucozisit.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]=
 
----
 
=[http://ucozisit.co.cc CLICK HERE]=
 
----
 
</div>
 
 
{{Project}}
 
{{Project}}
  
Line 27: Line 19:
 
following format:
 
following format:
  
     http://rakobridge/rako.cgi?room=5&amp;ch=4&amp;com=3
+
     http://rakobridge/rako.cgi?room=5&ch=4&com=3
  
The example would send Scene 1 command to room 5, channel 4. If channel is omitted it will default to 0 meaning all channels. A page containing the phrase &quot;Success!&quot; is returned.
+
The example would send Scene 1 command to room 5, channel 4. If channel is omitted it will default to 0 meaning all channels. A page containing the phrase "Success!" is returned.
  
 
=UDP/IP=
 
=UDP/IP=
Line 35: Line 27:
 
      
 
      
  
{| border=&quot;1&quot;
+
{| border="1"
 
|-
 
|-
 
|0||1||2||3||4||5||6 ...||n
 
|0||1||2||3||4||5||6 ...||n
 
|-
 
|-
|&quot;R&quot;||#Bytes to follow||Room# high||Room# low||Channel #||Instruction||0-7 bytes||CRC
+
|"R"||#Bytes to follow||Room# high||Room# low||Channel #||Instruction||0-7 bytes||CRC
 
|-
 
|-
 
|}
 
|}
Line 46: Line 38:
 
Sum of these bytes must equal zero.
 
Sum of these bytes must equal zero.
  
The reply is either &quot;AOK&quot; or &quot;AERROR&quot;
+
The reply is either "AOK" or "AERROR"

Revision as of 00:16, 24 November 2010

Published API



QR code


TCP/IP

In the following examples the NetBios name for the bridge is assumed to be rakobridge (the default). This name can be changed using the web interface or the IP address of the bridge can be used.

Telnet

A Telnet type interface is available on port 9761. This does not require a login. The protocol is the same as the Rako RS232 Command Summary. This interface is used by Rasoft so CANNOT be used at the same time.

The interface can be used by typing:

   telnet rakobridge 9761

HTTP

Requests can be made via the web interface by submitting a HTTP GET request in the following format:

   http://rakobridge/rako.cgi?room=5&ch=4&com=3

The example would send Scene 1 command to room 5, channel 4. If channel is omitted it will default to 0 meaning all channels. A page containing the phrase "Success!" is returned.

UDP/IP

UDP packets can be sent to port 9761 with the following format:


0 1 2 3 4 5 6 ... n
"R" #Bytes to follow Room# high Room# low Channel # Instruction 0-7 bytes CRC


Sum of these bytes must equal zero.

The reply is either "AOK" or "AERROR"