Analyzers
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
| Operation | API | Description |
|---|---|---|
| Create Analyzer | POST /api/v1/orgs/{orgId}/devices/{deviceId}/analyzers | Define a new Analyzer |
| List Analyzers | GET /api/v1/orgs/{orgId}/devices/{deviceId}/analyzers | List all Analyzers on a device |
| Get Analyzer | GET /api/v1/orgs/{orgId}/devices/{deviceId}/analyzers/{analyzerId} | Get one Analyzer by ID |
| Update Analyzer | PUT /api/v1/orgs/{orgId}/devices/{deviceId}/analyzers/{analyzerId} | Replace the Analyzer definition |
| Patch Analyzer | PATCH /api/v1/orgs/{orgId}/devices/{deviceId}/analyzers/{analyzerId} | Update select fields |
| Enable / Disable | POST /api/v1/orgs/{orgId}/devices/{deviceId}/analyzers/{analyzerId}:{action} | Start or stop the Analyzer |
| Delete Analyzer | DELETE /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 aTransferFunctionAnalyzer, exactly one output is allowed. Reference an existing (unbound) DataStream'sdataStreamIdas the output — WEDA validates it and sets that DataStream'sdataSourceto{ 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
parameterNamedeclared ininputParameters, 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
typecurrently accepts onlyTransferFunction- A
TransferFunctionAnalyzer 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
dataSourceclaim — lineage is permanent even after the producing Analyzer is deleted
Related
- See what DataStreams are available: System-Managed DataStreams
- Query the Output DataStreams produced by Analyzers: DataStreams
- Set a threshold alert on a DataStream value: Alert Policies