Downlink Commands
Overview
This page documents the CBOR-encoded commands sent to Thingsee AIR over the Wirepas mesh network for device configuration.
For the Haltian IoT Platform equivalent (GraphQL Service API), see Configuration Commands.
Command/Response Pattern
All CBOR downlink messages follow the same pattern:
- Send command — Set
tsmEv: 30, includetsmDstTuid(target device) andtransactionId - Receive response — Sensor replies with
tsmEv: 31, sametransactionId, all fields populated with current values - Verify — Compare response values against command to confirm settings applied
- Query only — Send with only header fields (no config parameters) to read current configuration
Wirepas endpoint: 21/21
Carbon Dioxide Configuration (tsmId 24200)
The primary configuration message for the CO₂ sensor. Controls measurement accuracy, filtering, auto-calibration, and reporting thresholds.
| JSON Property | CBOR Index | Direction | Default | Description |
|---|---|---|---|---|
tsmId | 1 | Both | — | Message ID: 24200 |
tsmEv | 2 | Both | — | 30 = command, 31 = response |
tsmDstTuid | 7 | Command | — | Target device identifier |
transactionId | 25 | Both | — | Links command to response |
averaging | 288 | Both | 1 | Number of measurements to average (1–10) |
rounding | 289 | Both | 1 | Round to nearest N ppm (1–1000) |
samples | 287 | Both | 8 | Samples per measurement (1–32) |
staticFilter | 285 | Both | 2 | IIR filter strength (0=off, 2–10) |
dynamicFilter | 286 | Both | 1 | Reduces static filter lag (0=off, 1+) |
autoCalibration | 269 | Both | 192 | Hours between auto-calibration (0–65535) |
calibrationValue | 270 | Both | 400 | Target ppm for auto-calibration |
pressureCompensate | 290 | Both | 1 | Air pressure compensation (0=off, 1+=on) |
carbonDioxideHysteresis | 281 | Both | 10 | Change threshold (ppm) for immediate reporting |
Measurement Settings
| Field | Range | Default | Effect on Battery |
|---|---|---|---|
averaging | 1–10 | 1 | Higher = smoother readings, more power |
rounding | 1–1000 | 1 | Higher = coarser resolution, fewer reports |
samples | 1–32 | 8 | Higher = more accurate, more power |
Filter Settings
| Field | Range | Default | Description |
|---|---|---|---|
staticFilter | 0–10 | 2 | 0: No filtering. 2–10: IIR low-pass filter (higher = smoother but more lag) |
dynamicFilter | 0+ | 1 | 0: Disabled. 1+: Compensates for static filter lag during rapid changes |
pressureCompensate | 0+ | 1 | 0: Disabled. 1+: Adjust readings based on air pressure |
Auto-Calibration
Set autoCalibration interval so the sensor is exposed to fresh outdoor air (≈400 ppm) at least once during the period. Poorly configured auto-calibration will cause measurement drift. Default 192 hours (8 days) works well for most office environments.
| Field | Default | Description |
|---|---|---|
autoCalibration | 192 | Hours between auto-calibration cycles. Uses lowest detected CO₂ as reference. |
calibrationValue | 400 | Target CO₂ concentration (ppm) for auto-calibration. Typically 400 ppm (fresh air). |
Command Example
Change CO₂ hysteresis to 5 ppm for more responsive reporting:
{
"tsmId": 24200,
"tsmEv": 30,
"tsmDstTuid": "TSAR01TSC20204001",
"transactionId": 42,
"carbonDioxideHysteresis": 5
}
{1: 24200, 2: 30, 7: "TSAR01TSC20204001", 25: 42,
281: 5}
Response Example
Sensor echoes back all configuration fields with current values:
{
"tsmId": 24200,
"tsmEv": 31,
"tsmTs": 1755064700,
"tsmTuid": "TSAR01TSC20204001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 42,
"averaging": 1,
"rounding": 1,
"samples": 8,
"staticFilter": 2,
"dynamicFilter": 1,
"autoCalibration": 192,
"calibrationValue": 400,
"pressureCompensate": 1,
"carbonDioxideHysteresis": 5
}
{1: 24200, 2: 31, 3: 1755064700, 4: "TSAR01TSC20204001", 5: "TSGW06EWK31903495",
25: 42, 288: 1, 289: 1, 287: 8, 285: 2, 286: 1,
269: 192, 270: 400, 290: 1, 281: 5}
Query Current Configuration
{
"tsmId": 24200,
"tsmEv": 30,
"tsmDstTuid": "TSAR01TSC20204001",
"transactionId": 43
}
{1: 24200, 2: 30, 7: "TSAR01TSC20204001", 25: 43}
Carbon Dioxide Manual Calibration (tsmId 24201)
Manually calibrate the CO₂ sensor to a known concentration. This is an instantaneous calibration that resets the auto-calibration counter.
| JSON Property | CBOR Index | Direction | Description |
|---|---|---|---|
tsmId | 1 | Both | Message ID: 24201 |
tsmEv | 2 | Both | 30 = command, 31 = response |
tsmDstTuid | 7 | Command | Target device identifier |
transactionId | 25 | Both | Links command to response |
calibrationValue | 270 | Both | Current actual CO₂ concentration (ppm) |
For manual calibration, expose the sensor to fresh outdoor air and set calibrationValue to 400 ppm, or use a calibrated reference gas for higher accuracy.
Command Example
Calibrate to 400 ppm (fresh air):
{
"tsmId": 24201,
"tsmEv": 30,
"tsmDstTuid": "TSAR01TSC20204001",
"transactionId": 44,
"calibrationValue": 400
}
{1: 24201, 2: 30, 7: "TSAR01TSC20204001", 25: 44,
270: 400}
Response Example
{
"tsmId": 24201,
"tsmEv": 31,
"tsmTs": 1755064800,
"tsmTuid": "TSAR01TSC20204001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 44,
"calibrationValue": 400
}
{1: 24201, 2: 31, 3: 1755064800, 4: "TSAR01TSC20204001", 5: "TSGW06EWK31903495",
25: 44, 270: 400}
System Interval Configuration (tsmId 1500)
Configure measurement and reporting intervals.
| JSON Property | CBOR Index | Direction | Description |
|---|---|---|---|
tsmId | 1 | Both | Message ID: 1500 |
tsmEv | 2 | Both | 30 = command, 31 = response |
tsmDstTuid | 7 | Command | Target device identifier |
transactionId | 25 | Both | Links command to response |
measurementInterval | 256 | Both | Seconds between measurements |
reportInterval | 258 | Both | Seconds between reports |
Command Example
{
"tsmId": 1500,
"tsmEv": 30,
"tsmDstTuid": "TSAR01TSC20204001",
"transactionId": 45,
"measurementInterval": 30,
"reportInterval": 300
}
{1: 1500, 2: 30, 7: "TSAR01TSC20204001", 25: 45,
256: 30, 258: 300}
Response Example
{
"tsmId": 1500,
"tsmEv": 31,
"tsmTs": 1755064900,
"tsmTuid": "TSAR01TSC20204001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 45,
"measurementInterval": 30,
"reportInterval": 300
}
{1: 1500, 2: 31, 3: 1755064900, 4: "TSAR01TSC20204001", 5: "TSGW06EWK31903495",
25: 45, 256: 30, 258: 300}
TVOC Reset (tsmId 24501)
Resets the TVOC sensor baseline. Use when the sensor has been exposed to high VOC levels and needs recalibration.
Command Example
{
"tsmId": 24501,
"tsmEv": 30,
"tsmDstTuid": "TSAR01TSC20204001",
"transactionId": 47
}
{1: 24501, 2: 30, 7: "TSAR01TSC20204001", 25: 47}
Wirepas Node Role (tsmId 1501)
Configures the device’s role in the Wirepas mesh network.
| JSON Property | CBOR Index | Direction | Description |
|---|---|---|---|
tsmId | 1 | Both | Message ID: 1501 |
tsmEv | 2 | Both | 30 = command, 31 = response |
tsmDstTuid | 7 | Command | Target device identifier |
transactionId | 25 | Both | Links command to response |
autoRole | 543 | Both | Automatic role selection: 0 = fixed, 1 = auto |
lowLatency | 544 | Both | Low-latency mode: 0 = normal, 1 = low latency |
Node Role Options
| autoRole | lowLatency | Behavior |
|---|---|---|
1 | 0 | Default — network assigns optimal role |
0 | 0 | Fixed role, standard latency |
0 | 1 | Fixed role, low latency (higher battery usage) |
1 | 1 | Auto role with low latency preference |
Command Example
{
"tsmId": 1501,
"tsmEv": 30,
"tsmDstTuid": "TSAR01TSC20204001",
"transactionId": 46,
"autoRole": 1,
"lowLatency": 0
}
{1: 1501, 2: 30, 7: "TSAR01TSC20204001", 25: 46,
543: 1, 544: 0}
Response Example
{
"tsmId": 1501,
"tsmEv": 31,
"tsmTs": 1755065000,
"tsmTuid": "TSAR01TSC20204001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 46,
"autoRole": 1,
"lowLatency": 0
}
{1: 1501, 2: 31, 3: 1755065000, 4: "TSAR01TSC20204001", 5: "TSGW06EWK31903495",
25: 46, 543: 1, 544: 0}
CBOR Index Reference (Downlink)
| CBOR Index | JSON Property | Category |
|---|---|---|
| 1 | tsmId | Header |
| 2 | tsmEv | Header |
| 3 | tsmTs | Header (response only) |
| 4 | tsmTuid | Header (response only) |
| 5 | tsmGw | Header (response only) |
| 7 | tsmDstTuid | Addressing (command only) |
| 25 | transactionId | Command tracking |
| 256 | measurementInterval | System intervals |
| 258 | reportInterval | System intervals |
| 269 | autoCalibration | CO₂ auto-calibration interval |
| 270 | calibrationValue | CO₂ calibration target |
| 281 | carbonDioxideHysteresis | CO₂ reporting threshold |
| 285 | staticFilter | IIR filter strength |
| 286 | dynamicFilter | Dynamic filter compensation |
| 287 | samples | Samples per measurement |
| 288 | averaging | Measurement averaging |
| 289 | rounding | Value rounding |
| 290 | pressureCompensate | Pressure compensation |
| 543 | autoRole | Wirepas node role |
| 544 | lowLatency | Wirepas node role |