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:
Humidity.GetConfig
to obtain the component's configurationHumidity.SetConfig
to update the component's configurationHumidity.GetStatus
to obtain the component's status
Methods
Humidity.SetConfig
Property | Type | Description |
---|---|---|
| number | Id of the Humidity component instance |
| object | Configuration that the method takes |
Find more about the config properties in config section
Humidity.GetConfig
Property | Type | Description |
---|---|---|
| number | Id of the Humidity component instance |
Find the Humidity.GetConfig response properties in config section
Humidity.GetStatus
Property | Type | Description |
---|---|---|
| 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:
Property | Type | Description |
---|---|---|
| number | Id of the Humidity component instance |
| string or null | Name of the Humidity instance. |
| number | Humidity report threshold in %. Accepted range is device-specific, default [1.0..20.0]% unless specified otherwise |
| 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:
Property | Type | Description |
---|---|---|
| number | Id of the Humidity component instance |
| number or null | Relative humidity in % ( |
| array of type string | Shown only if at least one error is present. May contain |
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 thanreport_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:
Property | Type | Description |
---|---|---|
| number | New humidity in % |
Examples
Humidity.SetConfig example
- Humidity.SetConfig HTTP GET Request
- Humidity.SetConfig Curl Request
- Humidity.SetConfig Mos Request
http://192.168.33.1/rpc/Humidity.SetConfig?id=0&config={"name":"Humidity0"}
curl -X POST -d '{"id":1,"method":"Humidity.SetConfig","params":{"id":0,"config":{"name":"Humidity0"}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Humidity.SetConfig '{"id":0,"config":{"name":"Humidity0"}}'
Response
- Humidity.GetStatus HTTP GET Response
- Humidity.GetStatus Curl Response
- Humidity.GetStatus Mos Response
{
"restart_required": false
}
{
"id": 1,
"src": "shellyplusht-441793cc9d30",
"params": {
"restart_required": false
}
}
{
"restart_required": false
}
Humidity.GetConfig example
- Humidity.GetConfig HTTP GET Request
- Humidity.GetConfig Curl Request
- Humidity.GetConfig Mos Request
http://192.168.33.1/rpc/Humidity.GetConfig?id=0
curl -X POST -d '{"id":1,"method":"Humidity.GetConfig","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Humidity.GetConfig '{"id":0}'
Response
- Humidity.GetConfig HTTP GET Response
- Humidity.GetConfig Curl Response
- Humidity.GetConfig Mos Response
{
"id": 0,
"name": null,
"report_thr": 5,
"offset": 0
}
{
"id": 1,
"src": "shellyplusht-441793cc9d30",
"params": {
"id": 0,
"name": null,
"report_thr": 5,
"offset": 0
}
}
{
"id": 0,
"name": null,
"report_thr": 5,
"offset": 0
}
Humidity.GetStatus example
- Humidity.GetStatus HTTP GET Request
- Humidity.GetStatus Curl Request
- Humidity.GetStatus Mos Request
http://192.168.33.1/rpc/Humidity.GetStatus?id=0
curl -X POST -d '{"id":1,"method":"Humidity.GetStatus","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Humidity.GetStatus '{"id":0}'
Response
- Humidity.GetStatus HTTP GET Response
- Humidity.GetStatus Curl Response
- Humidity.GetStatus Mos Response
{
"id": 0,
"rh": 73.7
}
{
"id": 1,
"src": "shellyplusht-441793cc9d30",
"params": {
"id": 0,
"rh": 73.7
}
}
{
"id": 0,
"rh": 73.7
}