[ENG] 16.3. [DKSF 54.3 IU] Controlling 1-Wire Smoke Sensors

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

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

Where:

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

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

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

<URL‐path>?<parameters> - are URL-encoded commands 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. 1-wire smoke sensors can be controlled through the interface of URL-encoded commands.

Requesting a Relay Status

http://192.168.0.100/smoke.cgi?sN

where: 

N  is a number of a smoke sensor

Returned Values

An error in a request (incorrect format, incorrect number of a sensor):

relay_result('error');

Successful execution of a command:

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

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

where:

The first argument is 'ok',

The second argument is - a status in a digit, and the third one is a status in a text:

0 - Normal

1 - Alarm

4 -  Loop is powered off

5 - Sensor failed or there is no sensor on a 1-Wire bus 

Controlling a Power Supply of a Loop

Switching on, switching off, short-term switching off the voltage given to a current loop, for powering an external fire alarm. Powering voltage off is used for resetting a triggered alarm in the initial state:

/smoke.cgi?sN&on

/smoke.cgi?sN&off

/smoke.cgi?sN&reset

where:

N  is a number of a smoke sensor

Returned Values

Error (incorrect format of a request or incorrect relay number):

relay_result('error');

Successful execution of a 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