DS18x20 - stodev-com-br/tasmota GitHub Wiki
DS18x20 driver supports DS18B20, DS18S20 and DS1822 1-Wire digital temperature sensors.
Configuration
Wiring
DS18b20 | ESP266 |
---|---|
1 GND | GND |
2 Data | GPIOx |
3 VCC | 3.3v |
You need to connect a 4.7K pullup resistor from data to 3.3V.
Tasmota
In the Configuration -> Configure Module page assign:
- GPIOx to
DS18x20 (4)
After a reboot webUI will display temperature measured.
Sensor sends a tele/%topic%/SENSOR
JSON reponse:
{"Time":"2019-01-01T00:00:00","DS18B20":{"Temperature":49.7},"TempUnit":"C"}
Commands
SetOption74
is used to enable/disable internal pullup for single DS18x20 sensor.
TempOffset
can be used for calibrating the measured temperature. This setting affects all temperature sensors on the device.
Multiple Sensors
Tasmota supports multiple DS18b20 sensors connected to a single ESP8266 chip.
Every sensors will get a unique ID used in webUI and MQTT telemetry.