Update transformation docs for script profile changes & Clean-Up addons folder (#2235)

* Update transformation docs for script profile changes

Refs https://github.com/openhab/openhab-core/pull/4058.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

* Migrate actions docs from addons to configuration folder

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

* Clean-up addons docs

The removed files have not been picked up by the build process, i.e. they were not used by the website.
Looking at their content, they also seem outdated.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

* Minor enhancements

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

* Address review

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Co-authored-by: stefan-hoehn <mail@stefanhoehn.com>
pull/2257/head
Florian Hotze 2024-02-26 17:04:31 +01:00 committed by GitHub
parent c9a8344cfc
commit 3de78d17f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 39 additions and 373 deletions

View File

@ -104,18 +104,6 @@ def process_file(indir, file, outdir, source)
next
end
# Actions and transformations are currently partly in add-ons, copy the content above the list of add-ons
if line =~ /^More details regarding this and other Transformation services can be found in the individual transformation articles linked below./
out.puts ""
out.puts ":::tip"
out.puts "You can find the available transformation services [here](https://www.openhab.org/addons/#transform)."
out.puts ":::"
out.puts ""
break
end
break if line =~ /^## Installable Actions/
# Remove collapsibles in Linux install document and replace them by regular headings
next if line =~ /include collapsible/ && file =~ /linux/
line = "##### " + line if line =~ /^Apt Based Systems/ && file =~ /linux/

View File

@ -63,8 +63,6 @@ def process_main_docs(docs_source_dir)
}
puts " -> images"
FileUtils.cp_r("#{docs_source_dir}/configuration/images", "docs/configuration")
process_file("#{docs_source_dir}/addons", "actions.md", "docs/configuration", "#{$docs_repo_root}/addons/actions.md")
process_file("#{docs_source_dir}/addons", "transformations.md", "docs/configuration", "#{$docs_repo_root}/addons/transformations.md")
#process_file("#{docs_source_dir}/tutorials", "migration.md", "docs/configuration/migration", "#{$docs_repo_root}/tutorials/migration.md")
#FileUtils.mv("docs/configuration/migration/migration.md", "docs/configuration/migration/index.md")
#FileUtils.cp_r("#{docs_source_dir}/tutorials/images", "docs/configuration/migration")

View File

@ -1,94 +0,0 @@
---
layout: documentation
title: Bindings
---
# Bindings
Bindings connect your smart home's devices and technologies to openHAB.
<table id="bindings-select" class="striped">
<tbody>
<tr>
<td width="20%">
<p>
<input type="checkbox" class="filled-in" id="oh2-checkbox" checked="checked" />
<label for="oh2-checkbox"><img src="{{base}}/images/tag-since-2x.svg"></label>
</p>
</td>
<td>
<p>
Bindings developed for openHAB 2 use the openHAB APIs.
They support <a href="{{base}}/concepts/things.html">things and channels</a>, and many support automatic discovery of things.
These newer bindings can be the easiest to use.
</p>
</td>
</tr>
<tr>
<td>
<p>
<input type="checkbox" class="filled-in" id="oh1-checkbox" checked="checked" />
<label for="oh1-checkbox"><img src="{{base}}/images/tag-since-1x.svg"></label>
</p>
</td>
<td>
<p>
Most bindings developed for openHAB 1 can also be used in openHAB 2.
These bindings are connected directly to <a href="{{base}}/concepts/items.html">items</a> by editing text files.
</p>
</td>
</tr>
<tr>
<td>
<p>
<input type="checkbox" class="filled-in" id="legacy-checkbox" />
<label for="legacy-checkbox"><img src="{{base}}/images/tag-install-legacy.svg"></label>
</p>
</td>
<td>
<p>
A binding is considered legacy when another binding obsoletes it.
For many openHAB 1 bindings, there is a new openHAB 2 binding to replace it.
In order to install legacy bindings, enable "Include Legacy 1.x Bindings" through either the Paper UI or in the file <code>services/addons.cfg</code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<input type="checkbox" class="filled-in" id="manual-checkbox" />
<label for="manual-checkbox"><img src="{{base}}/images/tag-install-manual.svg"></label>
</p>
</td>
<td>
<p>
Many openHAB 1 bindings have not yet completed validation for inclusion in the distribution; however, they may indeed work properly under openHAB 2.
All openHAB 1 addons can be downloaded in a zip file <a href="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F1.9.0%2Fopenhab-1.9.0-addons.zip">(1.9.0)</a>.
We need your help testing them so that they may be easily installed in a future distribution.
Please see the <a href="{{root}}/developers/development/compatibilitylayer.html#how-to-use-openhab-1x-add-ons-that-are-not-part-of-the-distribution">compatibility layer documentation</a> and
also search the <a href="https://community.openhab.org">openHAB community forum</a> for the latest information and steps for manual installation.
</p>
</td>
</tr>
</tbody>
</table>
<table id="bindings-overview" class="bordered addon-table">
<thead>
<tr>
<th data-field="label" width="20%">Name</th>
<th data-field="description">Description</th>
</tr>
</thead>
<tbody>
{% for binding in site.addons_bindings %}
<tr class="install-{{binding.install}} since-{{binding.since}}">
<td>
<h4><a href="{{base}}{{binding.url}}">{% if binding.logo %}<img class="logo" src="{{base}}/{{binding.logo}}" title="{{ binding.label }}" alt="{{ binding.label }}" />{% else %}{{ binding.label }}{% endif %}</a></h4>
<img src="{{base}}/images/tag-since-{{binding.since}}.svg"> <img src="{{base}}/images/tag-install-{{binding.install}}.svg">
</td>
<td>{{ binding.description | markdownify }}</td>
</tr>
{% endfor %}
</tbody>
</table>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

View File

@ -1,7 +0,0 @@
---
layout: redirected
sitemap: false
redirect_to: /configuration/addons.html
---
<!-- Note to authors: This file was created in January 2021. Feel free to remove it after a few months... -->

View File

@ -1,70 +0,0 @@
---
layout: documentation
title: System Integrations
---
# System Integrations
openHAB supports services that enable integration with various technologies that don't fall into other add-on categories.
Most of the systems mentioned below are integrated via a _Misc_ add-on, installed e.g. through UI.
Detailed instructions and requirements may be found in the corresponding documentation pages.
<!-- selection not needed for now table id="ios-select" class="striped">
<tbody>
<tr>
<td width="20%">
<p>
<input type="checkbox" class="filled-in" id="manual-checkbox" />
<label for="manual-checkbox"><img src="{{base}}/images/tag-install-manual.svg"></label>
</p>
</td>
<td>
<p>
Some openHAB 1 service modules have not yet completed validation for inclusion in the distribution; however, they may indeed work properly under openHAB 2.
All openHAB 1 addons can be downloaded in a <a href="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F1.9.0%2Fopenhab-1.9.0-addons.zip">zip file</a>.
We need your help testing them so that they may be easily installed in a future distribution.
Please see the <a href="{{base}}/developers/development/compatibilitylayer.html#how-to-use-openhab-1x-add-ons-that-are-not-part-of-the-distribution">compatibility layer documentation</a> and
also search the <a href="https://community.openhab.org">openHAB community forum</a> for the latest information and steps for manual installation.
</p>
</td>
</tr>
</tbody>
</table -->
<table id="ios-overview" class="bordered addon-table">
<thead>
<tr>
<th data-field="label" width="20%">Name</th>
<th data-field="description">Description</th>
</tr>
</thead>
<tbody>
{% for io in site.addons_ios %}
<!-- <tr class="install-{{io.install}} since-{{io.since}}"> -->
<tr>
<td>
<h4><a href="{{base}}{{io.url}}">{% if io.logo %}<img class="logo" src="{{base}}/{{io.logo}}" title="{{ io.label }}" alt="{{ io.label }}" />{% else %}{{ io.label }}{% endif %}</a></h4>
<img src="{{base}}/images/tag-install-{{io.install}}.svg">
</td>
<td>{{ io.description | markdownify }}</td>
</tr>
{% endfor %}
<tr>
<td>
<h4><a href="https://www.myopenhab.org/" target="_blank"><img class="logo" src="{{base}}/images/addons/ifttt.png" title="IFTTT" alt="IFTTT" /></a></h4>
</td>
<td>
<p>
Activating <a href="https://ifttt.com" target="_blank">IFTTT</a> integration is easy.
Just log in to your IFTTT account and activate the openHAB channel.
You will be forwarded to the <a href="https://www.myopenhab.org/" target="_blank">myopenHAB website</a> to authorize the IFTTT channel connection.
Before you start creating IFTTT recipes you need to make sure that you have your runtime configured to expose certain items to myopenHAB.
Only those items will be visible to IFTTT.
You will also be able to send commands to those items from IFTTT Applets.
Items will appear in myopenHAB and thus in IFTTT only after at least one state update has been received by myopenHAB from your runtime.
</p>
</td>
</tr>
</tbody>
</table>

View File

@ -1,50 +0,0 @@
---
layout: documentation
title: Persistence Services
---
# Persistence Services
Persistence services enable the storage of item states over time.
<table id="persistence-select" class="striped">
<tbody>
<tr>
<td width="20%">
<p>
<input type="checkbox" class="filled-in" id="manual-checkbox" />
<label for="manual-checkbox"><img src="{{base}}/images/tag-install-manual.svg"></label>
</p>
</td>
<td>
<p>
Some openHAB 1 persistence services have not yet completed validation for inclusion in the distribution; however, they may indeed work properly under openHAB 2.
All openHAB 1 add-ons can be downloaded in a <a href="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F1.9.0%2Fopenhab-1.9.0-addons.zip">zip file</a>.
We need your help testing them so that they may be easily installed in a future distribution.
Please see the <a href="{{base}}/developers/development/compatibilitylayer.html#how-to-use-openhab-1x-add-ons-that-are-not-part-of-the-distribution">compatibility layer documentation</a> and
also search the <a href="https://community.openhab.org">openHAB community forum</a> for the latest information and steps for manual installation.
</p>
</td>
</tr>
</tbody>
</table>
<table id="persistence-overview" class="bordered addon-table">
<thead>
<tr>
<th data-field="label" width="20%">Name</th>
<th data-field="description">Description</th>
</tr>
</thead>
<tbody>
{% for persistence in site.addons_persistences %}
<tr class="install-{{persistence.install}} since-{{persistence.since}}">
<td>
<h4><a href="{{base}}{{persistence.url}}">{% if persistence.logo %}<img class="logo" src="{{base}}/{{persistence.logo}}" title="{{ persistence.label }}" alt="{{ persistence.label }}" />{% else %}{{ persistence.label }}{% endif %}</a></h4>
<img src="{{base}}/images/tag-since-{{persistence.since}}.svg"> <img src="{{base}}/images/tag-install-{{persistence.install}}.svg">
</td>
<td>{{ persistence.description | markdownify }}</td>
</tr>
{% endfor %}
</tbody>
</table>

View File

@ -1,7 +0,0 @@
---
layout: redirected
sitemap: false
redirect_to: /configuration/editors.html
---
<!-- Note to authors: This file was created in January 2021. Feel free to remove it after a few months... -->

View File

@ -1,11 +0,0 @@
---
layout: documentation
title: Voice Services
---
# Available Voice Services
| Voice Service | Description |
|---------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| {% for voice in site.addons_voices %} | [{% if voice.logo %}<img class="logo" src="{{base}}/{{voice.logo}}" title="{{ voice.label }}" alt="{{ voice.label }}" />{% else %}{{ voice.label }}{% endif %}]({{base}}{{ voice.url }}) |
{% endfor %}

View File

@ -386,7 +386,8 @@ We recommend placing these custom files somewhere inside your `$OH_CONF` folder,
#### Localization
Ephemeris supports translation of holidays into many languages. Localization support files can be found in the [GitHub repo](https://github.com/focus-shift/jollyday/tree/main/jollyday-core/src/main/resources/descriptions). Currently these language supports are available:
Ephemeris supports translation of holidays into many languages. Localization support files can be found in the [GitHub repo](https://github.com/focus-shift/jollyday/tree/main/jollyday-core/src/main/resources/descriptions).
Currently, these language supports are available:
1. [Dutch](https://github.com/focus-shift/jollyday/tree/main/jollyday-core/src/main/resources/descriptions/holiday_descriptions_nl.properties)
1. [English](https://github.com/focus-shift/jollyday/tree/main/jollyday-core/src/main/resources/descriptions/holiday_descriptions.properties)
@ -396,56 +397,10 @@ Ephemeris supports translation of holidays into many languages. Localization sup
1. [Portuguese](https://github.com/focus-shift/jollyday/tree/main/jollyday-core/src/main/resources/descriptions/holiday_descriptions_pt.properties)
1. [Swedish](https://github.com/focus-shift/jollyday/tree/main/jollyday-core/src/main/resources/descriptions/holiday_descriptions_sv.properties)
Feel free to extent this list by providing additional language support files.
Feel free to extend this list by providing additional language support files.
To enable localization,
To enable localization:
- copy the file for your language to your OH setup.
- again a folder in `$OH_CONF` folder, such as `$OH_CONF/services` is proposed.
- use function 'Ephemeris.getHolidayDescription' to convert the name according to your localization file.
## Installable Actions
The following actions are available as installable add-ons.
<table id="actions-select" class="striped">
<tbody>
<tr>
<td width="20%">
<p>
<input type="checkbox" class="filled-in" id="manual-checkbox" />
<label for="manual-checkbox"><img src="{{base}}/images/tag-install-manual.svg"></label>
</p>
</td>
<td>
<p>
Some openHAB 1 actions have not yet completed validation for inclusion in the distribution; however, they may indeed work properly under openHAB 2.
All openHAB 1 addons can be downloaded in a <a href="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F1.9.0%2Fopenhab-1.9.0-addons.zip">zip file</a>.
We need your help testing them so that they may be easily installed in a future distribution.
Please see the <a href="{{base}}/developers/development/compatibilitylayer.html#how-to-use-openhab-1x-add-ons-that-are-not-part-of-the-distribution">compatibility layer documentation</a> and
also search the <a href="https://community.openhab.org">openHAB community forum</a> for the latest information and steps for manual installation.
</p>
</td>
</tr>
</tbody>
</table>
<table id="actions-overview" class="bordered addon-table">
<thead>
<tr>
<th data-field="label" width="20%">Name</th>
<th data-field="description">Description</th>
</tr>
</thead>
<tbody>
{% for action in site.addons_actions %}
<tr class="install-{{action.install}} since-{{action.since}}">
<td>
<h4><a href="{{base}}{{action.url}}">{% if action.logo %}<img class="logo" src="{{base}}/{{action.logo}}" title="{{ action.label }}" alt="{{ action.label }}" />{% else %}{{ action.label }}{% endif %}</a></h4>
<img src="{{base}}/images/tag-since-{{action.since}}.svg"> <img src="{{base}}/images/tag-install-{{action.install}}.svg">
</td>
<td>{{ action.description | markdownify }}</td>
</tr>
{% endfor %}
</tbody>
</table>
- Copy the file for your language to your OH setup.
- A folder in `$OH_CONF` folder, such as `$OH_CONF/services` is proposed.
- Use the function `Ephemeris.getHolidayDescription` to convert the name according to your localization file.

View File

@ -711,27 +711,27 @@ There are some built-in Profiles available which are described in the table belo
Some Bindings may offer additional Profiles for Binding-specific use cases.
If this is the case, you will find those within the documentation of the Binding.
| Profile ID | Type | Supported Item Types | Description |
| --------------------------------------------------------------------------------------------- | ------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `default` | State | All | If you don't specify any Profile, this Profile will be used. For State Channels, this means that states and commands are just propagated from the Channel to the Item and vice versa without any changes. For Trigger Channels, the Default Profile won't change anything on the Item. |
| `follow` | State | All | If one device should "follow" the actions of another device, this can be used. The term "follow" in this case means that any state that is sent to an Item will be forwarded from this Item to any linked Channel with the `follow` Profile. It takes state updates on an Item and sends them as a command onto the Channel. In the direction from the ThingHandler towards the Item, this Profile ignores state updates. |
| `hysteresis` | State | Switch | The `hysteresis` Profile can be configured via three parameters: `lower` (**mandatory**) `QuantityType` or `DecimalType`, `upper` (optional) `QuantityType` or `DecimalType`, `inverted` (optional) `boolean`. This Profile can be used to trigger alarms when number values exceed a given `lower` bound - sends `ON` to the Switch Item. By defining an additional `upper` bound it can provide kind of anti-flapping. The `inverted` parameter negates the resulting State of the Switch. |
| `offset` | State | Number | An offset can be specified via the parameter `offset` which has to be a `QuantityType` or `DecimalType`. The specified offset will be applied to the value from the device before it arrives at the Item. |
| `range` | State | Switch | The `range` Profile can be used to trigger alarms when number values exceed given limits (`lower` and `upper` bounds). It sends ON to a Switch Item. There are three parameters: `lower` and `upper` (**mandatory**) `QuantityType` or `DecimalType` and `inverted` (optional) `boolean`. |
| `timestamp-change` | State | DateTime | This Profile will update a DateTime Item to track every change of the state of a given Channel. |
| `timestamp-offset` | State | DateTime | This Profile can be specified via the parameter `offset` (in seconds) which has to be a `DecimalType`. The specified offset will be applied to the date time before it is passed to the Item. Additionally it allows to modify the timezone by setting the parameter of the same name (e.g. "Europe / Berlin"). |
| `timestamp-update` | State | DateTime | This Profile will update a DateTime Item to track every update of the state of a given Channel, whatever the state is. |
| `rawbutton-on-off-switch` | Trigger | Color, Dimmer, Switch | This Profile can only be used on Channels of the type `system.rawbutton`. On those Channels, it will set the Item state to `ON` when a `PRESSED` event arrives and to `OFF` when a `RELEASED` event arrives. |
| `rawbutton-toggle-player` | Trigger | Player | This Profile can only be used on Channels of the type `system.rawbutton`. On those Channels, it will toggle the Player Item state between `PLAY` and `PAUSE` when `PRESSED` events arrive. |
| `rawbutton-toggle-rollershutter` | Trigger | Rollershutter | This Profile can only be used on Channels of the type `system.rawbutton`. On those Channels, it will toggle the Rollershutter Item state between `UP` and `DOWN` when `PRESSED` events arrive. |
| `rawbutton-toggle-switch` | Trigger | Color, Dimmer, Switch | This Profile can only be used on Channels of the type `system.rawbutton`. On those Channels, it will toggle the Item state when `PRESSED` events arrive. This Profile can e.g. be used to add button channels to a lighting item which will enable you to turn the lighting on and off with your button. |
| `rawrocker-to-on-off` | Trigger | Dimmer, Switch | This Profile can only be used on Channels of the type `system.rawrocker`. On those Channels, it will convert a press on the first rocker button to an `ON` command while the second one will be converted to an `OFF` command. |
| `rawrocker-to-dimmer` | Trigger | Dimmer | Same as `rawrocker-to-on-off`, but additionally it allows to dim by holding the respective button. Technically, this Profile sends an `INCREASE` or `DECREASE` Command every 500 milliseconds while you hold. |
| `rawrocker-to-play-pause`, `rawrocker-to-next-previous` and `rawrocker-to-rewind-fastforward` | Trigger | Player | These Profiles can only be used on Channels of the type `system.rawrocker` and Player Items. They will convert a press on the first rocker button to an `PLAY` / `NEXT` / `FASTFORWARD` command while the second one will be converted to an `PAUSE` / `PREVIOUS` / `REWIND` command. |
| `rawrocker-to-stop-move` and `rawrocker-to-up-down` | Trigger | Rollershutter | These Profiles can only be used on Channels of the type `system.rawrocker` and Rollershutter Items. They will convert a press on the first rocker button to an `MOVE` / `UP` command while the second one will be converted to an `STOP` / `DOWN` command. |
| `timestamp-trigger` | Trigger | DateTime | This Profile can be used to link a trigger Channel to a DateTime Item and will update it every time the Channel triggers an event, whatever the event is. |
| `trigger-event-string` | Trigger | String | This Profile can be used to link a trigger channel to a String item. The item's state will be updated to the string representation of the triggering event (e.g. `PRESSED`). |
| `transform:<SERVICE>` | State | All | Transformation Profiles can be used to transform the item state (instead of only transforming it in the [Sitemap]({{base}}/ui/sitemaps.html)) using the specified transformation service. You can find the documentation of these Profiles within the [documentation of the Transformation Service](/addons/#transform). E.g. [map](addons/transformations/map/#usage-as-a-profile) or [jsonpath](addons/transformations/jsonpath/#usage-as-a-profile) |
| Profile ID | Type | Supported Item Types | Description |
|-----------------------------------------------------------------------------------------------|---------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `default` | State | All | If you don't specify any Profile, this Profile will be used. For State Channels, this means that states and commands are just propagated from the Channel to the Item and vice versa without any changes. For Trigger Channels, the Default Profile won't change anything on the Item. |
| `follow` | State | All | If one device should "follow" the actions of another device, this can be used. The term "follow" in this case means that any state that is sent to an Item will be forwarded from this Item to any linked Channel with the `follow` Profile. It takes state updates on an Item and sends them as a command onto the Channel. In the direction from the ThingHandler towards the Item, this Profile ignores state updates. |
| `hysteresis` | State | Switch | The `hysteresis` Profile can be configured via three parameters: `lower` (**mandatory**) `QuantityType` or `DecimalType`, `upper` (optional) `QuantityType` or `DecimalType`, `inverted` (optional) `boolean`. This Profile can be used to trigger alarms when number values exceed a given `lower` bound - sends `ON` to the Switch Item. By defining an additional `upper` bound it can provide kind of anti-flapping. The `inverted` parameter negates the resulting State of the Switch. |
| `offset` | State | Number | An offset can be specified via the parameter `offset` which has to be a `QuantityType` or `DecimalType`. The specified offset will be applied to the value from the device before it arrives at the Item. |
| `range` | State | Switch | The `range` Profile can be used to trigger alarms when number values exceed given limits (`lower` and `upper` bounds). It sends ON to a Switch Item. There are three parameters: `lower` and `upper` (**mandatory**) `QuantityType` or `DecimalType` and `inverted` (optional) `boolean`. |
| `timestamp-change` | State | DateTime | This Profile will update a DateTime Item to track every change of the state of a given Channel. |
| `timestamp-offset` | State | DateTime | This Profile can be specified via the parameter `offset` (in seconds) which has to be a `DecimalType`. The specified offset will be applied to the date time before it is passed to the Item. Additionally it allows to modify the timezone by setting the parameter of the same name (e.g. "Europe / Berlin"). |
| `timestamp-update` | State | DateTime | This Profile will update a DateTime Item to track every update of the state of a given Channel, whatever the state is. |
| `rawbutton-on-off-switch` | Trigger | Color, Dimmer, Switch | This Profile can only be used on Channels of the type `system.rawbutton`. On those Channels, it will set the Item state to `ON` when a `PRESSED` event arrives and to `OFF` when a `RELEASED` event arrives. |
| `rawbutton-toggle-player` | Trigger | Player | This Profile can only be used on Channels of the type `system.rawbutton`. On those Channels, it will toggle the Player Item state between `PLAY` and `PAUSE` when `PRESSED` events arrive. |
| `rawbutton-toggle-rollershutter` | Trigger | Rollershutter | This Profile can only be used on Channels of the type `system.rawbutton`. On those Channels, it will toggle the Rollershutter Item state between `UP` and `DOWN` when `PRESSED` events arrive. |
| `rawbutton-toggle-switch` | Trigger | Color, Dimmer, Switch | This Profile can only be used on Channels of the type `system.rawbutton`. On those Channels, it will toggle the Item state when `PRESSED` events arrive. This Profile can e.g. be used to add button channels to a lighting item which will enable you to turn the lighting on and off with your button. |
| `rawrocker-to-on-off` | Trigger | Dimmer, Switch | This Profile can only be used on Channels of the type `system.rawrocker`. On those Channels, it will convert a press on the first rocker button to an `ON` command while the second one will be converted to an `OFF` command. |
| `rawrocker-to-dimmer` | Trigger | Dimmer | Same as `rawrocker-to-on-off`, but additionally it allows to dim by holding the respective button. Technically, this Profile sends an `INCREASE` or `DECREASE` Command every 500 milliseconds while you hold. |
| `rawrocker-to-play-pause`, `rawrocker-to-next-previous` and `rawrocker-to-rewind-fastforward` | Trigger | Player | These Profiles can only be used on Channels of the type `system.rawrocker` and Player Items. They will convert a press on the first rocker button to an `PLAY` / `NEXT` / `FASTFORWARD` command while the second one will be converted to an `PAUSE` / `PREVIOUS` / `REWIND` command. |
| `rawrocker-to-stop-move` and `rawrocker-to-up-down` | Trigger | Rollershutter | These Profiles can only be used on Channels of the type `system.rawrocker` and Rollershutter Items. They will convert a press on the first rocker button to an `MOVE` / `UP` command while the second one will be converted to an `STOP` / `DOWN` command. |
| `timestamp-trigger` | Trigger | DateTime | This Profile can be used to link a trigger Channel to a DateTime Item and will update it every time the Channel triggers an event, whatever the event is. |
| `trigger-event-string` | Trigger | String | This Profile can be used to link a trigger channel to a String item. The item's state will be updated to the string representation of the triggering event (e.g. `PRESSED`). |
| `transform:<SERVICE>` | State | All | Transformation Profiles can be used to transform the item state using the specified transformation service at channel-link level instead of only transforming the visual representation. You can find the documentation of these profiles within the [transformations docs](/docs/configuration/transformations.html) for script transformations or in the [add-on docs](/addons/#transform) for transformation add-ons, e.g. [Map](/addons/transformations/map/#usage-as-a-profile) or [JsonPath](/addons/transformations/jsonpath/#usage-as-a-profile) |
##### Implicit Profiles

View File

@ -1,17 +0,0 @@
---
layout: documentation
title: Transformations Configuration
---
# Transformations Configuration
Transformations are used to translate data from a cluttered or technical raw value to a processed or human-readable representation.
They are often useful, to **interpret received Item values**, like sensor readings or state variables, and to translate them into a human-readable or better processable format.
Details about the usage of Transformations and the available Transformation services can be found in the [main Transformation services article](/addons/#transform).
Be aware that a transformation service just as any other openHAB add-on needs to be installed prior to first usage.
The configuration folder `$OPENHAB_CONF/transform` is home for Transformation service files.
Those files contain service specific data or logic and their syntax depends on the Transformation service.
Some but not all Transformation services rely on such additional files.

View File

@ -185,51 +185,32 @@ The script transformation is also available as profile. When acting as transform
#### Script Transformation Profile Configurations
| Parameter Name | Description |
| ----------------- | ------------------------------------------------------------------------------------------ |
| `toItemScript` | The `script identifier` for performing transformations from the Thing handler to the item. |
| `toHandlerScript` | The `script identifier` for performing transformations from the item to the Thing handler. |
| Parameter Name | Description |
|-------------------------|-----------------------------------------------------------------------------------------------------------------|
| `toItemScript` | The `script identifier` for performing transformations from the Thing handler to the item. |
| `commandFromItemScript` | The `script identifier` for performing transformations of **commands** from the item to the Thing handler. |
| `stateFromItemScript` | The `script identifier` for performing transformations of **state updates** from the item to the Thing handler. |
Example usage in an `.items` file:
```xtend
Number <itemName> { channel="<channelUID>"[profile="transform:JS", toItemScript="decode_json.js", toHandlerScript="encode_json.js" ] }
Number <itemName> { channel="<channelUID>"[profile="transform:JS", toItemScript="decode_json.js", commandFromItemScript="encode_json.js" ] }
```
Here, additional parameters can also be injected into the script using the URL style syntax, e.g.:
```xtend
Number <itemName> { channel="<channelUID>"[profile="transform:RB", toItemScript="multiply.rb?factor=10", toHandlerScript="multiply.rb?factor=0.1" ] }
Number <itemName> { channel="<channelUID>"[profile="transform:RB", toItemScript="multiply.rb?factor=10", commandFromItemScript="multiply.rb?factor=0.1" ] }
```
Inline script is also supported in the profile syntax.
```xtend
Number <itemName> { channel="<channelUID>"[profile="transform:RB", toItemScript="| input.to_f * 10", toHandlerScript="| input.to_f * 0.1" ] }
Number <itemName> { channel="<channelUID>"[profile="transform:RB", toItemScript="| input.to_f * 10", commandFromItemScript="| input.to_f * 0.1" ] }
```
More details regarding this and other Transformation services can be found in the individual transformation articles linked below.
::: tip
## Available Transformations
You can find the available transformation services [here]({{base}}/adddons/#transform).
Be aware that a transformation service just as any other openHAB add-on needs to be installed prior to first usage.
<table id="transformations-overview" class="bordered addon-table">
<thead>
<tr>
<th data-field="label" width="20%">Name</th>
<th data-field="description">Description</th>
</tr>
</thead>
<tbody>
{% for transformation in site.addons_transformations %}
<tr class="install-{{transformation.install}} since-{{transformation.since}}">
<td>
<h4><a href="{{base}}{{transformation.url}}">{% if transformation.logo %}<img class="logo" src="{{base}}/{{transformation.logo}}" title="{{ transformation.label }}" alt="{{ transformation.label }}" />{% else %}{{ transformation.label }}{% endif %}</a></h4>
<img src="{{base}}/images/tag-install-{{transformation.install}}.svg">
</td>
<td>{{ transformation.description | markdownify }}</td>
</tr>
{% endfor %}
</tbody>
</table>
:::