Downlink Commands
Overview
This page documents the CBOR-encoded commands sent to Haltian ENTRYWAY 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
People Counting Configuration (tsmId 17220)
Configures people counting parameters: direction.
| JSON Property | CBOR Index | Direction | Description |
|---|---|---|---|
tsmId | 1 | Both | Message ID: 17220 |
tsmEv | 2 | Both | 30 = command, 31 = response |
tsmDstTuid | 7 | Command | Target device identifier |
transactionId | 25 | Both | Links command to response |
peopleCountingOrientation | 540 | Both | 0 = normal, 1 = reversed |
Direction Configuration
The peopleCountingOrientation field controls which PIR sensor detects entry vs. exit:
| Value | Meaning |
|---|---|
0 | Normal — factory default direction |
1 | Reversed — swap in/out assignments |
If counts seem inverted after installation, set peopleCountingOrientation: 1 rather than physically rotating the sensor.
Command Example
Send to sensor — set normal counting direction:
{
"tsmId": 17220,
"tsmEv": 30,
"tsmDstTuid": "XXCN01TSC20205507",
"transactionId": 42,
"peopleCountingOrientation": 0
}
{1: 17220, 2: 30, 7: "XXCN01TSC20205507", 25: 42,
540: 0}
Response Example
Sensor echoes back the applied configuration:
{
"tsmId": 17220,
"tsmEv": 31,
"tsmTs": 1755064700,
"tsmTuid": "XXCN01TSC20205507",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 42,
"peopleCountingOrientation": 0
}
{1: 17220, 2: 31, 3: 1755064700, 4: "XXCN01TSC20205507", 5: "TSGW06EWK31903495",
25: 42, 540: 0}
Report and Measurement Interval (tsmId 1500)
Configures reporting and measurement intervals.
| 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 to cloud |
Command Example
{
"tsmId": 1500,
"tsmEv": 30,
"tsmDstTuid": "XXCN01TSC20205507",
"transactionId": 43,
"measurementInterval": 30,
"reportInterval": 300
}
{1: 1500, 2: 30, 7: "XXCN01TSC20205507", 25: 43,
256: 30, 258: 300}
Response Example
{
"tsmId": 1500,
"tsmEv": 31,
"tsmTs": 1755064800,
"tsmTuid": "XXCN01TSC20205507",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 43,
"measurementInterval": 30,
"reportInterval": 300
}
{1: 1500, 2: 31, 3: 1755064800, 4: "XXCN01TSC20205507", 5: "TSGW06EWK31903495",
25: 43, 256: 30, 258: 300}
Wirepas Node Role (tsmId 1501)
Configures the device’s role in the Wirepas mesh network. Controls whether the device can route traffic for other nodes and its latency requirements.
| 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": "XXCN01TSC20205507",
"transactionId": 44,
"autoRole": 1,
"lowLatency": 0
}
{1: 1501, 2: 30, 7: "XXCN01TSC20205507", 25: 44,
543: 1, 544: 0}
Response Example
{
"tsmId": 1501,
"tsmEv": 31,
"tsmTs": 1755064900,
"tsmTuid": "XXCN01TSC20205507",
"tsmGw": "TSGW06EWK31903495",
"transactionId": 44,
"autoRole": 1,
"lowLatency": 0
}
{1: 1501, 2: 31, 3: 1755064900, 4: "XXCN01TSC20205507", 5: "TSGW06EWK31903495",
25: 44, 543: 1, 544: 0}
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 |
| 540 | peopleCountingOrientation | People counting config |
| 543 | autoRole | Wirepas node role |
| 544 | lowLatency | Wirepas node role |