Project:Java-Rako/Published API

From London Hackspace Wiki
Jump to navigation Jump to search
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"