Skip to main content

Temperature

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

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

Methods

Temperature.SetConfig

Properties:

PropertyTypeDescription

id

number

Id of the Temperature component instance

config

object

Configuration that the method takes

Find more about the config properties in config section

Temperature.GetConfig

Properties:

PropertyTypeDescription

id

number

Id of the Temperature component instance

Find the Temperature.GetConfig response properties in config section

Temperature.GetStatus

Properties:

PropertyTypeDescription

id

number

Id of the Temperature component instance

Find more about the status response properties in status section

Configuration

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

Properties:

PropertyTypeDescription

id

number

Id of the Temperature component instance

name

string or null

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

report_thr_C

number

Temperature report threshold in Celsius. Accepted range is device-specific, default [0.5..5.0]C unless specified otherwise

offset_C

number

Offset in Celsius to be applied to the measured temperature. Accepted range is device-specific, default [-50.0 .. 50.0] unless specified otherwise

Status

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

PropertyTypeDescription

id

number

Id of the Temperature component instance

tC

number or null

Temperature in Celsius (null if valid value could not be obtained)

tF

number or null

Temperature in Fahrenheit (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 Temperature component that can trigger webhooks:

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

temperature.change and temperature.measurement support two attributes, that can be used to compose conditional webhooks:

PropertyTypeDescription

tC

number

New temperature in Celsius

tF

number

New temperature in Fahrenheit

Examples

Temperature.SetConfig example

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

Response

{
"restart_required": false
}

Temperature.GetConfig example

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

Response

{
"id": 0,
"name": null,
"report_thr_C": 0.5,
"offset_C": 0
}

Temperature.GetStatus example

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

Response

{
"id": 0,
"tC": 24.4,
"tF": 75.9
}