[ENG] 16.6. [DKSF 54.3 IU] Controlling Discrete Input Lines

To add a login and password to the URL structure, there is a need to use the next scheme:



<user_name>:<password> - are credentials for authorisaton in a web interface of a device;

<host> - is an IP address of a device;

<port> - is a port of an HTTP server;

<URL‐path>?<parameters> - is a URL-encoded command of a device.

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

Requesting a Status of an IO Line


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

Returned Values

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


Successful execution of a command:

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

The first argument is always 'ok' ('error' when there is a request error).

The second argument is always «-1», for extending the API in future.

The third argument is a current status of an IO line at the moment, including a reset status.

The fourth argument is a pulse counter on the IO line.

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


To add a login and password to the structure of a URL-encoded command, it is possible to use the next scheme:

  • http://<username>:<password>@<host>:<port>/<URL‐path>?<parameters>


<username>:<password> – are credentials for authorization in a device web interface;

<host>  is an IP address of a device;

<port>  is a port of an HTTP server;

<URL‐path>?<parameters>  is a URL-encoded command