Downlink Messages
This page documents CBOR-encoded commands sent from the cloud to the AIR sensor over the Wirepas mesh network. These messages configure CO₂ measurement behavior, auto-calibration, filters, and reporting thresholds.
Overview
This page documents the Wirepas CBOR commands sent to the sensor over the mesh network. These are the raw on-wire messages — field names and structure differ from the Haltian IoT JSON API exposed to end users.
Downlink messages use the command/response pattern: the cloud sends a command (tsmEv: 30) and the sensor replies with a response (tsmEv: 31) echoing the current configuration with all fields populated.
All messages are CBOR-encoded and sent over Wirepas endpoint 21/21. Each example below shows both the JSON (decoded CBOR) and CBOR (numeric indexes as transmitted on the wire) formats.
For messages the sensor transmits to the cloud, see Uplink Messages. For configuration workflows, see Configuration.
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. Used by all Thingsee sensors.
| 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}
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}
Command/Response Pattern
All downlink messages follow the same pattern:
- Send command — Set
tsmEv: 30, includetsmDstTuid(target device) andtransactionId(any integer) - Receive response — Sensor replies with
tsmEv: 31, sametransactionId, echoing all configuration fields with current values - Verify — Compare response values against command to confirm settings were applied
- Query only — Send with only header fields (no config parameters) to read current configuration
Use transactionId to correlate commands with responses, especially when configuring multiple devices simultaneously. Any integer value works — increment per command for easy tracking.
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 |