Downlink Messages

Configuration commands sent to Thingsee ENVIRONMENT — weather thresholds, hall sensor, leakage, accelerometer, 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.


Environment Sensor Configuration (tsmId 12200)

Master configuration message — enables/disables individual sensor subsystems.

JSON PropertyCBOR IndexDirectionDescription
tsmId1BothMessage ID: 12200
tsmEv2Both30 = command, 31 = response
tsmDstTuid7CommandTarget device identifier
transactionId25BothLinks command to response
accelerometerMode262BothAccelerometer behavior
weatherMode266BothWeather sensor reporting
hallMode267BothHall sensor reporting
leakageMode268BothLeakage sensor reporting

Accelerometer Modes

ValueNameUplink MessageDescription
0DisabledAccelerometer off
1OrientationtsmId 1111Report 3D orientation
2Machine monitoringtsmId 16100Report vibration histograms + optional orientation

Weather Modes

ValueDescription
-1Disabled
0Report at every interval

Hall Sensor Modes

ValueDescription
-1Disabled
0Report at every interval regardless of state
1Report only on state changes

Leakage Modes

ValueDescription
0Disabled
1Report 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 PropertyCBOR IndexMultiplierDirectionDefaultDescription
tsmId1BothMessage ID: 12210
tsmEv2Both30 = command, 31 = response
tsmDstTuid7CommandTarget device identifier
transactionId25BothLinks command to response
intervalMultiplier274Both1Multiply base measurement interval
weatherMode266Both10: Disabled, 1: Enabled with hysteresis
temperatureHysteresis27510^1Both0.5°CTemperature change threshold
humidityHysteresis27610^1Both2%Humidity change threshold
pressureHysteresis27710^3Both20 PaPressure change threshold
lightHysteresis278Both100Light level change threshold

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 PropertyCBOR IndexDirectionDefaultDescription
tsmId1BothMessage ID: 12211
tsmEv2Both30 = command, 31 = response
tsmDstTuid7CommandTarget device identifier
transactionId25BothLinks command to response
intervalMultiplier274Both1Multiply base measurement interval
hallMode267Both10: 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 PropertyCBOR IndexDirectionDefaultDescription
tsmId1BothMessage ID: 12212
tsmEv2Both30 = command, 31 = response
tsmDstTuid7CommandTarget device identifier
transactionId25BothLinks command to response
intervalMultiplier274Both1Multiply base measurement interval
leakageMode268Both00: Disabled, 1: Enabled
resistanceHysteresis279Both10000Change 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 PropertyCBOR IndexMultiplierDirectionDefaultDescription
tsmId1BothMessage ID: 16200
tsmEv2Both30 = command, 31 = response
tsmDstTuid7CommandTarget device identifier
transactionId25BothLinks command to response
intervalMultiplier274Both1Multiply base measurement interval
accelerometerMode262Both1See mode table below
orientationHysteresis280Both5Angular change threshold (degrees)
energyLevelThreshold291Both1Min energyLevel to trigger vibration report
activityLevelThreshold29210^3Both0.001Min activityLevel % to trigger vibration report
impactThresholdMin259Both200Lower impact threshold (mG)
impactThresholdMax26010^1Both1000Upper impact threshold (mG)

Accelerometer Modes

ValueNameUplink MessagesDescription
0DisabledAccelerometer off
1OrientationtsmId 1111Report 3D orientation changes
2Machine monitoringtsmId 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 PropertyCBOR IndexDirectionDescription
tsmId1BothMessage ID: 1500
tsmEv2Both30 = command, 31 = response
tsmDstTuid7CommandTarget device identifier
transactionId25BothLinks command to response
measurementInterval256BothSeconds between measurements
reportInterval258BothSeconds 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 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": "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:

  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
259impactThresholdMinAccelerometer config
260impactThresholdMaxAccelerometer config (multiplier 10^1)
262accelerometerModeAccelerometer config
266weatherModeWeather config
267hallModeHall sensor config
268leakageModeLeakage config
274intervalMultiplierInterval scaling
275temperatureHysteresisWeather config (multiplier 10^1)
276humidityHysteresisWeather config (multiplier 10^1)
277pressureHysteresisWeather config (multiplier 10^3)
278lightHysteresisWeather config
279resistanceHysteresisLeakage config
280orientationHysteresisAccelerometer config
291energyLevelThresholdAccelerometer config
292activityLevelThresholdAccelerometer config (multiplier 10^3)
543autoRoleWirepas node role
544lowLatencyWirepas node role