Measurement Types Reference
This page provides a complete reference of all measurement types available in Haltian IoT.
Overview
Measurements are sensor data values sent by Haltian IoT devices. Each measurement entry contains:
- deviceId - UUID of the device that generated the measurement
- measuredAt - Timestamp when the measurement was taken (timestamptz)
- [measurementField] - The measurement value (type varies by measurement)
Environmental Measurements
ambient_temperature
Ambient air temperature from environment sensors.
Schema Type: measurementAmbientTemperature
| Property | Value |
|---|---|
| GraphQL Field | ambientTemperature |
| Data Type | numeric |
| Unit | Degrees Celsius (°C) |
| Typical Range | -40 to +85 |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"ambientTemperature": 23.5
}
humidity
Relative humidity percentage from environment sensors.
Schema Type: measurementHumidity
| Property | Value |
|---|---|
| GraphQL Field | humidity |
| Data Type | numeric |
| Unit | Percent (%) |
| Typical Range | 0 to 100 |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"humidity": 45.2
}
barometric_pressure
Atmospheric pressure reading from barometric sensors.
Schema Type: measurementBarometricPressure
| Property | Value |
|---|---|
| GraphQL Field | barometricPressure |
| Data Type | numeric |
| Unit | Hectopascals (hPa) |
| Typical Range | 870 to 1084 |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"barometricPressure": 1013.25
}
co2
Carbon dioxide concentration from air quality sensors.
Schema Type: measurementCo2
| Property | Value |
|---|---|
| GraphQL Field | co2 |
| Data Type | numeric |
| Unit | Parts per million (ppm) |
| Typical Range | 400 to 5000 |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"co2": 850
}
tvoc
Total Volatile Organic Compounds from air quality sensors.
Schema Type: measurementTvoc
| Property | Value |
|---|---|
| GraphQL Field | tvoc |
| Data Type | numeric |
| Unit | Parts per billion (ppb) |
| Typical Range | 0 to 60000 |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"tvoc": 125
}
ambient_light
Ambient light level from light sensors.
Schema Type: measurementAmbientLight
| Property | Value |
|---|---|
| GraphQL Field | ambientLight |
| Data Type | numeric |
| Unit | Lux |
| Typical Range | 0 to 100000 |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"ambientLight": 450
}
Occupancy Measurements
occupancy_status
Boolean occupancy status for spaces.
Schema Type: measurementOccupancyStatus
| Property | Value |
|---|---|
| GraphQL Field | isOccupied |
| Data Type | Boolean |
| Values | true (occupied), false (vacant) |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"isOccupied": true
}
occupants_count
Number of occupants detected in a space.
Schema Type: measurementOccupantsCount
| Property | Value |
|---|---|
| GraphQL Field | occupantsCount |
| Data Type | Int |
| Typical Range | 0 to N (space capacity) |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"occupantsCount": 5
}
occupancy_seconds
Duration of occupancy in seconds (occupancy detection engine output).
Schema Type: measurementOccupancySeconds
| Property | Value |
|---|---|
| GraphQL Field | occupancySeconds |
| Data Type | numeric |
| Unit | Seconds |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"occupancySeconds": 3600
}
directional_movement
Entry and exit counts from directional people counters.
Schema Type: measurementDirectionalMovement
| Property | Value |
|---|---|
| GraphQL Fields | entries, exits |
| Data Type | Int each |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"entries": 12,
"exits": 8
}
movement_detections
PIR or other motion sensor trigger count.
Schema Type: measurementMovementDetections
| Property | Value |
|---|---|
| GraphQL Field | movementDetections |
| Data Type | Int |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"movementDetections": 47
}
Position & Movement Measurements
position
Device geographic and local coordinates.
Schema Type: measurementPosition
| Property | Value |
|---|---|
| GraphQL Fields | positionGlobal, positionLocal, isStatic, spaceId |
| Data Types | geography, geometry, Boolean, uuid |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"positionGlobal": {
"type": "Point",
"coordinates": [24.9384, 60.1699]
},
"positionLocal": {
"type": "Point",
"coordinates": [12.5, 8.3, 0.0]
},
"isStatic": true,
"spaceId": "550e8400-e29b-41d4-a716-446655440001"
}
position_zone
Zone-based position (which zone the device is in).
Schema Type: measurementPositionZone
| Property | Value |
|---|---|
| GraphQL Field | zoneId |
| Data Type | uuid |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"zoneId": "550e8400-e29b-41d4-a716-446655440001"
}
position_confidence
Confidence score for position measurements.
Schema Type: measurementPositionConfidence
| Property | Value |
|---|---|
| GraphQL Field | positionConfidence |
| Data Type | numeric |
| Range | 0 to 100 (%) |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"positionConfidence": 85.5
}
device_orientation
Device orientation from accelerometer readings.
Schema Type: measurementDeviceOrientation
| Property | Value |
|---|---|
| GraphQL Fields | accx, accy, accz |
| Data Type | numeric each |
| Unit | g (gravitational acceleration) |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"accx": 0.02,
"accy": -0.01,
"accz": 1.0
}
vibration
Vibration detection from accelerometer.
Schema Type: measurementVibration
| Property | Value |
|---|---|
| GraphQL Fields | level, total |
| Data Type | numeric each |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"level": 0.05,
"total": 1.2
}
Device Status Measurements
battery_percentage
Battery charge level as percentage.
Schema Type: measurementBatteryPercentage
| Property | Value |
|---|---|
| GraphQL Field | batteryPercentage |
| Data Type | numeric |
| Unit | Percent (%) |
| Typical Range | 0 to 100 |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"batteryPercentage": 85
}
battery_voltage
Battery voltage reading.
Schema Type: measurementBatteryVoltage
| Property | Value |
|---|---|
| GraphQL Field | batteryVoltage |
| Data Type | numeric |
| Unit | Volts (V) |
| Typical Range | 2.0 to 4.2 |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"batteryVoltage": 3.7
}
battery_current
Battery current draw.
Schema Type: measurementBatteryCurrent
| Property | Value |
|---|---|
| GraphQL Field | batteryCurrent |
| Data Type | numeric |
| Unit | Amperes (A) |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"batteryCurrent": 0.015
}
rss
Received Signal Strength (RSSI) with device mobility context.
Schema Type: measurementRss
| Property | Value |
|---|---|
| GraphQL Fields | rss, isStatic, mode, moveCount, sourceDeviceId |
| Data Types | numeric, Boolean, device_mode_type, Int, uuid |
| Unit | dBm (for rss) |
| Typical Range | -100 to 0 (for rss) |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"rss": -65,
"isStatic": false,
"mode": "active",
"moveCount": 3,
"sourceDeviceId": "550e8400-e29b-41d4-a716-446655440002"
}
system_temperature
Internal device/system temperature.
Schema Type: measurementSystemTemperature
| Property | Value |
|---|---|
| GraphQL Field | systemTemperature |
| Data Type | numeric |
| Unit | Degrees Celsius (°C) |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"systemTemperature": 28.5
}
boot_count
Number of times device has booted/restarted and the reason for the last boot.
Schema Type: measurementBootCount
| Property | Value |
|---|---|
| GraphQL Fields | bootCount, bootReason |
| Data Types | Int, String |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"bootCount": 42,
"bootReason": "power_on"
}
Distance & Sensing Measurements
distance
Distance measurement from ToF or ultrasonic sensors.
Schema Type: measurementDistance
| Property | Value |
|---|---|
| GraphQL Field | distance |
| Data Type | numeric |
| Unit | Millimeters (mm) |
| Typical Range | 0 to 4000 |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"distance": 1250
}
echo
Echo/reflection measurement.
Schema Type: measurementEcho
| Property | Value |
|---|---|
| GraphQL Field | echo |
| Data Type | numeric |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"echo": 150
}
magnetic_state
Magnetic field detection (hall effect/reed switch sensors). Typically used for door/window open/close detection.
Schema Type: measurementMagneticState
| Property | Value |
|---|---|
| GraphQL Field | isOpen |
| Data Type | Boolean |
| Values | true (open / no magnet), false (closed / magnet detected) |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"isOpen": false
}
magnetic_state_changes
Count of magnetic state changes (door/window open/close cycles).
Schema Type: measurementMagneticStateChanges
| Property | Value |
|---|---|
| GraphQL Field | magneticStateChanges |
| Data Type | Int |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"magneticStateChanges": 15
}
Power & Energy Measurements
solar_panel_voltage
Solar panel voltage reading for energy harvesting devices.
Schema Type: measurementSolarPanelVoltage
| Property | Value |
|---|---|
| GraphQL Field | solarPanelVoltage |
| Data Type | numeric |
| Unit | Volts (V) |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"solarPanelVoltage": 3.2
}
harvester_storage_voltage
Energy harvester storage capacitor voltage.
Schema Type: measurementHarvesterStorageVoltage
| Property | Value |
|---|---|
| GraphQL Field | harvesterStorageVoltage |
| Data Type | numeric |
| Unit | Volts (V) |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"harvesterStorageVoltage": 2.8
}
usb_voltage
USB power supply voltage.
Schema Type: measurementUSBVoltage
| Property | Value |
|---|---|
| GraphQL Field | usbVoltage |
| Data Type | numeric |
| Unit | Volts (V) |
| Typical Range | 4.5 to 5.5 |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"usbVoltage": 5.1
}
Other Measurements
electrical_resistance
Electrical resistance measurement.
Schema Type: measurementElectricalResistance
| Property | Value |
|---|---|
| GraphQL Field | electricalResistance |
| Data Type | numeric |
| Unit | Ohms (Ω) |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"electricalResistance": 10000
}
device_role
Device role configuration.
Schema Type: measurementDeviceRole
| Property | Value |
|---|---|
| GraphQL Field | deviceRole |
| Data Type | String |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"deviceRole": "gateway"
}
diagnostics_interval
Diagnostics reporting interval setting.
Schema Type: measurementDiagnosticsInterval
| Property | Value |
|---|---|
| GraphQL Field | diagnosticsInterval |
| Data Type | Int |
| Unit | Seconds |
{
"deviceId": "550e8400-e29b-41d4-a716-446655440000",
"measuredAt": "2026-02-05T10:30:00.000Z",
"diagnosticsInterval": 3600
}
Last Measurements
The schema also includes “last measurement” types (e.g., measurementLastAmbientTemperature) which represent the most recent value for each measurement type. These are used for efficient queries when you only need the current state.
Querying Measurements
Get Device Measurements
query GetDeviceMeasurements($deviceId: uuid!, $from: timestamptz!, $to: timestamptz!) {
measurementAmbientTemperature(
where: {
deviceId: { _eq: $deviceId }
measuredAt: { _gte: $from, _lte: $to }
}
orderBy: { measuredAt: DESC }
limit: 100
) {
measuredAt
ambientTemperature
}
}
Get Last Measurement Value
query GetLastTemperature($deviceId: uuid!) {
measurementLastAmbientTemperature(
where: { deviceId: { _eq: $deviceId } }
) {
measuredAt
ambientTemperature
}
}
Next Steps
- Real-Time Data Streaming - Subscribe to measurements via MQTT
- Building Complete Applications - Query measurements in your application
- Service API Queries - GraphQL query patterns