Uplink Messages
Overview
This page documents the CBOR-encoded messages that Thingsee PRESENCE transmits from the sensor to the gateway over the Wirepas mesh network.
For the Haltian IoT Platform equivalent (JSON over MQTT/GraphQL), see Data Output.
Wirepas endpoint: 21/21
MQTT topic: haltian-iot/wirepas/gw-event/received_data/{gateway-id}/sink1/{network-id}/21/21
Each message is identified by tsmId (message structure ID). Examples below are shown in both JSON (decoded CBOR) and CBOR (numeric indexes as transmitted on the wire).
Messages by Operating Mode
| Operating Mode | Application Messages | HIoT Measurement Type |
|---|---|---|
| Mode 1 (Occupancy) | tsmId 2100 + tsmId 13102 | occupancyStatus |
| Mode 2 (Visitor counter, default) | tsmId 13100 | movementDetections |
Movement Count (tsmId 13100)
Produced in Mode 2. Reports the number of PIR detections since the last report.
| JSON Property | CBOR Index | Description |
|---|---|---|
tsmId | 1 | Message ID: 13100 |
tsmEv | 2 | Event type: 10 (timed), 11 (startup) |
tsmTs | 3 | UTC timestamp in seconds (added by gateway) |
tsmTuid | 4 | Device unique identifier |
tsmGw | 5 | Gateway identifier (added by gateway) |
moveCount | 44 | Number of movements detected since last report |
{
"tsmId": 13100,
"tsmEv": 10,
"tsmTs": 1755064655,
"tsmTuid": "TSPR04TSC20205001",
"tsmGw": "TSGW06EWK31903495",
"moveCount": 7
}
{1: 13100, 2: 10, 44: 7}
Occupancy State (tsmId 2100)
Produced in Mode 1. Reports binary occupied/unoccupied state.
| JSON Property | CBOR Index | Description |
|---|---|---|
tsmId | 1 | Message ID: 2100 |
tsmEv | 2 | Event type: 7 (state change), 10 (timed) |
tsmTs | 3 | UTC timestamp in seconds (added by gateway) |
tsmTuid | 4 | Device unique identifier |
tsmGw | 5 | Gateway identifier (added by gateway) |
state | 38 | Occupancy state: 0 = vacant, 1 = occupied |
{
"tsmId": 2100,
"tsmEv": 7,
"tsmTs": 1755064700,
"tsmTuid": "TSPR04TSC20205001",
"tsmGw": "TSGW06EWK31903495",
"state": 1
}
{1: 2100, 2: 7, 38: 1}
Occupancy Count (tsmId 13102)
Produced in Mode 1 alongside tsmId 2100. Reports cumulative occupancy events since last report.
| JSON Property | CBOR Index | Description |
|---|---|---|
tsmId | 1 | Message ID: 13102 |
tsmEv | 2 | Event type: 10 (timed) |
tsmTs | 3 | UTC timestamp in seconds (added by gateway) |
tsmTuid | 4 | Device unique identifier |
tsmGw | 5 | Gateway identifier (added by gateway) |
count | 113 | Number of occupancy events since last report |
duration | 191 | Total occupied time in seconds (optional) |
{
"tsmId": 13102,
"tsmEv": 10,
"tsmTs": 1755068200,
"tsmTuid": "TSPR04TSC20205001",
"tsmGw": "TSGW06EWK31903495",
"count": 12,
"duration": 1800
}
{1: 13102, 2: 10, 113: 12, 191: 1800}
Battery Level (tsmId 1110)
Reported every 6 hours.
| JSON Property | CBOR Index | Multiplier | Description |
|---|---|---|---|
tsmId | 1 | — | Message ID: 1110 |
tsmEv | 2 | — | Event type: 10 (timed) |
batl | 21 | 10^1 | Battery level percentage |
batl uses multiplier 10^1 — CBOR value 920 decodes to 92.0% in JSON. Divide the raw CBOR value by 10 when decoding.
{
"tsmId": 1110,
"tsmEv": 10,
"tsmTs": 1755081600,
"tsmTuid": "TSPR04TSC20205001",
"tsmGw": "TSGW06EWK31903495",
"batl": 92
}
{1: 1110, 2: 10, 21: 920}
System Info (tsmId 1100)
Sent once on device boot-up.
| JSON Property | CBOR Index | Description |
|---|---|---|
tsmId | 1 | Message ID: 1100 |
tsmEv | 2 | Event type: 11 (startup) |
swVersion | 70 | Firmware version string |
modelCode | 71 | Device model code (e.g., TSPR04) |
{
"tsmId": 1100,
"tsmEv": 11,
"tsmTs": 1755060000,
"tsmTuid": "TSPR04TSC20205001",
"tsmGw": "TSGW06EWK31903495",
"swVersion": "3.2.1",
"modelCode": "TSPR04"
}
{1: 1100, 2: 11, 70: "3.2.1", 71: "TSPR04"}
Orientation Info (tsmId 1111)
Reports device orientation as 3-axis acceleration. Useful for verifying correct mounting.
| JSON Property | CBOR Index | Description |
|---|---|---|
tsmId | 1 | Message ID: 1111 |
tsmEv | 2 | Event type: 10 (timed), 11 (startup) |
accx | 40 | X-axis acceleration |
accy | 41 | Y-axis acceleration |
accz | 42 | Z-axis acceleration |
{
"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}
Network Diagnostics (tsmId 1202)
Reported every 12 hours. Provides mesh network connectivity metrics.
| JSON Property | CBOR Index | Description |
|---|---|---|
tsmId | 1 | Message ID: 1202 |
tsmEv | 2 | Event type: 10 (timed) |
rssi | 61 | Received signal strength |
rssiDbm | 65 | Signal strength in dBm |
{
"tsmId": 1202,
"tsmEv": 10,
"tsmTs": 1755103200,
"tsmTuid": "TSPR04TSC20205001",
"tsmGw": "TSGW06EWK31903495",
"rssi": -62,
"rssiDbm": -62
}
{1: 1202, 2: 10, 61: -62, 65: -62}
CBOR Index Reference
| CBOR Index | JSON Property | Category |
|---|---|---|
| 1 | tsmId | Header |
| 2 | tsmEv | Header |
| 3 | tsmTs | Header |
| 4 | tsmTuid | Header |
| 5 | tsmGw | Header |
| 21 | batl | System (multiplier 10^1) |
| 38 | state | Occupancy |
| 40 | accx | Orientation |
| 41 | accy | Orientation |
| 42 | accz | Orientation |
| 44 | moveCount | Movement detection |
| 61 | rssi | Network |
| 62 | tuid | Network |
| 65 | rssiDbm | Network |
| 70 | swVersion | System |
| 71 | modelCode | System |
| 113 | count | Occupancy count |
| 191 | duration | Occupancy duration |