Read device payload
Normalises the trigger payload into a validated Device reading.
Read device payload#
Converts an incoming object into the demo Device reading shape and exposes its numeric value separately. It is a normalization example, not a connection to physical equipment or a live monitoring API.
Sockets and defaults#
- exec (control): optional execution gate.
- payload (object, required): source fields.
- reading (Device reading custom type): deviceId, numeric value, unit and a freshly generated ISO timestamp.
- value (number): the same normalized measurement magnitude.
- next (control): automatic success route. No configuration schema.
deviceId uses String(payload.deviceId || "meter-01"); unit uses String(payload.unit || "kW"). Thus empty/falsy values use those demo fallbacks. value uses Number(payload.value ?? 87.4), preserving a supplied numeric zero. timestamp is execution time; an incoming timestamp is not copied. Unknown payload fields are not included in the reading.
Example#
Input {"deviceId":"meter-example","value":95,"unit":"kW"} produces a reading with that identity/value/unit and a current timestamp, plus value 95. Even an empty object creates the demo default reading; do not confuse that fallback with a real acquired measurement.
The selected executor is Instrumented executor, adding timing logs. The body logs measurement, unit and device identity. There is no external fetch, secret read or checkpoint write. Bad numeric conversions fail runtime output validation; this asset has no error control route. Connect value to a threshold Condition and reading to Compose alert, with the desired control route gating the alert. Custom type and executor versions are pinned by definition publication.
Catalog identity#
| Field | Value |
|---|---|
| Source key | app.core.demo.reading |
| Kind | node |
| Family | app-core |
| Pack | See library discovery |
Integration guide · Browse the catalog
Inputs#
| Socket ID | Label | Type | Required | Meaning |
|---|---|---|---|---|
exec | Execute | control | No | |
payload | Payload | object | Yes |
Outputs#
| Socket ID | Label | Type | Required | Meaning |
|---|---|---|---|---|
next | Next | control | No | |
reading | Reading | type.device-reading | No | |
value | Value | number | No |
Configuration schema#
{}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, connections and integration setup.
Source provenance
Reviewed against maintained source and topic documentation on 23 October 2026. This is a source snapshot; installed versions and provider access may differ.
../OpenNodeFlow-Library/work/catalog-all.mjs../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjsshared/seed.tsshared/storage-library.tsshared/variable-library.tsshared/control-flow.tsshared/remote-routes.tsserver/runtime-library.tsshared/error-library.tsshared/storage-model.tsshared/builtin-documentation.ts