!!! info "This feature is included only in tasmota-sensors.bin"
AM2301 driver supports AM2301 (DHT21), AM2302 (DHT22) and AM2321 temperature and humidity sensors. Introduced in Tasmota through Sonoff AM2301 accessory for Sonoff TH.
This driver is ONLY for single wire implementations of the sensor.
AM2301 | ESP266 |
---|---|
- | GND |
OUT | GPIOx |
+ | 3.3V - 5.2V (5V is recommended) |
In the Configuration -> Configure Module page assign:
- GPIOx to
AM2301 (2)
After a reboot webUI will display temperature and humidity measured.
Sensor sends a tele/%topic%/SENSOR
JSON reponse:
{
"Time": "2019-01-01T00:00:00",
"AM2301": {
"Temperature": 24.6,
"Humidity": 58.2
},
"TempUnit": "C"
}
TempOffset
can be used for calibrating the measured temperature. This setting affects all temperature sensors on the device.
Like the Wemos DHT11 shield specs the DATA OUT pin of Wemos DHT22 is connected to D4 of the Wemos.
In the Configuration -> Configure Module page assign:
- GPIO2 to
AM2301 (2)
Read more about differences between sensors.