Downlink Commands

Raw CBOR downlink commands for Haltian ENTRYWAY — configuration messages sent to the sensor over Wirepas mesh

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:

  1. Send command — Set tsmEv: 30, include tsmDstTuid (target device) and transactionId
  2. Receive response — Sensor replies with tsmEv: 31, same transactionId, all fields populated with current values
  3. Verify — Compare response values against command to confirm settings applied
  4. 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 PropertyCBOR IndexDirectionDescription
tsmId1BothMessage ID: 17220
tsmEv2Both30 = command, 31 = response
tsmDstTuid7CommandTarget device identifier
transactionId25BothLinks command to response
peopleCountingOrientation540Both0 = normal, 1 = reversed

Direction Configuration

The peopleCountingOrientation field controls which PIR sensor detects entry vs. exit:

ValueMeaning
0Normal — factory default direction
1Reversed — 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 PropertyCBOR IndexDirectionDescription
tsmId1BothMessage ID: 1500
tsmEv2Both30 = command, 31 = response
tsmDstTuid7CommandTarget device identifier
transactionId25BothLinks command to response
measurementInterval256BothSeconds between measurements
reportInterval258BothSeconds 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 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": "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 IndexJSON PropertyCategory
1tsmIdHeader
2tsmEvHeader
3tsmTsHeader (response only)
4tsmTuidHeader (response only)
5tsmGwHeader (response only)
7tsmDstTuidAddressing (command only)
25transactionIdCommand tracking
540peopleCountingOrientationPeople counting config
543autoRoleWirepas node role
544lowLatencyWirepas node role