[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
where:
N – is a number of a line, indicated after ?io.
Returned Values
Error (incorrect request format or incorrect number of an IO line):
Successful completion of a command:
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»:
where:
N – is a number of a line, indicated after ?io.
Switching to alternate (inverse) state.
where:
N – is a number of a line, indicated after ?io.
Short term switching to the inverse state, i.e. issuing a pulse.
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:
where:
N – is a number of a line, indicated after ?io.
Returned Values
Error (incorrect request format or incorrect number of an IO line):
A command is completed: