Uplink Messages
This page is primarily for customers who operate their own gateways and cloud infrastructure. It documents every message the ENVIRONMENT sensor transmits over the Wirepas mesh network, shown in both JSON and CBOR format.
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 ENVIRONMENT 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
Weather Info (tsmId 12100)
The primary application message. Reports temperature, humidity, air pressure, and light level.
| JSON Property | CBOR Index | Multiplier | Description |
|---|---|---|---|
tsmId | 1 | — | Message ID: 12100 |
tsmEv | 2 | — | Event type: 10 (timed), 9 (threshold), 11 (startup) |
tsmTs | 3 | — | UTC timestamp in seconds (added by gateway) |
tsmTuid | 4 | — | Device unique identifier |
tsmGw | 5 | — | Gateway identifier (added by gateway) |
temp | 30 | 10^1 | Temperature in °C |
lght | 31 | — | Light level in lux |
humd | 32 | 10^1 | Relative humidity in % |
airp | 33 | 10^3 | Air pressure in Pascals |
CBOR Multipliers
Several fields use multipliers in CBOR encoding:
temp: Multiply by 10^1 — CBOR value224=22.4°Chumd: Multiply by 10^1 — CBOR value672=67.2%airp: Multiply by 10^3 — CBOR value102092358=102092.358Pa (≈1020.9 hPa)
Divide the raw CBOR value by the multiplier when decoding.
Reporting Behavior
| Condition | Timing |
|---|---|
| Normal operation | Every report interval (default 300s) |
| Threshold exceeded | Immediate report with tsmEv: 9 (if hysteresis configured) |
| Device startup | Immediate report with tsmEv: 11 |
Example
{
"tsmId": 12100,
"tsmEv": 10,
"tsmTs": 1755064655,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"temp": 22.4,
"humd": 67.2,
"airp": 102092.358,
"lght": 270
}
{1: 12100, 2: 10, 30: 224, 31: 270, 32: 672, 33: 102092358}
Interpretation: Temperature 22.4°C, humidity 67.2%, air pressure 1020.9 hPa, light level 270 lux.
Magneto Switch Info (tsmId 12101)
Reports hall sensor state — detects doors, windows, or magnetic field changes.
| JSON Property | CBOR Index | Description |
|---|---|---|
tsmId | 1 | Message ID: 12101 |
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) |
hall | 46 | Hall sensor state |
hallCount | 47 | State change count since last report |
State Values
| Value | Meaning |
|---|---|
0 | Open (no magnet detected) |
1 | Closed (magnet detected) |
hallCount indicates the number of state transitions during the measurement period. For example, hallCount: 2 means one open/close cycle (A → B → A).
Reporting Behavior
| hallMode | Behavior |
|---|---|
0 | Report at every interval regardless of state |
1 | Report only when state changes (tsmEv: 7) |
Example
{
"tsmId": 12101,
"tsmEv": 7,
"tsmTs": 1755064700,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"hall": 1,
"hallCount": 2
}
{1: 12101, 2: 7, 46: 1, 47: 2}
Interpretation: Hall sensor is closed (magnet detected), with 2 state transitions since the last report.
Leakage Resistance Data (tsmId 12102)
ADC reading from the leakage detection probe. Available on ENVIRONMENT variants with a leakage sensor connection.
| JSON Property | CBOR Index | Description |
|---|---|---|
tsmId | 1 | Message ID: 12102 |
tsmEv | 2 | Event type: 10 (timed), 9 (threshold) |
tsmTs | 3 | UTC timestamp in seconds (added by gateway) |
tsmTuid | 4 | Device unique identifier |
tsmGw | 5 | Gateway identifier (added by gateway) |
resistance | 111 | Resistance reading (ADC value) |
Example
{
"tsmId": 12102,
"tsmEv": 10,
"tsmTs": 1755064800,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"resistance": 1023
}
{1: 12102, 2: 10, 111: 1023}
Interpretation: Leakage sensor reading is 1023 (high resistance = no leak). Lower values indicate moisture detected.
Vibration Info (tsmId 16100)
Reports vibration characteristics when the accelerometer is in machine monitoring mode (accelerometerMode: 2). Includes activity level, energy level, and a 10-bin impact histogram.
| JSON Property | CBOR Index | Multiplier | Description |
|---|---|---|---|
tsmId | 1 | — | Message ID: 16100 |
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) |
activityLevel | 81 | 10^3 | Activity percentage (0–100) |
energyLevel | 89 | — | Cumulative impact energy (unitless) |
histogram0 | 1000 | — | Impacts > 128 mG |
histogram1 | 1001 | — | Impacts > 300 mG |
histogram2 | 1002 | — | Impacts > 500 mG |
histogram3 | 1003 | — | Impacts > 1 G |
histogram4 | 1004 | — | Impacts > 2 G |
histogram5 | 1005 | — | Impacts > 3 G |
histogram6 | 1006 | — | Impacts > 4 G |
histogram7 | 1007 | — | Impacts > 8 G |
histogram8 | 1008 | — | Impacts > 12 G |
histogram9 | 1009 | — | Impacts > 16 G |
activityLevel uses multiplier 10^3 — CBOR value 34000 decodes to 34.0% in JSON. Divide the raw CBOR value by 1000 when decoding.
Example
{
"tsmId": 16100,
"tsmEv": 10,
"tsmTs": 1755064900,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"activityLevel": 34,
"energyLevel": 400,
"histogram0": 2,
"histogram1": 14,
"histogram2": 45,
"histogram3": 23,
"histogram4": 2,
"histogram5": 1,
"histogram6": 0,
"histogram7": 0,
"histogram8": 0,
"histogram9": 0
}
{1: 16100, 2: 10, 81: 34000, 89: 400,
1000: 2, 1001: 14, 1002: 45, 1003: 23, 1004: 2, 1005: 1,
1006: 0, 1007: 0, 1008: 0, 1009: 0}
Interpretation: Machine is 34% active. Most vibration impacts are in the 500 mG – 1 G range, indicating moderate machine operation. No significant high-G impacts detected.
Orientation Info (tsmId 1111)
Reports device orientation as 3-axis acceleration values. Sent when the accelerometer is in orientation mode (accelerometerMode: 1).
| JSON Property | CBOR Index | Description |
|---|---|---|
tsmId | 1 | Message ID: 1111 |
tsmEv | 2 | Event type: 10 (timed), 7 (state change) |
accx | 40 | X-axis acceleration |
accy | 41 | Y-axis acceleration |
accz | 42 | Z-axis acceleration |
Example
{
"tsmId": 1111,
"tsmEv": 10,
"tsmTs": 1755068000,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"accx": 12,
"accy": -45,
"accz": 980
}
{1: 1111, 2: 10, 40: 12, 41: -45, 42: 980}
System Info (tsmId 1100)
Sent once on device boot-up. Contains firmware version and device model.
| 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 |
psn | — | Production serial number |
Example
{
"tsmId": 1100,
"tsmEv": 11,
"tsmTs": 1755060000,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"swVersion": "3.2.1",
"modelCode": "TSEN01"
}
{1: 1100, 2: 11, 70: "3.2.1", 71: "TSEN01"}
Battery Level (tsmId 1110)
Reported every 6 hours (21600 seconds). Monitors remaining battery capacity.
| 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 850 decodes to 85.0% in JSON. Divide the raw CBOR value by 10 when decoding.
Example
{
"tsmId": 1110,
"tsmEv": 10,
"tsmTs": 1755081600,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"batl": 85
}
{1: 1110, 2: 10, 21: 850}
Network Diagnostics (tsmId 1202)
Reported every 12 hours (43200 seconds). Provides mesh network connectivity metrics.
| JSON Property | CBOR Index | Description |
|---|---|---|
tsmId | 1 | Message ID: 1202 |
tsmEv | 2 | Event type: 10 (timed) |
tuid | 62 | Device identifier |
rssi | 61 | Received signal strength |
rssiDbm | 65 | Signal strength in dBm |
Example
{
"tsmId": 1202,
"tsmEv": 10,
"tsmTs": 1755103200,
"tsmTuid": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"tuid": "TSEN01TSC20203001",
"rssi": -58,
"rssiDbm": -58
}
{1: 1202, 2: 10, 62: "TSEN01TSC20203001", 61: -58, 65: -58}
Firmware Binary Info (tsmId 1312)
Sent once on boot alongside System Info. Reports firmware binary details.
Example
{
"tsmId": 1312,
"tsmEv": 11,
"tsmTs": 1755060000,
"tsmTuid": "TSEN01TSC20203001",
"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": "TSEN01TSC20203001",
"tsmGw": "TSGW06EWK31903495",
"errorType": 1,
"errorCause": 3
}
{1: 1403, 2: 29}
Event Types Reference
All tsmEv values used by ENVIRONMENT uplink messages:
| tsmEv | Name | Description |
|---|---|---|
| 7 | State change | Hall sensor state transition |
| 9 | Threshold | Hysteresis threshold exceeded (weather or leakage) |
| 10 | Timed | Periodic report at configured interval |
| 11 | Startup | Device boot-up / power-on |
| 29 | Error | Critical error report |
| 34 | Timed diagnostics | Periodic diagnostic event |
CBOR Index Reference (Uplink)
| 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) |
| 30 | temp | Weather (multiplier 10^1) |
| 31 | lght | Weather |
| 32 | humd | Weather (multiplier 10^1) |
| 33 | airp | Weather (multiplier 10^3) |
| 40 | accx | Orientation |
| 41 | accy | Orientation |
| 42 | accz | Orientation |
| 46 | hall | Magneto switch |
| 47 | hallCount | Magneto switch |
| 61 | rssi | Network |
| 62 | tuid | Network |
| 65 | rssiDbm | Network |
| 70 | swVersion | System |
| 71 | modelCode | System |
| 81 | activityLevel | Vibration (multiplier 10^3) |
| 89 | energyLevel | Vibration |
| 111 | resistance | Leakage |
| 1000–1009 | histogram0–histogram9 | Vibration histogram |