DT IoT Command — Multiple Temperature Sensors
The DT command in IoT devices allows querying and configuring up to 8 OneWire temperature sensors connected to OW0 and OW1 ports.
What is it for?
🌡️ Multi-zone — Monitor temperature at 8 different points
🚚 Cold chain — Control refrigerated cargo temperature
🏭 Industrial — Supervise thermal processes at multiple locations
📍 Identification — Assign sensors by 16-character unique ID
Query All Temperatures
QDT
RDTabbbbccabbbbccabbbbccabbbbccabbbbccabbbbccabbbbccabbbbccThe abbbbcc groups correspond to each sensor (DT00 to DT07) in order.
Response Parameters
| Field | Description |
|---|---|
| a | Temperature sign: + or - |
| bbbb | Temperature value in hundredths of °C |
| cc | Time elapsed since last calculation (seconds) |
Special Values
| Value | Meaning |
|---|---|
+0000FF | Sensor not connected or no reading |
General Query Example
>QDT<
>RDT+258702+267503+267503+0000FF+0000FF+0000FF+0000FF+258703;ID=865413050155570;*5C<Decoding:
| Sensor | Value | Temp | Age | Status |
|---|---|---|---|---|
| DT00 | +258702 | 25.87°C | 2s | ✅ OK |
| DT01 | +267503 | 26.75°C | 3s | ✅ OK |
| DT02 | +267503 | 26.75°C | 3s | ✅ OK |
| DT03-06 | +0000FF | - | - | ❌ Not connected |
| DT07 | +258703 | 25.87°C | 3s | ✅ OK |
Sensor Mapping
One sensor per One Wire port
If only 1 sensor is connected per port, these will be automatically mapped:
| Port | Sensor |
|---|---|
| OW0 | DT00 |
| OW1 | DT01 |
Multiple sensors per port
To connect more than one sensor to each port, it is necessary to configure the unique ID of each sensor with the SDT command.
Syntax
| Operation | Command | Description |
|---|---|---|
| Configure | SDTaab,cccccccccccccccc | Assign ID to sensor |
| Query | QDTaa | Read specific sensor |
Response
RDTaab,cccccccccccccccc,deeeeffConfiguration Parameters
| Field | Description |
|---|---|
| aa | Sensor index (00-07) |
| b | Enable: 0 = disabled, 1 = enabled |
| cccccccccccccccc | Sensor unique code (16 hex characters) |
| d | Temperature sign: + or - |
| eeee | Temperature value in hundredths of °C |
| ff | Time since last reading (seconds) |
Individual Configuration Example
Configure sensor 07 with specific ID
>SDT071,2887F03F0700007F<
>RDT071,2887F03F0700007F,+265605;ID=865413050155570;*32<Query configured sensor
// Sensor 07 enabled with unique ID, temp: 26.56°CQuery configured sensor
>QDT07<
>RDT071,2887F03F0700007F,+265600;ID=865413050155570;*37<
// Current reading: 26.56°C, 0 seconds oldTo connect multiple sensors to the same OW port, you must configure the unique ID of each sensor with SDT. If you only connect 1 sensor per port, it maps automatically.
Compatibility
See Also
- OW Command - General One Wire configuration
- CXOW Command - One Wire context