Uplink Messages

Messages sent by Thingsee PRESENCE to the cloud — occupancy state, movement count, battery, diagnostics, and system info

Overview

This page documents the Wirepas CBOR messages transmitted by 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. For the Haltian IoT API format, see Operation — Data Transmission.

Thingsee PRESENCE transmits CBOR-encoded messages over Wirepas endpoint 21/21. The gateway adds header fields (tsmTs, tsmGw) and forwards messages to the cloud.

Each message is identified by tsmId (message structure ID). Each example below is shown in both JSON (decoded CBOR) and CBOR (numeric indexes as transmitted on the wire).

For CBOR encoding/decoding details, see CBOR-JSON Conversion Reference. For configuration commands sent to the sensor, see Downlink Messages.

Wirepas endpoint: 21/21 MQTT topic: haltian-iot/wirepas/gw-event/received_data/{gateway-id}/sink1/{network-id}/21/21


Movement Count (tsmId 13100)

The primary application message in movement count mode (mode: 0). Reports the number of PIR detections since the last report.

JSON PropertyCBOR IndexDescription
tsmId1Message ID: 13100
tsmEv2Event type: 10 (timed), 11 (startup)
tsmTs3UTC timestamp in seconds (added by gateway)
tsmTuid4Device unique identifier
tsmGw5Gateway identifier (added by gateway)
moveCount44Number of movements detected since last report

Reporting Behavior

ConditionTiming
Normal operationEvery report interval (default 60s)
Device startupImmediate report with tsmEv: 11
No movementReport with moveCount: 0 at report interval

Example

{
  "tsmId": 13100,
  "tsmEv": 10,
  "tsmTs": 1755064655,
  "tsmTuid": "TSPR04TSC20205001",
  "tsmGw": "TSGW06EWK31903495",
  "moveCount": 7
}
{1: 13100, 2: 10, 44: 7}

Interpretation: Device TSPR04TSC20205001 detected 7 movements since the last report. The value resets to 0 after each report.


Occupancy State (tsmId 2100)

Sent in occupancy mode (mode: 1). Reports binary occupied/unoccupied state changes — only sent when the state transitions.

JSON PropertyCBOR IndexDescription
tsmId1Message ID: 2100
tsmEv2Event type: 7 (state change), 10 (timed)
tsmTs3UTC timestamp in seconds (added by gateway)
tsmTuid4Device unique identifier
tsmGw5Gateway identifier (added by gateway)
state38Occupancy state

State Values

ValueMeaning
0Area is not occupied
1Area is occupied

Reporting Behavior

ConditionTiming
State changeImmediate report with tsmEv: 7
No changePeriodic heartbeat at report interval with tsmEv: 10

Example

{
  "tsmId": 2100,
  "tsmEv": 7,
  "tsmTs": 1755064700,
  "tsmTuid": "TSPR04TSC20205001",
  "tsmGw": "TSGW06EWK31903495",
  "state": 1
}
{1: 2100, 2: 7, 38: 1}

Interpretation: Device TSPR04TSC20205001 reports the area has become occupied.


Occupancy Count (tsmId 13102)

Reports cumulative occupancy event count — how many times the area has transitioned to occupied since the last report.

JSON PropertyCBOR IndexDescription
tsmId1Message ID: 13102
tsmEv2Event type: 10 (timed)
tsmTs3UTC timestamp in seconds (added by gateway)
tsmTuid4Device unique identifier
tsmGw5Gateway identifier (added by gateway)
count113Number of occupancy events since last report
duration191Total occupied time in seconds (optional)

Example

{
  "tsmId": 13102,
  "tsmEv": 10,
  "tsmTs": 1755068200,
  "tsmTuid": "TSPR04TSC20205001",
  "tsmGw": "TSGW06EWK31903495",
  "count": 12,
  "duration": 1800
}
{1: 13102, 2: 10, 113: 12, 191: 1800}

Interpretation: The area was occupied 12 times for a total of 1800 seconds (30 minutes) since the last report.


System Info (tsmId 1100)

Sent once on device boot-up. Contains firmware version and device model.

JSON PropertyCBOR IndexDescription
tsmId1Message ID: 1100
tsmEv2Event type: 11 (startup)
swVersion70Firmware version string
modelCode71Device model code (e.g., TSPR04)
psnProduction serial number

Example

{
  "tsmId": 1100,
  "tsmEv": 11,
  "tsmTs": 1755060000,
  "tsmTuid": "TSPR04TSC20205001",
  "tsmGw": "TSGW06EWK31903495",
  "swVersion": "3.2.1",
  "modelCode": "TSPR04",
  "psn": "TSC20205001"
}
{1: 1100, 2: 11, 70: "3.2.1", 71: "TSPR04"}

Battery Level (tsmId 1110)

Reported every 6 hours (21600 seconds). Monitors remaining battery capacity.

JSON PropertyCBOR IndexMultiplierDescription
tsmId1Message ID: 1110
tsmEv2Event type: 10 (timed)
batl2110^1Battery level percentage

Example

{
  "tsmId": 1110,
  "tsmEv": 10,
  "tsmTs": 1755081600,
  "tsmTuid": "TSPR04TSC20205001",
  "tsmGw": "TSGW06EWK31903495",
  "batl": 92
}
{1: 1110, 2: 10, 21: 920}

Orientation Info (tsmId 1111)

Reports device orientation as 3-axis acceleration values. Useful for verifying correct mounting.

JSON PropertyCBOR IndexDescription
tsmId1Message ID: 1111
tsmEv2Event type: 10 (timed), 11 (startup)
accx40X-axis acceleration
accy41Y-axis acceleration
accz42Z-axis acceleration

Example

{
  "tsmId": 1111,
  "tsmEv": 10,
  "tsmTs": 1755068000,
  "tsmTuid": "TSPR04TSC20205001",
  "tsmGw": "TSGW06EWK31903495",
  "accx": 12,
  "accy": -45,
  "accz": 980
}
{1: 1111, 2: 10, 40: 12, 41: -45, 42: 980}

Interpretation: Device is mounted approximately level (Z-axis near 1000 = gravity pointing down through the sensor).


Network Diagnostics (tsmId 1202)

Reported every 12 hours (43200 seconds). Provides mesh network connectivity metrics.

JSON PropertyCBOR IndexDescription
tsmId1Message ID: 1202
tsmEv2Event type: 10 (timed)
tuid62Device identifier
rssi61Received signal strength
rssiDbm65Signal strength in dBm

Example

{
  "tsmId": 1202,
  "tsmEv": 10,
  "tsmTs": 1755103200,
  "tsmTuid": "TSPR04TSC20205001",
  "tsmGw": "TSGW06EWK31903495",
  "tuid": "TSPR04TSC20205001",
  "rssi": -62,
  "rssiDbm": -62
}
{1: 1202, 2: 10, 62: "TSPR04TSC20205001", 61: -62, 65: -62}

Firmware Binary Info (tsmId 1312)

Sent once on boot alongside System Info. Reports firmware binary details.

Example

{
  "tsmId": 1312,
  "tsmEv": 11,
  "tsmTs": 1755060000,
  "tsmTuid": "TSPR04TSC20205001",
  "tsmGw": "TSGW06EWK31903495",
  "binaryType": 1,
  "binaryVersion": "3.2.1"
}
{1: 1312, 2: 11}

Error Event (tsmId 1403)

Sent when an error condition occurs. Use errorType and errorCause to diagnose issues.

Example

{
  "tsmId": 1403,
  "tsmEv": 29,
  "tsmTs": 1755064700,
  "tsmTuid": "TSPR04TSC20205001",
  "tsmGw": "TSGW06EWK31903495",
  "errorType": 1,
  "errorCause": 3
}
{1: 1403, 2: 29}

Event Types Reference

All tsmEv values used by PRESENCE uplink messages:

tsmEvNameDescription
7State changeOccupancy state transition (used by tsmId 2100)
10TimedPeriodic report at configured interval
11StartupDevice boot-up / power-on
29ErrorCritical error report
34Timed diagnosticsPeriodic diagnostic event
CBOR IndexJSON PropertyCategory
1tsmIdHeader
2tsmEvHeader
3tsmTsHeader
4tsmTuidHeader
5tsmGwHeader
21batlSystem (multiplier 10^1)
38stateOccupancy
40accxOrientation
41accyOrientation
42acczOrientation
44moveCountMovement detection
61rssiNetwork
62tuidNetwork
65rssiDbmNetwork
70swVersionSystem
71modelCodeSystem
113countOccupancy count
191durationOccupancy duration