[ENG] 16.1. [DKSF 70/71.5 IU] Managing IO Lines

An interface of URL-encoded commands in a device can be used for integration with web applications without using an SNMP protocol. Through the interface of URL-encoded commands, it is possible to manage IO lines.

Requesting a Status of an IO Line

http://192.168.0.100/io.cgi?ioN

where:

N  is a number of a line, indicated after ?io.

Returned Values

Error (incorrect request format or incorrect number of an IO line):

 io_result('error')

Successful completion of a command:

io_result('ok', -1, 1, 339)

The first argument: is always 'ok' ('error' while a request error).

The second argument: is always – 1, for expanding API in future.

The third argument: is a current momentary status of an IO line, including a reset status.

The fourth argument: a pulse counter for the IO line.

 

A name of JSON-P callback is fixed, io_result(), and cannot be changed in a request.

Switching the Line (in the Output Mode)

Switching to the status «0» or «1»:

http://192.168.0.100/io.cgi?ioN=0

http://192.168.0.100/io.cgi?ioN=1

where:

N  is a number of a line, indicated after ?io.

 

Switching to alternate (inverse) state.

http://192.168.0.100/io.cgi?ioN=f

where:

N  is a number of a line, indicated after ?io.

 

Short term switching to the inverse state, i.e. issuing a pulse.

http://192.168.0.100/io.cgi?ioN=f,5

where:

N  is a number of a line, indicated after ?io.

A duration in seconds is set after a comma.

Choosing an Operation Mode of an IO Line

Setting a line operation mode: «0» - is input, «1» - is output, «2» - is a logic output:

http://192.168.0.100/io.cgi?ioN&mode=0

http://192.168.0.100/io.cgi?ioN&mode=1

http://192.168.0.100/io.cgi?ioN&mode=2

where:

N  is a number of a line, indicated after ?io.

Returned Values

Error (incorrect request format or incorrect number of an IO line):

io_result('error')

A command is completed:

io_result('ok')