[ENG] 16.4. [DKSF 54.3 IU] Controlling Humidity Sensors

To add a 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 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. Through the interface of  URL-encoded commands, controlling humidity sensors is available.

Requesting a Status of Relative Humidity

http://192.168.0.100/relhum.cgi?hN

where: 

N  is a number of a humidity sensor

Returned Values

Successful execution of a command:

relhum_result('ok', 55, 2)

where:

The first argument is always 'ok'

The second argument is relative humidity, %

The third argument is a status of a sensor:

 a sensor is not connected or fails

 humidity below safe

 humidity is safe

 humidity is above safe

Requesting a Temperature Status

http://192.168.0.100/relhum.cgi?tN

where: 

N  is a number of a humidity sensor

Returned Values

Successful completion of a command:

relhum_result('ok', 25, 2)

where:

The first argument is always 'ok'

The second argument is temperature, °C

The third argument is a sensor status:

 a sensor is not connected or fails

 temperature below safe

 temperature is safe

 temperature is above safe

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