Downlink Commands
Raw CBOR downlink commands for Thingsee PRESENCE — configuration messages sent to the sensor over Wirepas mesh
Overview
This page documents the CBOR-encoded commands sent to Thingsee PRESENCE 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
PIR Sensor Configuration (tsmId 13200)
Controls detection sensitivity, reporting mode, and LED behavior.
| JSON Property | CBOR Index | Direction | Description |
|---|---|---|---|
tsmId | 1 | Both | Message ID: 13200 |
tsmEv | 2 | Both | 30 = command, 31 = response |
tsmDstTuid | 7 | Command | Target device identifier |
transactionId | 25 | Both | Links command to response |
threshold | 263 | Both | PIR detection sensitivity (80–1060) |
enableLed | 264 | Both | LED on detection: 0 = off, 1 = on |
mode | 37 | Both | Reporting mode: 1 = Occupancy, 2 = Visitor counter |
passiveReportInterval | — | Both | Idle reporting interval in seconds |
Command:
{
"tsmId": 13200,
"tsmEv": 30,
"tsmDstTuid": "TSPR04TSC20205001",
"transactionId": 42,
"threshold": 150,
"enableLed": 0,
"mode": 1,
"passiveReportInterval": 3600
}
{1: 13200, 2: 30, 7: "TSPR04TSC20205001", 25: 42,
263: 150, 264: 0, 37: 1}
Response:
{
"tsmId": 13200,
"tsmEv": 31,
"tsmTs": 1755064700,
"tsmTuid": "TSPR04TSC20205001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 42,
"threshold": 150,
"enableLed": 0,
"mode": 1,
"passiveReportInterval": 3600
}
{1: 13200, 2: 31, 3: 1755064700, 4: "TSPR04TSC20205001", 5: "TSGW06EWK31903495",
25: 42, 263: 150, 264: 0, 37: 1}
Query current configuration — send with only header fields:
{
"tsmId": 13200,
"tsmEv": 30,
"tsmDstTuid": "TSPR04TSC20205001",
"transactionId": 43
}
Occupancy Light Configuration (tsmId 13210)
Note
Applies only to PRESENCE variants with integrated lights. Standard TSPR04 models will not respond.
| JSON Property | CBOR Index | Direction | Description |
|---|---|---|---|
tsmId | 1 | Both | Message ID: 13210 |
tsmEv | 2 | Both | 30 = command, 31 = response |
tsmDstTuid | 7 | Command | Target device identifier |
transactionId | 25 | Both | Links command to response |
mode | 37 | Both | 0 = Normal, 1 = Force single light, 2 = Outside installation |
index | 112 | Both | Light: 0 = Red, 1 = Green, 2 = Blue |
staticFilter | 285 | Both | Digital filter: 0 = off, 1 = on |
threshold | 263 | Both | Hot-region detection threshold |
duration | 191 | Both | Auto-reset time in seconds (0 = disabled) |
Command:
{
"tsmId": 13210,
"tsmEv": 30,
"tsmDstTuid": "TSPR04TSC20205001",
"transactionId": 44,
"mode": 0,
"staticFilter": 1,
"threshold": 30,
"duration": 0
}
{1: 13210, 2: 30, 7: "TSPR04TSC20205001", 25: 44,
37: 0, 285: 1, 263: 30, 191: 0}
Response:
{
"tsmId": 13210,
"tsmEv": 31,
"tsmTs": 1755064800,
"tsmTuid": "TSPR04TSC20205001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 44,
"mode": 0,
"index": 0,
"staticFilter": 1,
"threshold": 30,
"duration": 0
}
{1: 13210, 2: 31, 3: 1755064800, 4: "TSPR04TSC20205001", 5: "TSGW06EWK31903495",
25: 44, 37: 0, 112: 0, 285: 1, 263: 30, 191: 0}
Occupancy Light Brightness (tsmId 13211)
Note
Applies only to PRESENCE variants with integrated lights.
| JSON Property | CBOR Index | Direction | Description |
|---|---|---|---|
tsmId | 1 | Both | Message ID: 13211 |
tsmEv | 2 | Both | 30 = command, 31 = response |
tsmDstTuid | 7 | Command | Target device identifier |
transactionId | 25 | Both | Links command to response |
index | 112 | Both | Light: 0 = Red, 1 = Green, 2 = Blue |
max | 36 | Both | Maximum brightness percentage (0–100) |
Command — set green LED to 50%:
{
"tsmId": 13211,
"tsmEv": 30,
"tsmDstTuid": "TSPR04TSC20205001",
"transactionId": 45,
"index": 1,
"max": 50
}
{1: 13211, 2: 30, 7: "TSPR04TSC20205001", 25: 45,
112: 1, 36: 50}
Response:
{
"tsmId": 13211,
"tsmEv": 31,
"tsmTs": 1755064900,
"tsmTuid": "TSPR04TSC20205001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 45,
"index": 1,
"max": 50
}
{1: 13211, 2: 31, 3: 1755064900, 4: "TSPR04TSC20205001", 5: "TSGW06EWK31903495",
25: 45, 112: 1, 36: 50}
System Interval Configuration (tsmId 1500)
| 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: 60) |
Command:
{
"tsmId": 1500,
"tsmEv": 30,
"tsmDstTuid": "TSPR04TSC20205001",
"transactionId": 46,
"measurementInterval": 10,
"reportInterval": 60
}
{1: 1500, 2: 30, 7: "TSPR04TSC20205001", 25: 46,
256: 10, 258: 60}
Response:
{
"tsmId": 1500,
"tsmEv": 31,
"tsmTs": 1755065000,
"tsmTuid": "TSPR04TSC20205001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 46,
"measurementInterval": 10,
"reportInterval": 60
}
{1: 1500, 2: 31, 3: 1755065000, 4: "TSPR04TSC20205001", 5: "TSGW06EWK31903495",
25: 46, 256: 10, 258: 60}
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 | 0 = fixed role, 1 = auto (default) |
lowLatency | 544 | Both | 0 = normal (default), 1 = low latency |
Command:
{
"tsmId": 1501,
"tsmEv": 30,
"tsmDstTuid": "TSPR04TSC20205001",
"transactionId": 47,
"autoRole": 1,
"lowLatency": 0
}
{1: 1501, 2: 30, 7: "TSPR04TSC20205001", 25: 47,
543: 1, 544: 0}
Response:
{
"tsmId": 1501,
"tsmEv": 31,
"tsmTs": 1755065100,
"tsmTuid": "TSPR04TSC20205001",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 47,
"autoRole": 1,
"lowLatency": 0
}
{1: 1501, 2: 31, 3: 1755065100, 4: "TSPR04TSC20205001", 5: "TSGW06EWK31903495",
25: 47, 543: 1, 544: 0}
CBOR Index Reference
| 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 |
| 36 | max | LED brightness |
| 37 | mode | Reporting / light mode |
| 112 | index | Light selection |
| 191 | duration | Auto-reset timer |
| 256 | measurementInterval | System intervals |
| 258 | reportInterval | System intervals |
| 263 | threshold | PIR sensitivity / detection threshold |
| 264 | enableLed | LED indicator |
| 285 | staticFilter | Digital filter |
| 543 | autoRole | Wirepas node role |
| 544 | lowLatency | Wirepas node role |