[ENG] 14.4. [DKSF 53/203.1 IU] Controlling a Humidity Sensor

HTTP API  in a device can be used for the integration with web applications without using an SNMP protocol. Controlling a humidity sensor is available through HTTP API.

Requesting a Status

http://192.168.0.100/relhum.cgi

Returned Values

Successful execution of a command:

relhum_result('ok', 55, 25, 2)

where:

The first argument is always 'ok'

The second argument is a relative humidity in %

The third argument is a temperature of a humidity sensor

The fourth argument is a status of a sensor:

 a sensor failed or is not connected

 humidity is below normal

 humidity is normal

 humidity is above normal

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