[ENG] 15.4. [DKSF 48.5 IU] The Control of the 1-wire Smoke Sensors

The interface of URL-encoded commands in the device can be used to integrate with web applications without using the SNMP protocol. Through the interface of URL-encoded commands, control of 1-wire smoke detectors is available.

Request about the relay state

http://192.168.0.100/smoke.cgi?sN

where: 

N — the number of the smoke sensor.

Return values

Error in the request (wrong format, wrong number of sensor)

relay_result('error');

Successful execution of the command

smoke_result('ok', 1, 'Норма');

smoke_result('ok', 1, 'OK');

where:

The first argument is 'ok',

The second  - status in numbers, the third  -  status in text:

0 - Norm;

1 - Alert;

4 - The loop power is off;

5 - Sensor failure, or the sensor is absent on the 1-wire bus.

Control of the loop power

Switching on, off, short-term shutdown of the voltage supplied to the current loop to power an external fire detector. Voltage relief is used to reset the triggered detector to its initial state:

/smoke.cgi?sN&on

/smoke.cgi?sN&off

/smoke.cgi?sN&reset

where:

N — the number of the state.

Return number

Error (wrong format of the request or wrong relay number

relay_result('error');

Successful execution of the command

relay_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