Skip to content
OpenNodeFlow.DocsOpen beta ↗
Agent guide ↗
Docs/Library asset reference

Read device payload

Normalises the trigger payload into a validated Device reading.

23 Oct 2026 · 2 min read
Markdown ↗JSON ↗

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#

FieldValue
Source keyapp.core.demo.reading
Kindnode
Familyapp-core
PackSee library discovery

Integration guide · Browse the catalog

Inputs#

Socket IDLabelTypeRequiredMeaning
execExecutecontrolNo
payloadPayloadobjectYes

Outputs#

Socket IDLabelTypeRequiredMeaning
nextNextcontrolNo
readingReadingtype.device-readingNo
valueValuenumberNo

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, 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.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
Type to search the documentation.
↑ ↓ to navigate · Enter to openAgent map ↗