Downlink Messages

Configuration commands sent to Thingsee AIR — CO₂ calibration, filter settings, TVOC thresholds, and network roles

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 PropertyCBOR IndexDirectionDefaultDescription
tsmId1BothMessage ID: 24200
tsmEv2Both30 = command, 31 = response
tsmDstTuid7CommandTarget device identifier
transactionId25BothLinks command to response
averaging288Both1Number of measurements to average (1–10)
rounding289Both1Round to nearest N ppm (1–1000)
samples287Both8Samples per measurement (1–32)
staticFilter285Both2IIR filter strength (0=off, 2–10)
dynamicFilter286Both1Reduces static filter lag (0=off, 1+)
autoCalibration269Both192Hours between auto-calibration (0–65535)
calibrationValue270Both400Target ppm for auto-calibration
pressureCompensate290Both1Air pressure compensation (0=off, 1+=on)
carbonDioxideHysteresis281Both10Change threshold (ppm) for immediate reporting

Measurement Settings

FieldRangeDefaultEffect on Battery
averaging1–101Higher = smoother readings, more power
rounding1–10001Higher = coarser resolution, fewer reports
samples1–328Higher = more accurate, more power

Filter Settings

FieldRangeDefaultDescription
staticFilter0–1020: No filtering. 2–10: IIR low-pass filter (higher = smoother but more lag)
dynamicFilter0+10: Disabled. 1+: Compensates for static filter lag during rapid changes
pressureCompensate0+10: Disabled. 1+: Adjust readings based on air pressure

Auto-Calibration

FieldDefaultDescription
autoCalibration192Hours between auto-calibration cycles. Uses lowest detected CO₂ as reference.
calibrationValue400Target 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 PropertyCBOR IndexDirectionDescription
tsmId1BothMessage ID: 24201
tsmEv2Both30 = command, 31 = response
tsmDstTuid7CommandTarget device identifier
transactionId25BothLinks command to response
calibrationValue270BothCurrent actual CO₂ concentration (ppm)

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 PropertyCBOR IndexDirectionDescription
tsmId1BothMessage ID: 1500
tsmEv2Both30 = command, 31 = response
tsmDstTuid7CommandTarget device identifier
transactionId25BothLinks command to response
measurementInterval256BothSeconds between measurements
reportInterval258BothSeconds 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 PropertyCBOR IndexDirectionDescription
tsmId1BothMessage ID: 1501
tsmEv2Both30 = command, 31 = response
tsmDstTuid7CommandTarget device identifier
transactionId25BothLinks command to response
autoRole543BothAutomatic role selection: 0 = fixed, 1 = auto
lowLatency544BothLow-latency mode: 0 = normal, 1 = low latency

Node Role Options

autoRolelowLatencyBehavior
10Default — network assigns optimal role
00Fixed role, standard latency
01Fixed role, low latency (higher battery usage)
11Auto 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:

  1. Send command — Set tsmEv: 30, include tsmDstTuid (target device) and transactionId (any integer)
  2. Receive response — Sensor replies with tsmEv: 31, same transactionId, echoing all configuration fields with current values
  3. Verify — Compare response values against command to confirm settings were applied
  4. Query only — Send with only header fields (no config parameters) to read current configuration
CBOR IndexJSON PropertyCategory
1tsmIdHeader
2tsmEvHeader
3tsmTsHeader (response only)
4tsmTuidHeader (response only)
5tsmGwHeader (response only)
7tsmDstTuidAddressing (command only)
25transactionIdCommand tracking
256measurementIntervalSystem intervals
258reportIntervalSystem intervals
269autoCalibrationCO₂ auto-calibration interval
270calibrationValueCO₂ calibration target
281carbonDioxideHysteresisCO₂ reporting threshold
285staticFilterIIR filter strength
286dynamicFilterDynamic filter compensation
287samplesSamples per measurement
288averagingMeasurement averaging
289roundingValue rounding
290pressureCompensatePressure compensation
543autoRoleWirepas node role
544lowLatencyWirepas node role