Transfer Functions
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 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
| Operation | API | Description |
|---|---|---|
| Create Transfer Function | POST /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functions | Define a new transformation |
| List Transfer Functions | GET /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functions | List all transfer functions on a device |
| Get Transfer Function | GET /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functions/{transferFunctionId} | Get one transfer function by ID |
| Update Transfer Function | PATCH /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functions/{transferFunctionId} | Update the expression or type |
| Update Status | PATCH /api/v1/devices/{deviceId}/inputs/data-objects/transfer-functions/{transferFunctionId}/status | Enable or disable without changing configuration |
| Delete Transfer Function | DELETE /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 itsdataObjectId) — 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;bis 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.8andtemperature * 1.8;are equivalent.
Data Object naming (dataObjectName):
- The create request uses
dataObjectNameto 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
Expressionis the currently availabletype; 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
Activatedstatus, 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 (
isEnabledfield) and via the dedicated Update Status endpoint
Related
- 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