Message Header

Thingsee Message header structure and common fields

Every Thingsee Message follows a consistent JSON/CBOR structure with required header fields and profile-specific data.

Message Structure

[{
    "tsmId"      : Number,   // Message ID (required)
    "tsmEv"      : Number,   // Event type (required)
    "tsmTs"      : Number,   // UTC timestamp (required)
    "tsmTuid"    : String,   // Device ID (required)
    "tsmDstTuid" : String,   // Destination (optional)
    "tsmGw"      : String,   // Gateway ID (optional)
    // ... profile-specific data
}]

Required Fields

tsmId (Message Identifier)

Identifies the message type within an application profile.

Format: [profileId][dataId] as an integer

ComponentRangeDescription
profileId1-99Product/profile identifier
dataId100-999Message type within profile

Examples:

  • 12100 = Profile 12 (Environment), Data 100 (sensor readings)
  • 13100 = Profile 13 (Presence), Data 100 (movement detection)
  • 1110 = Profile 1 (Common), Data 110 (battery status)

tsmEv (Event Type)

Indicates why the message was sent.

RangePurpose
0No event / undefined
1-99Common events (see table below)
100-999Profile-specific events

Common Event Types:

IDNameDescription
0No eventEvent data not applicable
7State changeTriggered by state change
8Key eventReactive event (sensor trigger, button press)
9ThresholdConfigured threshold exceeded
10TimedPeriodic interval message
11Power ONDevice booted up
12Power OFFDevice powering down
17Network connectedJoined network
18Network disconnectedLeft network
30Config update requestConfiguration change request
31Config update responseConfiguration change response
35Command requestCommand sent to device
36Command responseResponse from device

tsmTs (Timestamp)

UTC timestamp when the event occurred.

  • Format: Unix timestamp in seconds
  • Precision: Milliseconds supported via decimal (may be affected by JSON float conversion)
  • Exception: May be absent in tsmEv: 18 (Network disconnected) messages; cloud adds timestamp

tsmTuid (Thing Unique Identifier)

Unique identifier for the device (sensor/gateway).

Format: 17-character alphanumeric string

Prefix Identification:

PrefixDescription
TSGW01Thingsee GATEWAY 2G EU
TSGW05Thingsee GATEWAY LAN
TSPR02Thingsee PRESENCE
TSPR04Thingsee PRESENCE (rev2)
TSPD02Thingsee ENVIRONMENT
TSPD04Thingsee ENVIRONMENT (rev2)
TSPD05Thingsee ENVIRONMENT RUGGED
TSTF02Thingsee DISTANCE
TSAN01Thingsee ANGLE
TSAR01Thingsee AIR
XXXX00-XXXX18R&D/pre-production devices

Optional Fields

tsmDstTuid (Destination)

Target device for command messages. Used when sending configuration or commands to a specific device.

tsmGw (Gateway Identifier)

Identifier of the gateway that forwarded the message.

tsmGwTs (Gateway Timestamp)

UTC timestamp when the gateway received the message. Used for diagnostics and mesh network performance analysis.

tsmCloudTs (Cloud Timestamp)

UTC timestamp when Thingsee Operations Cloud received the message. Used for diagnostics and connectivity benchmarking.

Profile IDs

ProfileID RangeDescription
Common1000-1999System, network, firmware
Analytics2000-2999Computed analytics data
Edge3000-3999Edge processing results
Gateway11000-11999Gateway-specific messages
Environment12000-12999Temperature, humidity, pressure
Presence13000-13999Occupancy, movement
Machine Usage16000-16999Equipment monitoring
Distance17000-17999Range measurements
Angle18000-18999Tilt and orientation
Air Quality24000-24999CO₂, TVOC measurements

Example Messages

Environment Reading (tsmId: 12100)

[{
  "tsmId": 12100,
  "tsmEv": 10,
  "tsmTs": 1520416221,
  "tsmTuid": "TSPD04ESY93100802",
  "tsmGw": "TSGW01ABC123456",
  "temp": 21.3,
  "humd": 45.2,
  "airp": 101364.5,
  "lght": 450
}]

Battery Status (tsmId: 1110)

[{
  "tsmId": 1110,
  "tsmEv": 10,
  "tsmTs": 1520416221,
  "tsmTuid": "TSPR04E2O90201558",
  "tsmGw": "TSGW01ABC123456",
  "batl": 87
}]

Configuration Response (tsmEv: 31)

[{
  "tsmId": 1500,
  "tsmEv": 31,
  "tsmTs": 1503714007,
  "tsmTuid": "TSPR04E2O90201558",
  "transactionId": 1,
  "measurementInterval": 10,
  "reportInterval": 60
}]