Skip to main content
Version: 1.0

Humidity

The Humidity component handles the monitoring of device's humidity sensors. Humidity components are identified with humidity:<id> in objects containing multiple component payloads.

The Humidity component uses Humidity as RPC namespace and implements the minimal component interface:

Methods

Humidity.SetConfig

PropertyTypeDescription

id

number

Id of the Humidity component instance

config

object

Configuration that the method takes

Find more about the config properties in config section

Humidity.GetConfig

PropertyTypeDescription

id

number

Id of the Humidity component instance

Find the Humidity.GetConfig response properties in config section

Humidity.GetStatus

PropertyTypeDescription

id

number

Id of the Humidity component instance

Find more about the status response properties in status section

Configuration

The configuration of the Humidity component allows to adjust the humidity report threshold value. To Get/Set the configuration of the Humidity component its id must be specified.

Properties:

PropertyTypeDescription

id

number

Id of the Humidity component instance

name

string or null

Name of the Humidity instance. name length should not exceed 64 chars

report_thr

number

Humidity report threshold in %. Accepted range is device-specific, default [1.0..20.0]% unless specified otherwise

offset

number

Humidity offset in %. Value is applied to measured humidity. Accepted range is device-specific, default [-50.0..50.0]% unless specified otherwise

Status

The status of the Humidity component represents the measurement of the associated humidity sensor. To obtain the status of the Humidity component its id must be specified.

Properties:

PropertyTypeDescription

id

number

Id of the Humidity component instance

rh

number or null

Relative humidity in % (null if valid value could not be obtained)

errors

array of type string

Shown only if at least one error is present. May contain out_of_range, read when there is problem reading sensor

Webhook Events

There are two events related to the Humidity component that can trigger webhooks:

  • humidity.change - produced when humidity delta between two measurements is greater than report_thr
  • humidity.measurement - produced on a monotonic measurement period (60s)

humidity.change and humidity.measurement support one attribute, that can be used to compose conditional webhooks:

PropertyTypeDescription

rh

number

New humidity in %

Examples

Humidity.SetConfig example

http://192.168.33.1/rpc/Humidity.SetConfig?id=0&config={"name":"Humidity0"}

Response

{
"restart_required": false
}

Humidity.GetConfig example

http://192.168.33.1/rpc/Humidity.GetConfig?id=0

Response

{
"id": 0,
"name": null,
"report_thr": 5,
"offset": 0
}

Humidity.GetStatus example

http://192.168.33.1/rpc/Humidity.GetStatus?id=0

Response

{
"id": 0,
"rh": 73.7
}