> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuro-tech.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Sensor data

> Represent typed fields and choose a real-time communication pattern

Sensor data consists of typed **fields** with timestamps, names, values, optional units, categories, quality flags, localization, and node identity.

## Field categories

Requests can select categories such as momentary, peak, status, computed, identity, and historical data. Ask only for categories and field names the application needs; unconstrained historical reads can be expensive.

## Communication patterns

| Pattern            | Use when                               | Behavior                                                                     |
| ------------------ | -------------------------------------- | ---------------------------------------------------------------------------- |
| Request/response   | One current or bounded historical read | Immediate, delayed, scheduled, queued, fragmented, and cancellable responses |
| Event subscription | Notify when values meet trigger rules  | Device maintains a subscription and sends sensor events                      |
| Publish/subscribe  | Many consumers follow a stream         | Data is published to an XMPP PubSub/PEP node                                 |

## Request/response lifecycle

1. Send field/category, node, time-range, and optional token filters.
2. Receive an acknowledgement with request identity.
3. Process zero or more field fragments.
4. Stop only when the response marks completion or an error occurs.
5. Cancel the request when the result is no longer needed.

Do not assume all sensor reads fit in one stanza. Large or slow devices can stream fragmented results asynchronously.

## Quality and units

Preserve quality flags and timestamp with the value. Convert units through published unit definitions rather than hard-coded display conversions. Never compare readings from incompatible units or silently discard uncertainty/status fields.

## Subscription hygiene

* Use meaningful thresholds and minimum intervals.
* Renew/monitor subscriptions as required by the device.
* Unsubscribe when the consumer goes away.
* Deduplicate events by request/subscription identity and field timestamp.
* Apply backpressure or aggregation before forwarding high-rate telemetry.

For browser integrations through a Neuron, see [Agent Things API](/iot/agent-things-api).
