Updated external content (Jenkins build 2129)
parent
8acb9a3e99
commit
ac50fa46e6
|
@ -185,6 +185,14 @@ A persistence configuration is required for this channel.
|
||||||
Please note that the CO₂ emission channels only apply to Denmark.
|
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.
|
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
|
||||||
|
|
||||||
Thing actions can be used to perform calculations as well as import prices directly into rules without relying on persistence.
|
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");
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
::::
|
||||||
|
|
|
@ -70,8 +70,8 @@ The configuration for the `serialBridge` consists of the following parameters:
|
||||||
The configuration for the `serialDevice` consists of the following parameters:
|
The configuration for the `serialDevice` consists of the following parameters:
|
||||||
|
|
||||||
| Parameter | Description |
|
| Parameter | Description |
|
||||||
| ------------ | ----------------------------------------------------------------------------------------------------- |
|
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| patternMatch | Regular expression used to identify device from received data (must match the whole line) (mandatory) |
|
| patternMatch | Regular expression used to identify device from received data (must match the whole line). Use .* when having only one device attached. (mandatory)|
|
||||||
|
|
||||||
## Channels
|
## Channels
|
||||||
|
|
||||||
|
|
|
@ -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.
|
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.
|
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
|
## Channels
|
||||||
|
|
||||||
| Channel | Description |
|
| Channel | Description |
|
||||||
|
|
|
@ -20,6 +20,10 @@ Transforms an input string with an external program.
|
||||||
Executes an external program and returns the output as a string.
|
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.
|
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.
|
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.
|
For security reasons all commands need to be whitelisted.
|
||||||
|
@ -38,7 +42,7 @@ numfmt --to=iec-i --suffix=B --padding=7 %s
|
||||||
|
|
||||||
### General Setup
|
### General Setup
|
||||||
|
|
||||||
**Item**
|
#### Item
|
||||||
|
|
||||||
This will replace the visible label in the UI with the transformation you apply with the command <TransformProgram>.
|
This will replace the visible label in the UI with the transformation you apply with the command <TransformProgram>.
|
||||||
|
|
||||||
|
@ -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/<TransformProgram> %s):%s]"
|
String yourItem "Some info [EXEC(/absolute/path/to/your/<TransformProgram> %s):%s]"
|
||||||
```
|
```
|
||||||
|
|
||||||
**Rule**
|
#### Rule
|
||||||
|
|
||||||
```java
|
```java
|
||||||
rule "Your Rule Name"
|
rule "Your Rule Name"
|
||||||
|
@ -68,7 +72,7 @@ Substitute the `/absolute/path/to/your/<TransformProgram>` 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.
|
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`
|
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.
|
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/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.
|
* [Manual](http://man7.org/linux/man-pages/man1/numfmt.1.html) and [tutorial](https://www.pixelbeat.org/docs/numfmt.html) for numfmt.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
<label>CO₂ Emission Realtime</label>
|
<label>CO₂ Emission Realtime</label>
|
||||||
<description>Near up-to-date history for CO₂ emission from electricity consumed in Denmark in g/kWh.</description>
|
<description>Near up-to-date history for CO₂ emission from electricity consumed in Denmark in g/kWh.</description>
|
||||||
</channel>
|
</channel>
|
||||||
|
<channel id="event" typeId="event"/>
|
||||||
</channels>
|
</channels>
|
||||||
</channel-group-type>
|
</channel-group-type>
|
||||||
|
|
||||||
|
|
|
@ -29,4 +29,15 @@
|
||||||
<state readOnly="true" pattern="%.1f %unit%"></state>
|
<state readOnly="true" pattern="%.1f %unit%"></state>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
|
|
||||||
|
<channel-type id="event" advanced="true">
|
||||||
|
<kind>trigger</kind>
|
||||||
|
<label>Event</label>
|
||||||
|
<description>Event triggered</description>
|
||||||
|
<event>
|
||||||
|
<options>
|
||||||
|
<option value="DAY_AHEAD_AVAILABLE">Day-ahead prices are available</option>
|
||||||
|
</options>
|
||||||
|
</event>
|
||||||
|
</channel-type>
|
||||||
|
|
||||||
</thing:thing-descriptions>
|
</thing:thing-descriptions>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</channel-groups>
|
</channel-groups>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<property name="thingTypeVersion">5</property>
|
<property name="thingTypeVersion">6</property>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<config-description-ref uri="thing-type:energidataservice:service"/>
|
<config-description-ref uri="thing-type:energidataservice:service"/>
|
||||||
|
|
|
@ -32,6 +32,10 @@
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<config-description>
|
<config-description>
|
||||||
|
<parameter name="serialNumber" type="text" required="true">
|
||||||
|
<label>Serial number</label>
|
||||||
|
<description>Identifier of meter </description>
|
||||||
|
</parameter>
|
||||||
<parameter name="mcastGroup" type="text" required="true">
|
<parameter name="mcastGroup" type="text" required="true">
|
||||||
<label>Multicast Group</label>
|
<label>Multicast Group</label>
|
||||||
<description>IP address of the multicast group</description>
|
<description>IP address of the multicast group</description>
|
||||||
|
|
Loading…
Reference in New Issue