diff --git a/_addons_bindings/energidataservice/readme.md b/_addons_bindings/energidataservice/readme.md index 06059f92d..6f1b3828f 100644 --- a/_addons_bindings/energidataservice/readme.md +++ b/_addons_bindings/energidataservice/readme.md @@ -185,6 +185,14 @@ A persistence configuration is required for this channel. Please note that the CO₂ emission channels only apply to Denmark. These channels will not be updated when the configured price area is not DK1 or DK2. +#### Trigger Channels + +Advanced channel `event` can trigger the following events: + +| Event | Description | +|----------------------|--------------------------------| +| DAY_AHEAD_AVAILABLE | Day-ahead prices are available | + ## Thing Actions Thing actions can be used to perform calculations as well as import prices directly into rules without relying on persistence. @@ -576,3 +584,36 @@ console.log("Spot price two hours from now: " + price); ::: :::: + +### Trigger Channel Example + +:::: tabs + +::: tab DSL + +```javascript +rule "Day-ahead event" +when + Channel 'energidataservice:service:energidataservice:electricity#event' triggered 'DAY_AHEAD_AVAILABLE' +then + logInfo("Day-ahead", "Day-ahead prices for the next day are now available") +end +``` + +::: + +::: tab JavaScript + +```javascript +rules.when() + .channel('energidataservice:service:energidataservice:electricity#event').triggered('DAY_AHEAD_AVAILABLE') + .then(event => + { + console.log('Day-ahead prices for the next day are now available'); + }) + .build("Day-ahead event"); +``` + +::: + +:::: diff --git a/_addons_bindings/serial/readme.md b/_addons_bindings/serial/readme.md index 0869a5176..46a2700b3 100644 --- a/_addons_bindings/serial/readme.md +++ b/_addons_bindings/serial/readme.md @@ -69,9 +69,9 @@ The configuration for the `serialBridge` consists of the following parameters: The configuration for the `serialDevice` consists of the following parameters: -| Parameter | Description | -| ------------ | ----------------------------------------------------------------------------------------------------- | -| patternMatch | Regular expression used to identify device from received data (must match the whole line) (mandatory) | +| Parameter | Description | +| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| patternMatch | Regular expression used to identify device from received data (must match the whole line). Use .* when having only one device attached. (mandatory)| ## Channels diff --git a/_addons_bindings/smaenergymeter/readme.md b/_addons_bindings/smaenergymeter/readme.md index 506c63076..d03d8be0d 100644 --- a/_addons_bindings/smaenergymeter/readme.md +++ b/_addons_bindings/smaenergymeter/readme.md @@ -35,6 +35,15 @@ No binding configuration required. Usually no manual configuration is required, as the multicast IP address and the port remain on their factory set values. Optionally, a refresh interval (in seconds) can be defined. +| Parameter | Name | Description | Required | Default | +|------------------|-----------------|---------------------------------------|----------|-----------------| +| `serialNumber` | Serial number | Serial number of a meter. | yes | | +| `mcastGroup` | Multicast Group | Multicast group used by meter. | yes | 239.12.255.254 | +| `port` | Port | Port number used by meter. | no | 9522 | +| `pollingPeriod` | Polling Period | Polling period used to readout meter. | no | 30 | + +The polling period parameter is used to trigger readout of meter. In case if two consecutive readout attempts fail thing will report offline status. + ## Channels | Channel | Description | diff --git a/_addons_transformations/exec/readme.md b/_addons_transformations/exec/readme.md index 945dd7d5d..ec402bdcb 100644 --- a/_addons_transformations/exec/readme.md +++ b/_addons_transformations/exec/readme.md @@ -20,6 +20,10 @@ Transforms an input string with an external program. Executes an external program and returns the output as a string. In the given command line the placeholder `%s` is substituted with the input value. +The provided command line is split on spaces before it is passed to the shell. +Using single quotes (`'`) splitting can be avoided (e.g. `'%s'` would prevent splitting on spaces within the input value). +The surrounding single quotes are removed. + The external program must either be in the executable search path of the server process, or an absolute path has to be used. For security reasons all commands need to be whitelisted. @@ -38,7 +42,7 @@ numfmt --to=iec-i --suffix=B --padding=7 %s ### General Setup -**Item** +#### Item This will replace the visible label in the UI with the transformation you apply with the command . @@ -46,7 +50,7 @@ This will replace the visible label in the UI with the transformation you apply String yourItem "Some info [EXEC(/absolute/path/to/your/ %s):%s]" ``` -**Rule** +#### Rule ```java rule "Your Rule Name" @@ -68,7 +72,7 @@ Substitute the `/absolute/path/to/your/` with When the input argument for `%s` is `fri` the execution returns a string with the last weekday of the month, formated as readable text. -``` +```shell Fri 31 Mar 2017 13:58:47 IST` ``` @@ -99,9 +103,7 @@ If omitted the default is `%s`, so the input value will be put into the transfor Please note: This profile is a one-way transformation, i.e. only values from a device towards the item are changed, the other direction is left untouched. -# Further Reading +## Further Reading * [Manual](http://man7.org/linux/man-pages/man1/date.1.html) and [tutorial](https://linode.com/docs/tools-reference/tools/use-the-date-command-in-linux/) for date. * [Manual](http://man7.org/linux/man-pages/man1/numfmt.1.html) and [tutorial](https://www.pixelbeat.org/docs/numfmt.html) for numfmt. - - diff --git a/_thing_types/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-groups.xml b/_thing_types/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-groups.xml index add4ee51c..8786dcd08 100644 --- a/_thing_types/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-groups.xml +++ b/_thing_types/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-groups.xml @@ -40,6 +40,7 @@ Near up-to-date history for CO₂ emission from electricity consumed in Denmark in g/kWh. + diff --git a/_thing_types/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-types.xml b/_thing_types/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-types.xml index 1509d177d..92822b28b 100644 --- a/_thing_types/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-types.xml +++ b/_thing_types/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-types.xml @@ -29,4 +29,15 @@ + + trigger + + Event triggered + + + + + + + diff --git a/_thing_types/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/thing-service.xml b/_thing_types/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/thing-service.xml index fca5f24f6..fd893596b 100644 --- a/_thing_types/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/thing-service.xml +++ b/_thing_types/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/thing-service.xml @@ -14,7 +14,7 @@ - 5 + 6 diff --git a/_thing_types/org.openhab.binding.smaenergymeter/src/main/resources/OH-INF/thing/energyMeter.xml b/_thing_types/org.openhab.binding.smaenergymeter/src/main/resources/OH-INF/thing/energyMeter.xml index 8bf381bee..2aea72349 100644 --- a/_thing_types/org.openhab.binding.smaenergymeter/src/main/resources/OH-INF/thing/energyMeter.xml +++ b/_thing_types/org.openhab.binding.smaenergymeter/src/main/resources/OH-INF/thing/energyMeter.xml @@ -32,6 +32,10 @@ + + + Identifier of meter + IP address of the multicast group