Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a link to the transformation add-ons page #2351

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions configuration/transformations.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ They are often useful, to **interpret received Item values**, like sensor readin
- Processing of a raw Item value, e.g., Parsing a number from a JSON string, like `{ "temperature": 23.2 }`
- Conversion of sensor readings, e.g., temperature in degree Celsius can be converted to degree Fahrenheit

## Installation

Transformations are performed by Transformation Services which are available as [transformation add-ons](/addons/#transform).
The relevant add-on needs to be installed via the Main UI or addons.cfg before use.

## Usage

Transformations are applicable in Item and Sitemap element labels and inside DSL rules.
The relevant transformation service needs to be installed via the Main UI or addons.cfg before use.
Be aware, that some Transformation services rely on transformation files, while others work by directly providing the transformation logic.
Some Transformation services rely on transformation files, while others work by directly providing the transformation logic.
Transformation files need to be placed in the directory `$OPENHAB_CONF/transform`.

1. Item and Sitemap Labels
Expand All @@ -37,7 +41,7 @@ Transformation files need to be placed in the directory `$OPENHAB_CONF/transform

Usage of Transformations in the [label parameter of Sitemap elements]({{base}}/ui/sitemaps.html#element-type-text) works the same way.

1. Rules
2. Rules

Transformations can also be [used in rules]({{base}}/configuration/rules-dsl.html#transformations) to transform/translate/convert data.
The following shows three examples:
Expand All @@ -48,12 +52,12 @@ Transformation files need to be placed in the directory `$OPENHAB_CONF/transform
var fahrenheit = transform("JS", "convert-C-to-F.js", temperature)
```

1. Bindings
3. Bindings

Transformations can sometimes be used in binding add-ons. For example, transforming an openHAB ON command into "action=powerup" for sending to a device.
If, and how, this use may be available is described in individual binding documentation.

1. Profiles
4. Profiles

Transformations can be associated with channels, working on data being passed between bindings and Items. See [profile documentation]({{base}}/configuration/items.html#profiles) for more detail.

Expand Down