[ENG] 15.3. [DKSF 48.5 IU] Control of the Power Inputs Backup

The interface of the URL-commands in the device can be used for integration with web-applications without SNMP protocole. The control of the power input backup is possible via the interface of the URL-encoded commands.

Request about the inputs state

http://192.168.0.100/ats_in.cgi

Return values

ats_in_result('ok', 1, 1)

where:

The first argument: always 'ok'

The second and third arguments correspond to the availability of voltage at the inputs 1 and 2, respectively:

0 - no voltage

1 - there is voltage

Request about the state of the groups of outlets

http://192.168.0.100/ats.cgi?gN

where:

— the number of the outlets groups, 1 (1..4) or 2 (5..8)

Retrun values

ats_in_result('ok', 'primary', 1)

where:

The first argument: always 'ok'

The second argument 'backup' if the group is powered by backup input, and 'primary' if it is powered from the main input

The third argument corresponds to the availability of voltage on the active input

0 - no voltage

1 - there is voltage

Request of the outlets groups  settings 

Request of the settings for determining the main input for outlet groups, switching to backup input when there is no power at the main input and auto-return of outlet groups to the main input when power appears on the main input, respectively:

http://192.168.0.100/ats.cgi?gN&main

http://192.168.0.100/ats.cgi?gN&backup

http://192.168.0.100/ats.cgi?gN&autorevert 

where:

N — the number of outlets groups, 1 (1...4) or 2 (5...8)

Return values

Error (wrong request format or wrong relay number):

ats_in_result('error')

Successful execution of the command

ats_in_result('ok', 2)

ats_in_result('ok', 'on')

where:

The first and only argument is 'error' if the command is not recognized or an invalid group number is specified

The first argument is 'ok', if the second is followed by  the value of the requested parameter

The second argument is the value of the requested parameter: 1 or 2 for the number of the main (primary) input, 'on' or 'off' for backup and auto-return.

Choice of the main (primary) input

To force a switch, set an alternative input number:

http://192.168.0.100/ats.cgi?gN&main=n

where:

— the number of the outlets goups , 1 (1...4) or 2 (5...8);

n — the input number (1 or 2).

Return value

The error is issued if the command format is incorrect, the group number or input number is incorrect (more than 2):

ats_result('error')

Successful execution of the command

ats_result('ok')

Switching on/off of the auto backup

Switching on ('on') or switching off ('off') the automatic transition to the backup input in case of power failure at the main input for groups of outlets:

/ats.cgi?gN&backup=on

/ats.cgi?gN&backup=off 

where:

— the number of outlets groups, 1 (1...4) ot 2 (5...8)

Return value

The error is generated if the command format is incorrect, the group number is incorrect, or the backup parameter is incorrect:

ats_result('error')

Successful execution of the command

ats_result('ok')

Switching on/off the auto return

Switching on ('on') or off ('off') automatic return to the main input when voltage is restored on it for groups of outlets

/ats.cgi?gN&autorevert=on

/ats.cgi?gN&autorevert=off 

where:

— the number of the outlet groups, 1 (1...4) or 2 (5...8)

Return values

An error is issued if the command format is incorrect, the group number is incorrect, or the backup parameter is incorrect.

ats_result('error')

Successful execution of the command

ats_result('ok')

Manual return onto the main (primary) input

The return of the groups of outletss to the main input, if previously they were automatically transferred to the reserve and there is voltage on the main input:

/ats.cgi?g1&revert

/ats.cgi?g1&revert 

where:

— the number of the outlets groups, 1 (1..4) or 2 (5..8)

Return values

An error is issued if the command format is incorrect:

ats_result('error')

Successful execution of the command

ats_result('ok')

Authorization

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>

where:

<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