DHT (Legacy)

The dht_legacy extension connects to a digital humidity temperature (DHT) device to gather temperature and humidity readings. Through the support of Adafruit_DHT you can take readings with a DHT connected to a Raspberry Pi or Beaglebone Black.

This extension does not take an extension level config and is focused on interfaces.

DEPRECIATED: This is a library that is no longer maintained. However in some situation this provides better results on older model boards than using the dht extension.


Sensor Interface

Provides a sensor that returns DHT readings.

OptionTypeRequiredDescription
key[String]YesUnique slug id for the component
pin[Integer]YesGPIO pin to use on board i.e. 12.
name[String]NoFriendly display name of component. Useful for UI.
model[String]NoModel of DHT device to use. Options: 11, 22 or 2302. Default: 11

Config Examples

Here is a config of a complete dht sensor.

"sensor": [{
    "key": "dht_sensor_D12",
    "interface": "dht_legacy",
    "pin": 12,
    "model": "22"
}]

Data

Here is an example of the data returned by the DHT:

{
    "temperature": 50,
    "humidity": 64
}

Note: DHT is a finicky sensor and it has been known to have high read fail rates. ARMv6 may experience issues with DHT more frequently.