# Device reading

A validated reading from a monitoring device.

Canonical URL: https://opennodeflow.dev/wiki/reference-app-core-type-device-reading/
JSON reference: https://opennodeflow.dev/wiki/reference-app-core-type-device-reading/index.json
Source snapshot: 2026-10-23

# Device reading

A reusable JSON Schema contract for a normalized monitoring measurement. It validates values at typed sockets; it does not fetch readings, coerce payloads, convert units or run code.

## Fields
- **deviceId** (required string): at least one character.
- **value** (required number): measurement magnitude, without a minimum/maximum.
- **unit** (required string): unit label.
- **timestamp** (required string): timestamp representation.
- Additional properties are rejected.

## Example
`{"deviceId":"meter-example","value":12.5,"unit":"kW","timestamp":"2026-01-01T12:00:00.000Z"}`

This passes the declared shape. A quoted value `"12.5"`, missing unit, empty deviceId or extra property is invalid. The schema does not apply a timestamp format, unit enum or nonempty rule to unit/timestamp; strings accepted by this version need not represent a valid date or recognized engineering unit. Add stricter constraints in a deliberately versioned type when required.

## Using and testing
Choose this custom type on an input/output socket. A custom socket pins the type's definition ID and version; matching IDs at different versions do not connect automatically. A typed reading can feed an ordinary object input; an arbitrary object output does not establish this contract in the graph. In the type test bench, wrap the candidate as `{"value": <reading>}`.

No sockets, configuration, control routes, state or I/O belong to the type itself. Publishing preserves older schemas and their existing users. The Read device payload demo constructs values of this shape, while Compose alert consumes them. Domain identities and measurement contents remain ordinary workflow/run data.

## Catalog identity

| Field | Value |
| --- | --- |
| Source key | `app.core.type.device-reading` |
| Kind | type |
| Family | app-core |
| Pack | See library discovery |

[Integration guide](/wiki/first-workflow/) · [Browse the catalog](/wiki/integration-catalog/)



## Configuration schema


```json
{}
```





## Source and installed versions

This reference describes the maintained source catalog snapshot, not a live export of your installation. Published definitions use immutable versions; installed graphs retain their exact pins. Discover and read the installed definition and selected version before wiring it. See [versioning](/wiki/versioning/), [connections](/wiki/connections/) and [integration setup](/wiki/integration-setup/).

---

## Documentation provenance

- `../OpenNodeFlow-Library/work/catalog-all.mjs`
- `../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs`
- `../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs`
- `shared/seed.ts`
- `shared/storage-library.ts`
- `shared/variable-library.ts`
- `shared/control-flow.ts`
- `shared/remote-routes.ts`
- `server/runtime-library.ts`
- `shared/error-library.ts`
- `shared/storage-model.ts`
- `shared/builtin-documentation.ts`

This page describes maintained source, not a live inventory or an authorization to perform actions.
