AM2301 - stodev-com-br/Tasmota GitHub Wiki
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.
Configuration
Wiring
AM2301 | ESP266 |
---|---|
- | GND |
OUT | GPIOx |
+ | 3.3V |
Tasmota
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"
}
Commands
TempOffset
can be used for calibrating the measured temperature. This setting affects all temperature sensors on the device.
Wemos DHT Shield
Like the Wemos DHT11 shield specs the DATA OUT pin of Wemos DHT22 is connected to D4 of the Wemos.
Tasmota Configuration
In the Configuration -> Configure Module page, select the following:
- D4 GPIO2 : 02 AM2301
Sensors
Read more about differences between sensors.