Downlink Messages
This page documents CBOR-encoded commands sent from the cloud to the ENVIRONMENT sensor over the Wirepas mesh network. These messages configure sensor behavior such as measurement modes, hysteresis thresholds, and accelerometer settings.
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.
Environment Sensor Configuration (tsmId 12200)
Master configuration message — enables/disables individual sensor subsystems.
| JSON Property | CBOR Index | Direction | Description |
|---|---|---|---|
tsmId | 1 | Both | Message ID: 12200 |
tsmEv | 2 | Both | 30 = command, 31 = response |
tsmDstTuid | 7 | Command | Target device identifier |
transactionId | 25 | Both | Links command to response |
accelerometerMode | 262 | Both | Accelerometer behavior |
weatherMode | 266 | Both | Weather sensor reporting |
hallMode | 267 | Both | Hall sensor reporting |
leakageMode | 268 | Both | Leakage sensor reporting |
Accelerometer Modes
| Value | Name | Uplink Message | Description |
|---|---|---|---|
0 | Disabled | — | Accelerometer off |
1 | Orientation | tsmId 1111 | Report 3D orientation |
2 | Machine monitoring | tsmId 16100 | Report vibration histograms + optional orientation |
Weather Modes
| Value | Description |
|---|---|
-1 | Disabled |
0 | Report at every interval |
Hall Sensor Modes
| Value | Description |
|---|---|
-1 | Disabled |
0 | Report at every interval regardless of state |
1 | Report only on state changes |
Leakage Modes
| Value | Description |
|---|---|
0 | Disabled |
1 | Report at every interval |
Command Example
Enable weather and hall sensors, disable accelerometer and leakage:
{
"tsmId": 12200,
"tsmEv": 30,
"tsmDstTuid": "TSEN01TSC20203001",
"transactionId": 42,
"accelerometerMode": 0,
"weatherMode": 0,
"hallMode": 1,
"leakageMode": 0
}
{1: 12200, 2: 30, 7: "TSEN01TSC20203001", 25: 42,
262: 0, 266: 0, 267: 1, 268: 0}
Response Example
{
"tsmId": 12200,
"tsmEv": 31,
"tsmTs": 1755064700,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 42,
"accelerometerMode": 0,
"weatherMode": 0,
"hallMode": 1,
"leakageMode": 0
}
{1: 12200, 2: 31, 3: 1755064700, 4: "TSEN01TSC20203001", 5: "TSGW06EWK31903495",
25: 42, 262: 0, 266: 0, 267: 1, 268: 0}
Query Current Configuration
{
"tsmId": 12200,
"tsmEv": 30,
"tsmDstTuid": "TSEN01TSC20203001",
"transactionId": 43
}
{1: 12200, 2: 30, 7: "TSEN01TSC20203001", 25: 43}
Weather Sensor Configuration (tsmId 12210)
Fine-tune weather sensor behavior and change-detection thresholds. When hysteresis reporting is enabled (weatherMode: 1), measurements that exceed the configured threshold trigger an immediate report.
| JSON Property | CBOR Index | Multiplier | Direction | Default | Description |
|---|---|---|---|---|---|
tsmId | 1 | — | Both | — | Message ID: 12210 |
tsmEv | 2 | — | Both | — | 30 = command, 31 = response |
tsmDstTuid | 7 | — | Command | — | Target device identifier |
transactionId | 25 | — | Both | — | Links command to response |
intervalMultiplier | 274 | — | Both | 1 | Multiply base measurement interval |
weatherMode | 266 | — | Both | 1 | 0: Disabled, 1: Enabled with hysteresis |
temperatureHysteresis | 275 | 10^1 | Both | 0.5°C | Temperature change threshold |
humidityHysteresis | 276 | 10^1 | Both | 2% | Humidity change threshold |
pressureHysteresis | 277 | 10^3 | Both | 20 Pa | Pressure change threshold |
lightHysteresis | 278 | — | Both | 100 | Light level change threshold |
Hysteresis fields use multipliers in CBOR:
temperatureHysteresis: CBOR value5=0.5°C (multiplier 10^1)humidityHysteresis: CBOR value20=2.0% (multiplier 10^1)pressureHysteresis: CBOR value20000=20Pa (multiplier 10^3)
Command Example
Enable hysteresis reporting with custom thresholds:
{
"tsmId": 12210,
"tsmEv": 30,
"tsmDstTuid": "TSEN01TSC20203001",
"transactionId": 44,
"intervalMultiplier": 1,
"weatherMode": 1,
"temperatureHysteresis": 0.5,
"humidityHysteresis": 2,
"pressureHysteresis": 20,
"lightHysteresis": 100
}
{1: 12210, 2: 30, 7: "TSEN01TSC20203001", 25: 44,
274: 1, 266: 1, 275: 5, 276: 20, 277: 20000, 278: 100}
Response Example
{
"tsmId": 12210,
"tsmEv": 31,
"tsmTs": 1755064800,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 44,
"intervalMultiplier": 1,
"weatherMode": 1,
"temperatureHysteresis": 0.5,
"humidityHysteresis": 2,
"pressureHysteresis": 20,
"lightHysteresis": 100
}
{1: 12210, 2: 31, 3: 1755064800, 4: "TSEN01TSC20203001", 5: "TSGW06EWK31903495",
25: 44, 274: 1, 266: 1, 275: 5, 276: 20, 277: 20000, 278: 100}
Magneto Switch Configuration (tsmId 12211)
Configure hall sensor behavior and reporting.
| JSON Property | CBOR Index | Direction | Default | Description |
|---|---|---|---|---|
tsmId | 1 | Both | — | Message ID: 12211 |
tsmEv | 2 | Both | — | 30 = command, 31 = response |
tsmDstTuid | 7 | Command | — | Target device identifier |
transactionId | 25 | Both | — | Links command to response |
intervalMultiplier | 274 | Both | 1 | Multiply base measurement interval |
hallMode | 267 | Both | 1 | 0: Disabled, 1: Report state changes |
Command Example
{
"tsmId": 12211,
"tsmEv": 30,
"tsmDstTuid": "TSEN01TSC20203001",
"transactionId": 45,
"intervalMultiplier": 1,
"hallMode": 1
}
{1: 12211, 2: 30, 7: "TSEN01TSC20203001", 25: 45,
274: 1, 267: 1}
Response Example
{
"tsmId": 12211,
"tsmEv": 31,
"tsmTs": 1755064900,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 45,
"intervalMultiplier": 1,
"hallMode": 1
}
{1: 12211, 2: 31, 3: 1755064900, 4: "TSEN01TSC20203001", 5: "TSGW06EWK31903495",
25: 45, 274: 1, 267: 1}
Leakage Sensor Configuration (tsmId 12212)
Configure leakage detection and reporting threshold.
| JSON Property | CBOR Index | Direction | Default | Description |
|---|---|---|---|---|
tsmId | 1 | Both | — | Message ID: 12212 |
tsmEv | 2 | Both | — | 30 = command, 31 = response |
tsmDstTuid | 7 | Command | — | Target device identifier |
transactionId | 25 | Both | — | Links command to response |
intervalMultiplier | 274 | Both | 1 | Multiply base measurement interval |
leakageMode | 268 | Both | 0 | 0: Disabled, 1: Enabled |
resistanceHysteresis | 279 | Both | 10000 | Change threshold for immediate report |
Command Example
{
"tsmId": 12212,
"tsmEv": 30,
"tsmDstTuid": "TSEN01TSC20203001",
"transactionId": 46,
"intervalMultiplier": 1,
"leakageMode": 1,
"resistanceHysteresis": 10000
}
{1: 12212, 2: 30, 7: "TSEN01TSC20203001", 25: 46,
274: 1, 268: 1, 279: 10000}
Response Example
{
"tsmId": 12212,
"tsmEv": 31,
"tsmTs": 1755065000,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 46,
"intervalMultiplier": 1,
"leakageMode": 1,
"resistanceHysteresis": 10000
}
{1: 12212, 2: 31, 3: 1755065000, 4: "TSEN01TSC20203001", 5: "TSGW06EWK31903495",
25: 46, 274: 1, 268: 1, 279: 10000}
Accelerometer Configuration (tsmId 16200)
Configure accelerometer behavior, orientation reporting thresholds, and vibration monitoring parameters.
| JSON Property | CBOR Index | Multiplier | Direction | Default | Description |
|---|---|---|---|---|---|
tsmId | 1 | — | Both | — | Message ID: 16200 |
tsmEv | 2 | — | Both | — | 30 = command, 31 = response |
tsmDstTuid | 7 | — | Command | — | Target device identifier |
transactionId | 25 | — | Both | — | Links command to response |
intervalMultiplier | 274 | — | Both | 1 | Multiply base measurement interval |
accelerometerMode | 262 | — | Both | 1 | See mode table below |
orientationHysteresis | 280 | — | Both | 5 | Angular change threshold (degrees) |
energyLevelThreshold | 291 | — | Both | 1 | Min energyLevel to trigger vibration report |
activityLevelThreshold | 292 | 10^3 | Both | 0.001 | Min activityLevel % to trigger vibration report |
impactThresholdMin | 259 | — | Both | 200 | Lower impact threshold (mG) |
impactThresholdMax | 260 | 10^1 | Both | 1000 | Upper impact threshold (mG) |
Accelerometer Modes
| Value | Name | Uplink Messages | Description |
|---|---|---|---|
0 | Disabled | — | Accelerometer off |
1 | Orientation | tsmId 1111 | Report 3D orientation changes |
2 | Machine monitoring | tsmId 16100 (+ optional 1111) | Report vibration histograms |
Command Example
Enable machine monitoring mode:
{
"tsmId": 16200,
"tsmEv": 30,
"tsmDstTuid": "TSEN01TSC20203001",
"transactionId": 47,
"accelerometerMode": 2,
"orientationHysteresis": 5,
"energyLevelThreshold": 1,
"activityLevelThreshold": 0.001
}
{1: 16200, 2: 30, 7: "TSEN01TSC20203001", 25: 47,
262: 2, 280: 5, 291: 1, 292: 1}
Response Example
{
"tsmId": 16200,
"tsmEv": 31,
"tsmTs": 1755065100,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 47,
"intervalMultiplier": 1,
"accelerometerMode": 2,
"orientationHysteresis": 5,
"energyLevelThreshold": 1,
"activityLevelThreshold": 0.001
}
{1: 16200, 2: 31, 3: 1755065100, 4: "TSEN01TSC20203001", 5: "TSGW06EWK31903495",
25: 47, 274: 1, 262: 2, 280: 5, 291: 1, 292: 1}
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 (default: 300) |
Command Example
{
"tsmId": 1500,
"tsmEv": 30,
"tsmDstTuid": "TSEN01TSC20203001",
"transactionId": 48,
"measurementInterval": 60,
"reportInterval": 300
}
{1: 1500, 2: 30, 7: "TSEN01TSC20203001", 25: 48,
256: 60, 258: 300}
Response Example
{
"tsmId": 1500,
"tsmEv": 31,
"tsmTs": 1755065200,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 48,
"measurementInterval": 60,
"reportInterval": 300
}
{1: 1500, 2: 31, 3: 1755065200, 4: "TSEN01TSC20203001", 5: "TSGW06EWK31903495",
25: 48, 256: 60, 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": "TSEN01TSC20203001",
"transactionId": 49,
"autoRole": 1,
"lowLatency": 0
}
{1: 1501, 2: 30, 7: "TSEN01TSC20203001", 25: 49,
543: 1, 544: 0}
Response Example
{
"tsmId": 1501,
"tsmEv": 31,
"tsmTs": 1755065300,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 49,
"autoRole": 1,
"lowLatency": 0
}
{1: 1501, 2: 31, 3: 1755065300, 4: "TSEN01TSC20203001", 5: "TSGW06EWK31903495",
25: 49, 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 |
| 259 | impactThresholdMin | Accelerometer config |
| 260 | impactThresholdMax | Accelerometer config (multiplier 10^1) |
| 262 | accelerometerMode | Accelerometer config |
| 266 | weatherMode | Weather config |
| 267 | hallMode | Hall sensor config |
| 268 | leakageMode | Leakage config |
| 274 | intervalMultiplier | Interval scaling |
| 275 | temperatureHysteresis | Weather config (multiplier 10^1) |
| 276 | humidityHysteresis | Weather config (multiplier 10^1) |
| 277 | pressureHysteresis | Weather config (multiplier 10^3) |
| 278 | lightHysteresis | Weather config |
| 279 | resistanceHysteresis | Leakage config |
| 280 | orientationHysteresis | Accelerometer config |
| 291 | energyLevelThreshold | Accelerometer config |
| 292 | activityLevelThreshold | Accelerometer config (multiplier 10^3) |
| 543 | autoRole | Wirepas node role |
| 544 | lowLatency | Wirepas node role |