DT Command — OneWire Temperature Query
The DT command allows querying temperature values measured by OneWire digital sensors (DS18S20, DS1822, DS18B20).
What is it for?
🌡️ Thermal monitoring — Reads current temperature from connected sensor
❄️ Cold chain — Verifies refrigerated transport temperature
🔥 Over-temperature — Detects critical conditions in equipment
📊 Age — Indicates how long ago the last reading was taken
For IoT devices with multiple sensors (up to 8), see DT IoT Command.
Syntax
| Operation | Command | Description |
|---|---|---|
| Query | QDT | Reads current temperature |
Response
RDTSign1Temp1Age1Sign2Temp2Age2| Field | Description |
|---|---|
sign | + (positive) or - (negative) |
temp | Temperature in hundredths °C (4 digits) |
age | Seconds since reading (2 hex) |
Examples
Negative temperature
>QDT<
>RDT-156001+0000FF;ID=1234;*3A<
// -15.60°C ❄️, age: 1 second| Field | Value | Meaning |
|---|---|---|
| Sign | - | Negative temperature |
| Temp | 1560 | -15.60°C |
| Age | 01 | 1 second since reading |
Positive temperature
>QDT<
>RDT+285005+0000FF;ID=1234;*2B<
// +28.50°C 🌡️, age: 5 secondsTemperature: +28.50°C (5 seconds old)
Freezing
>QDT<Response:
>RDT-058002+0000FF...Temperature: -5.80°C (ideal for refrigerated transport)
No sensor connected
>QDT<Response:
>RDT+0000FF+0000FF...Age FF (255 seconds) indicates sensor disconnected.
Temperature Format
The value is expressed in hundredths of degrees Celsius:
| Value | Temperature |
|---|---|
| -5500 | -55.00°C (minimum) |
| -1800 | -18.00°C (freezer) |
| -0050 | -0.50°C (near zero) |
| +0000 | 0.00°C (freezing point) |
| +2500 | 25.00°C (ambient) |
| +3750 | 37.50°C (body temperature) |
| +8500 | 85.00°C (maximum) |
Compatible Sensors
| Model | Resolution | Conversion Time | Precision |
|---|---|---|---|
| DS18S20 | 9 bits | 750 ms | 0.5°C |
| DS1822 | 9-12 bits | 93-750 ms | 2.0°C |
| DS18B20 | 9-12 bits | 93-750 ms | 0.5°C |
The DS18B20 is most recommended for its precision and versatility.
See DT IoT Command for more details.
Age Interpretation
Age indicates time since last valid reading:
| Age (hex) | Seconds | Status |
|---|---|---|
| 00-05 | 0-5 | Recent data |
| 06-1E | 6-30 | Slightly outdated |
| 1F-3C | 31-60 | Possible problem |
| FF | 255+ | Sensor disconnected |
Related Reports
Include temperature in custom report
>SUC10 $TEMP| QDT,5,4<Only includes temperature value (4 characters).
Automatic report on temperature change
>SRL18E;TRG=DT(00)ch>200;ACC={GBR00L}<Generates report if temperature changes >2°C.
Compatibility
See Also
- OW Command - OneWire ROM ID query
- AR Command - Temperature thresholds
- DT IoT Command - Multiple sensors
- CXOW Command - OneWire configuration