background image

9. Controlling from your own software.

You can control the IP-SwitchBox from your own programs. Http is used.
There are two "commands" for this, k0 and k1.

Reading

.

Send a http request for k0 to get current status.
The reply consists of 17 bytes in hexadecimal format:
Byte 1 …. 4

Tells the setting of the output for example." 4031" (0x34, 0x30, 0x33, 0x31) tells that outputs
1,5,6 and 15 are on. Positions without read rights are reported as off.

Byte 5 … 8

Tells which outputs that currently are doing reset.

Byte 9 …12

Tells the read rights. For example, 000F (0x30, 0x30, 0x30, 0x46) tells that you have read
rights on output 4, 3, 2 and 1.

Byte 13…16

Tells the write rights in the same way.

Byte 17

Is 0 (0x30) if the box is available for control and is 1 (0x31) if the box is reserved for another
user.

Example

:

By sending "

GET /k0"

via http we get the answer "40310000FFFF100F0" that means;

That output 15, 6, 5 and 1 are on.
That no output is doing reset.
That we have read rights on all 16 outputs.
That we have write rights on output 16, 4, 3, 2 and 1.
That we may write to the box.
(If you write it in groups it is easyer to read: 4031 0000 FFFF 100F 1234 0)

Control

.

To control the box a http request for k1aaaabbbbccccdddd is sent.
Where a,b,c,d are the parameters.

aaaa Bit mask for switch on. Four bytes of hexadecimal values (0..F).

A bit set to 1 means that the corresponding output shall be switched on.

(for

example. "40F1" means that output 15, 8, 7, 6, 5 and 1 shall be on)

bbbb Bit mask for switch off. Four bytes of hexadecimal values (0..F).

A bit set to 1 means that the corresponding output shall be switched off.
The bit mask for switch on has higher priority than the bit mask for switch off.
If both the bit for switch on and switch off is set to 1 the output will be on.

cccc Bit mask for reset.

Four bytes of hexadecimal values (0..F).
A bit set to 1 means that the corresponding output shall make a reset sequence.

dddd Bit mask for

Four bytes of hexadecimal values (0..F).

canceling reset.

A bit set to 1 means that the reset sequence for the corresponding output shall
be canceled.
The bit mask for cancel have higher priority than the bit mask for reset.

Example

: By sending "

GET /k140F1FFFF0000FFFF"

via http:

We switch on output 15, 8, 7, 6, 5 and 1.
We switch off other outputs that might have been on before.
We do not start any reset sequence.
We cancel all current reset sequences.

Summary of Contents for IP-SwitchBox902

Page 1: ...he outputs On the reset page reset htm there are in addition buttons to make a temporary switching off for a specified time This time can be configured for each output At power on the outputs are swit...

Page 2: ...he ON or OFF button a request for this is sent to the box Then the button turns gray until the box has confirmed the change When the confirmation arrives the button indicates current setting again In...

Page 3: ...s controlled by IP SwitchBox 902 and is hence not dependent of any delays on the internet The time is configured at the configuration page switches htm These changes can only be done after you have lo...

Page 4: ...sly with this username This is the small Telnet client for the web browser At the page RS232 htm there are a small Telnet client It is a Java applet that starts when you load the page In this way you...

Page 5: ...Without title the username will not be showed You can configure a title with a blank only to get the username only at the top the pages RARP BOOTP By setting the IP address to 0 0 0 0 the IP address i...

Page 6: ...ers With up to 7 characters the layout of the page will be unchanged Turn on delay is used to delay switch on of the outputs for up to 10 minutes after power failure This is to activate the outputs in...

Page 7: ...and passwords for all 8 users and for admin and telnet The characters A Z a z and 0 9 may be used By leaving it blank at one Login the number of users are reduced by one By leaving it blank at Passwo...

Page 8: ...sent position is showed with slightly grayed ON OFF buttons The outputs can not be changed r w read write Present position is showed with normal ON OFF buttons The outputs can be changed 6 The RS232 p...

Page 9: ...parity one stop bit no handshake Connection to a PC is done with a straight cable that is with pin 1 to pin 1 2 to 2 etc The control commands are Switch on output x ONxx example ON01 Switch off outpu...

Page 10: ...tc S1 0 2 Specify delay for output 1 at power on etc A wwrrnnnnr Specify the access rights for up to 8 users those not logged in ninth user w read and write rights r read rights n no rights Z Prints t...

Page 11: ...oups it is easyer to read 4031 0000 FFFF 100F 1234 0 Control To control the box a http request for k1aaaabbbbccccdddd is sent Where a b c d are the parameters aaaa Bit mask for switch on Four bytes of...

Page 12: ...ble to run the script in Windows environment by using for example ActivePerl On the CD there are also an example in Visual Basic 10 Default settings IP address 10 195 70 218 Port http 80 Port telnet 2...

Page 13: ...same connector The difference between in and outgoing 48V is that the box gets its power supply from the in going 48V It is sufficient if 48V is available on one of the ingoing 48V connections to make...

Page 14: ...e the setup menu by pushing q like quit to control the box in normal way b Connect IP SwitchBox902 to the network The supplied blue cable is a straight cable that is used for connection to hubs the mo...

Reviews: