Skip to main content

Transfer Functions

Subject to Change in WEDA v1.1.1

The Data Engine is expected to change in WEDA v1.1.1. This page describes the Transfer Function behavior available in the current release.

Data Engine Pipeline

Data Source → Data Object → Transfer Function (optional) → Output Data Object → Alert / Reports

Overview

A Transfer Function is a cloud-side computation in WEDA Core. It reads the current value of an existing Data Object, applies a mathematical expression, and produces an Output Data Object — stored in IoTDB and queryable through the Data Points API.

Transfer Functions are optional. Every Data Source sensor is automatically synced into a Data Object with no configuration required (see Data Engine Concepts); you only create a Transfer Function when you need an additional, derived value on top of what's already there.

Common use cases:

  • Convert 4–20 mA current readings to engineering units (e.g. 4–20 mA → 0–100 bar pressure)
  • Convert between units (e.g. Celsius → Fahrenheit: (temperature * 1.8) + 32)
  • Normalize or scale a sensor value

Multiple Transfer Functions can coexist on the same device, each producing its own Output Data Object.


Operations

OperationAPIDescription
Create Transfer FunctionPOST /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functionsDefine a new transformation
List Transfer FunctionsGET /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functionsList all transfer functions on a device
Get Transfer FunctionGET /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functions/{transferFunctionId}Get one transfer function by ID
Update Transfer FunctionPATCH /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functions/{transferFunctionId}Update the expression or type
Update StatusPATCH /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functions/{transferFunctionId}/statusEnable or disable without changing configuration
Delete Transfer FunctionDELETE /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functions/{transferFunctionId}Remove a transfer function (soft delete)

Create Transfer Function

POST /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functions

See Create Transfer Function for full field reference.

Response 200 OK


Update Transfer Function

PATCH /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functions/{transferFunctionId}

See Update Transfer Function for full field reference. All fields are optional — only provided fields are updated.


Update Status

PATCH /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functions/{transferFunctionId}/status

Enables or disables a Transfer Function without touching its expression or type. This is a dedicated endpoint — separate from the general Update call.


Expression Rules

The expression field defines the computation. Currently Expression is the only supported type — a single-point arithmetic expression evaluated per value update.

Variable resolution:

  • A variable in the expression refers to an existing Data Object by its name (not its dataObjectId) — e.g. temperature, voltage.
  • Exactly one variable is allowed per expression. The API validates expression syntax only; it does not verify the variable actually matches a Data Object on the device.
  • If the expression contains multiple variable names, only the first one alphabetically takes effect.
  • If the variable name does not match any Data Object reported by the device, the Transfer Function produces no output until the input becomes available or the expression is corrected.

Format constraints:

  • Must be a single line — \n, \r, U+2028, and U+2029 are not allowed.
  • At most one semicolon (;), and if present it must be the last non-whitespace character (temperature * 1.8; is valid; a;b is not).
  • A trailing ; marks the expression as an executable statement run by the Dynamic LINQ engine; without it, the expression is treated as a value expression. Both forms produce the same result — e.g. temperature * 1.8 and temperature * 1.8; are equivalent.

Data Object naming (dataObjectName):

  • The create request uses dataObjectName to define the Data Object produced by the Transfer Function. This guide refers to that result as an Output Data Object to distinguish it from the existing Data Object used as input.
  • Must be unique per device.
  • Accepted formats: camelCase, snake_case, or a single word.
  • No all-digit names or special characters.

Constraints

  • Expression is the currently available type; additional types may be added in future versions
  • Transfer Functions run in WEDA Core and evaluate as new values arrive — if the device is offline or not in Activated status, no new values are produced
  • If an input Data Object becomes unavailable, its Transfer Function stops producing new values
  • Enable/disable is available both via the general Update call (isEnabled field) and via the dedicated Update Status endpoint
  • See what Data Sources are available: Data Sources
  • Query the Output Data Objects produced by Transfer Functions: Data Objects
  • Set a threshold alert on a Data Object value: Alert Rules

Last updated on Jul-16, 2026 | Version 1.1.0