Data Output

Measurement data produced by Thingsee PRESENCE — MQTT streams and GraphQL queries

Overview

Thingsee PRESENCE produces measurement data that you can access through the Haltian IoT Platform — receive JSON measurements via MQTT Stream API or query via GraphQL Data API.

This page documents the measurement types, payload formats, and how to access the data.


Haltian IoT Measurements

The PRESENCE sensor produces the following measurement types depending on its configured operating mode:

Measurement TypeOperating ModeDescription
movementDetectionsMode 2 (default)Count of PIR detections per reporting interval
occupancyStatusMode 1Binary occupied/vacant state
batteryPercentageAll modesRemaining battery level

movementDetections

Produced in Mode 2 (Visitor counter). Reports the number of movements detected since the last report interval.

MQTT Topic:

haltian-iot/events/{integration-id}/{api-key-id}/measurements/movementDetections/{device-uuid}

JSON Payload:

{
  "measured_at": "2026-01-28T08:52:11Z",
  "movementDetections": 7
}

Fields:

FieldTypeDescription
measured_atISO 8601 stringTimestamp of measurement
movementDetectionsInteger (0–34)Number of movements detected since last report. Resets to 0 after each report.

Reporting behavior:

  • Reports every reportInterval (default 60s) when movement is detected
  • Reports every passiveReportInterval (default 3600s) when no movement — value will be 0
  • Maximum count per minute is 34 (sensor hardware limit)

GraphQL query example:

query {
  measurements(
    filter: {
      deviceId: "{device-uuid}"
      type: movementDetections
      from: "2026-01-28T00:00:00Z"
      to: "2026-01-28T23:59:59Z"
    }
  ) {
    measuredAt
    movementDetections
  }
}

Related: Configure Mode 2 | Operation — Mode 2 behavior


occupancyStatus

Produced in Mode 1 (Occupancy). Reports binary occupied/vacant state — only sent when the state transitions or at the passive report interval.

MQTT Topic:

haltian-iot/events/{integration-id}/{api-key-id}/measurements/occupancyStatus/{device-uuid}

JSON Payload:

{
  "measured_at": "2026-01-28T08:52:11Z",
  "isOccupied": true
}

Fields:

FieldTypeDescription
measured_atISO 8601 stringTimestamp of state change
isOccupiedBooleantrue = area occupied, false = area vacant

Reporting behavior:

  • Reports immediately when state changes (occupied ↔ vacant)
  • Reports current state every passiveReportInterval (default 3600s) as a heartbeat
  • Value persists until the next event — if isOccupied: true at 10:00, the area is considered occupied until the next false event

GraphQL query example:

query {
  measurements(
    filter: {
      deviceId: "{device-uuid}"
      type: occupancyStatus
      from: "2026-01-28T00:00:00Z"
      to: "2026-01-28T23:59:59Z"
    }
  ) {
    measuredAt
    isOccupied
  }
}

Related: Configure Mode 1 | Operation — Mode 1 behavior


batteryPercentage

Produced in all modes. Reports remaining battery capacity. Updated every 6 hours.

MQTT Topic:

haltian-iot/events/{integration-id}/{api-key-id}/measurements/batteryPercentage/{device-uuid}

JSON Payload:

{
  "measured_at": "2026-01-28T08:52:11Z",
  "batteryPercentage": 85
}

Fields:

FieldTypeDescription
measured_atISO 8601 stringTimestamp of measurement
batteryPercentageInteger (0–100)Remaining battery level as percentage

Reporting behavior:

  • Reports every 6 hours (21600 seconds)
  • Last reported value is the current battery state (infrequent updates)
  • Plan battery replacement when value drops below 10%

GraphQL query example:

query {
  measurements(
    filter: {
      deviceId: "{device-uuid}"
      type: batteryPercentage
      from: "2026-01-01T00:00:00Z"
      to: "2026-01-31T23:59:59Z"
    }
  ) {
    measuredAt
    batteryPercentage
  }
}

How to Access This Data

MQTT Stream API (Real-time)

Subscribe to receive measurements as they arrive. See the Real-Time Data Streaming guide for setup.

Subscribe to all measurements from a specific device:

haltian-iot/events/{integration-id}/{api-key-id}/measurements/+/{device-uuid}

Subscribe to a specific measurement type from all devices:

haltian-iot/events/{integration-id}/{api-key-id}/measurements/occupancyStatus/+

Data API (GraphQL)

Query historical measurement data via the Data API. Supports filtering by device, measurement type, and time range.

Parquet Export

Bulk measurement data is available as Parquet files via the Data API. Useful for analytics, dashboards, and data warehousing.