Added documatation abput Hysteresis Profile (#1332)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>pull/1335/head
parent
b627af994b
commit
01c2a2d0c0
|
@ -661,7 +661,8 @@ Without the quotes, the state would be the system type `UNDEF`.
|
|||
|
||||
#### Profiles
|
||||
|
||||
With Profiles, you're able to change the behavior how Channels interact with your Items. You can use *State Profiles* on State Channels and *Trigger Profiles* on Trigger Channels.
|
||||
With Profiles, you are able to change the behavior how Channels interact with your Items.
|
||||
You can use *State Profiles* on State Channels and *Trigger Profiles* on Trigger Channels.
|
||||
|
||||
Profiles can be specified as a parameter for a given Channel on the Item configuration:
|
||||
|
||||
|
@ -672,32 +673,37 @@ Profiles can be specified as a parameter for a given Channel on the Item configu
|
|||
There are some built-in Profiles available which are described in the table below.
|
||||
|
||||
Some Bindings will may offer additional Profiles for Binding-specific use cases.
|
||||
If this is the case, you'll find those within the documentation of the Binding.
|
||||
If this is the case, you will find those within the documentation of the Binding.
|
||||
|
||||
Also, all [Transformation Services](/addons/#transform) provide a State Profile which allows you to do the transformation already on item-level instead doing it with a [Sitemap]({{base}}/configuration/sitemaps.html).
|
||||
You can find the documentation of these Profiles within the [Add-On documentation of the Transformation Service](/addons/#transform) you'd like to use.
|
||||
You can find the documentation of these Profiles within the [Add-On documentation of the Transformation Service](/addons/#transform) you would like to use.
|
||||
|
||||
| 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. |
|
||||
| `offset` | State | Number | An offset can be specified via the parameter `offset` which has to be a `QuantityType` or `DecimalType`. The specificed offset will be added to the value from the device before it arrives at the item. |
|
||||
| `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-update` | State | All | This profile will update a DateTime Item to track every update of the state of a given channel, whatever the state is. |
|
||||
| `timestamp-change` | State | All | This profile will update a DateTime Item to track every change of the state of a given channel. |
|
||||
| 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 specificed offset will be applied to the value from the device before it arrives at the Item. |
|
||||
| `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-update` | State | All | This Profile will update a DateTime Item to track every update of the state of a given Channel, whatever the state is. |
|
||||
| `timestamp-change` | State | All | This Profile will update a DateTime Item to track every change of the state of a given Channel. |
|
||||
|
||||
##### Example 1
|
||||
|
||||
You have an Item called `Bedroom_Light` that is connected to a Hue lamp
|
||||
|
||||
Example: You have an Item called `Bedroom_Light` that is connected to a Hue lamp
|
||||
```java
|
||||
Color Bedroom_Light { channel="hue:0210:1:bulb1:color" }
|
||||
```
|
||||
and a [Rule]({{base}}/configuration/rules-dsl.html) to toggle this light with a serial button:
|
||||
|
||||
```java
|
||||
when
|
||||
Channel "serialbutton:button:mybutton:button" triggered PRESSED
|
||||
|
@ -715,4 +721,19 @@ Instead of using this Rule, you can also use the `rawbutton-toggle-switch` Profi
|
|||
Color Bedroom_Light { channel="hue:0210:1:bulb1:color", channel="serialbutton:button:mybutton:button" [profile="rawbutton-toggle-switch"] }
|
||||
```
|
||||
|
||||
This will make your Rule obsolete. So with Profiles, you can significantly reduce the amount of Rules you need for your Smart Home which helps you to keep your configuration short and clear.
|
||||
This will make your Rule obsolete.
|
||||
So with Profiles, you can significantly reduce the amount of Rules you need for your Smart Home which helps you to keep your configuration short and clear.
|
||||
|
||||
##### Example 2
|
||||
|
||||
```java
|
||||
Number:Temperature Outdoor_Temperature { channel="openweathermap:weather-and-forecast:api:local:current#temperature" }
|
||||
// Triggers a temperature high alarm (Switch = ON) as of 30 °c and stays ON until temperature drops below 29 °C
|
||||
Switch Outdoor_Temperature_High_Alert { channel="openweathermap:weather-and-forecast:api:local:current#temperature" [profile="hysteresis", lower="29 °C", upper="30 °C"] }
|
||||
// Temperture low alert below 0 °C
|
||||
Switch Outdoor_Temperature_Low_Alert { channel="openweathermap:weather-and-forecast:api:local:current#temperature" [profile="hysteresis", lower="0 °C", inverted=true] }
|
||||
|
||||
// Indicates a battery low alarm if battery level drops below 15
|
||||
Number Battery_Level { channel="serialbutton:button:mybutton:battery-level" }
|
||||
Switch Low_Battery { channel="serialbutton:button:mybutton:battery-level", [profile="hysteresis", lower=15, inverted=true] }
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue