Skip to main content

Analyzers

Data Engine Pipeline

DataStream (managedBy: System) → Analyzer → DataStream (managedBy: User) → Alert Policy / Bridge

Overview

An Analyzer is a cloud-side computation in WEDA Core. It reads one existing DataStream as input, applies a computation, and produces an Output DataStream — stored in the database (if recordToDataLake is enabled) and queryable through the DataStreams API. This version of Analyzer is one-to-one: one input DataStream, one Output DataStream.

Analyzers are optional. Every device sensor is automatically synced into a System-managed DataStream with no configuration required (see System-Managed DataStreams); you only create an Analyzer when you need an additional, derived value on top of what's already there.

WEDA v1.1.1 ships one Analyzer type — TransferFunction:

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_c * 1.8) + 32)
  • Normalize or scale a sensor value

Operations

OperationAPIDescription
Create AnalyzerPOST /api/v1/orgs/{orgId}/devices/{deviceId}/analyzersDefine a new Analyzer
List AnalyzersGET /api/v1/orgs/{orgId}/devices/{deviceId}/analyzersList all Analyzers on a device
Get AnalyzerGET /api/v1/orgs/{orgId}/devices/{deviceId}/analyzers/{analyzerId}Get one Analyzer by ID
Update AnalyzerPUT /api/v1/orgs/{orgId}/devices/{deviceId}/analyzers/{analyzerId}Replace the Analyzer definition
Patch AnalyzerPATCH /api/v1/orgs/{orgId}/devices/{deviceId}/analyzers/{analyzerId}Update select fields
Enable / DisablePOST /api/v1/orgs/{orgId}/devices/{deviceId}/analyzers/{analyzerId}:{action}Start or stop the Analyzer
Delete AnalyzerDELETE /api/v1/orgs/{orgId}/devices/{deviceId}/analyzers/{analyzerId}Remove an Analyzer

Create Analyzer

POST /api/v1/orgs/{orgId}/devices/{deviceId}/analyzers

See Create Analyzer for full field reference. An Analyzer is created disabled (isEnabled: false) — call the enable action once you're ready for it to run.

Response 201 Created

Inputs and Outputs

  • inputParameters[] — one entry, naming a variable (parameterName) and binding it to an existing DataStream (dataStreamId). This version of Analyzer computes from a single variable. The API does not reject additional entries, but only one variable is evaluated — supply exactly one.
  • outputs[] — for a TransferFunction Analyzer, exactly one output is allowed. Reference an existing (unbound) DataStream's dataStreamId as the output — WEDA validates it and sets that DataStream's dataSource to { type: "Analyzer", sourceEntityId: <analyzerId> }. This is the entire "claim" mechanism — there is no separate claim call.

Expression Rules (config.expression, type TransferFunction)

  • A single arithmetic expression referencing the parameterName declared in inputParameters, e.g. (temperature_c * 1.8) + 32.

Enable / Disable

POST /api/v1/orgs/{orgId}/devices/{deviceId}/analyzers/{analyzerId}:{action}

action is enable or disable. An Analyzer's isEnabled is changed only through this endpoint — it is never part of the create/update/patch body.


Constraints

  • type currently accepts only TransferFunction
  • A TransferFunction Analyzer emits exactly one output (outputs[]); zero or more than one output is rejected
  • It computes from a single input variable. Additional inputParameters[] entries are accepted by the API but not evaluated, so supply exactly one
  • An Analyzer must be disabled before it can be updated or deleted
  • An Output DataStream can be claimed by at most one Analyzer — referencing a DataStream already claimed by another Analyzer's output returns 409
  • Deleting an Analyzer does not release its output DataStream's dataSource claim — lineage is permanent even after the producing Analyzer is deleted

Last updated on Aug-1, 2026 | Version 1.1.1