update docs for core.GenericEventTrigger (#1986)
* update docs for core.GenericEventTrigger see https://github.com/openhab/openhab-core/pull/3299 Signed-off-by: Cody Cutrer <cody@cutrer.us> * link to javadocs for mostly-complete list of event types Signed-off-by: Cody Cutrer <cody@cutrer.us> --------- Signed-off-by: Cody Cutrer <cody@cutrer.us>pull/2034/head
parent
4c8e76fa06
commit
a6c437e01d
|
@ -529,11 +529,12 @@ Read the JSR223 language specific documentation for examples of using these `Tri
|
||||||
:::
|
:::
|
||||||
|
|
||||||
::: details core.GenericEventTrigger
|
::: details core.GenericEventTrigger
|
||||||
| Parameter | Description |
|
| Parameter | Description |
|
||||||
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `eventTopic` | Default: "openhab/\*"<br><br>Events can also be filtered, e.g.<br>Item events: "openhab/items/\*/"<br>Channel events: "openhab/channels/\*/triggered"<br>Thing events: "openhab/things/\*/" |
|
| `topic` | The topic to match, as a file-system style glob (*, **, ?, and {} operators).<br><br>Example filters:<br>Item events: "openhab/items/\*/"<br>Channel events: "openhab/channels/\*/triggered"<br>Thing events: "openhab/things/\*\*" |
|
||||||
| `eventSource` | `Item` name, `ChannelUID`, `ThingUID`, etc. |
|
| `source` | The object that triggered the event, such as `org.openhab.core.expire` |
|
||||||
| `eventTypes` | `ItemCommandEvent`, `ItemStateEvent`, `ItemStateChangedEvent`, `GroupItemStateChangedEvent`, `ItemAddedEvent`, `ItemRemovedEvent`, `ThingAddedEvent`, `ThingRemovedEvent`, `ThingStatusInfoChangedEvent`, `ThingStatusInfoEvent`, `ThingUpdatedEvent`, etc. |
|
| `types` | `ItemCommandEvent`, `ItemStateEvent`, `ItemStateChangedEvent`, `GroupItemStateChangedEvent`, `ItemAddedEvent`, `ItemRemovedEvent`, `ThingAddedEvent`, `ThingRemovedEvent`, `ThingStatusInfoChangedEvent`, `ThingStatusInfoEvent`, `ThingUpdatedEvent`, etc. A non-exhaustive list can be found [in the Javadocs](https://www.openhab.org/javadoc/latest/org/openhab/core/events/event). |
|
||||||
|
| `payload` | Regex to match against the actual event data. |
|
||||||
:::
|
:::
|
||||||
|
|
||||||
::: details core.SystemStartlevelTrigger
|
::: details core.SystemStartlevelTrigger
|
||||||
|
|
|
@ -484,37 +484,45 @@ The above example uses two rule configuration properties:
|
||||||
|
|
||||||
### GenericEventTrigger
|
### GenericEventTrigger
|
||||||
|
|
||||||
GenericEventTrigger has 3 configuration parameters: `eventTopic`,`eventSource` and `eventTypes` and one output: 'event'.
|
GenericEventTrigger has 4 configuration parameters: `topic`,`source`, `types`, and `payload`, and one output: `event`.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"uid":"GenericEventTrigger",
|
"uid":"GenericEventTrigger",
|
||||||
"label":"Basic Event Trigger",
|
"label":"Basic Event Trigger",
|
||||||
"description":"Triggers Rules on Events",
|
"description":"Triggers Rules on Events",
|
||||||
"configDescriptions":[
|
"configDescriptions": [
|
||||||
{
|
{
|
||||||
"name":"eventTopic",
|
"name": "topic",
|
||||||
"type":"TEXT",
|
"type": "TEXT",
|
||||||
"label":"Topic",
|
"label": "Topic",
|
||||||
"description":"This is the topic, the trigger will listen to: >>openhab/*<<",
|
"description": "the topic, as a file-system style glob (*, ** and {} operators). will match all events if empty",
|
||||||
"required":true,
|
"required": true,
|
||||||
"defaultValue":"openhab/*"
|
"default": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"eventSource",
|
"name": "source",
|
||||||
"type":"TEXT",
|
"type": "TEXT",
|
||||||
"label":"Source",
|
"label": "Source",
|
||||||
"description":"This is the source of the event (eg. item name)",
|
"description": "the source of the event (e.g. org.openhab.core.expire, etc.). will match all events if empty",
|
||||||
"required":true,
|
"required": true,
|
||||||
"defaultValue":""
|
"default": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"eventTypes",
|
"name": "types",
|
||||||
"type":"TEXT",
|
"type": "TEXT",
|
||||||
"label":"Event Type",
|
"label": "Event Type",
|
||||||
"description":"the event type, the trigger should listen to. Multiple types can be specified comma-separated",
|
"description": "the event type the trigger should listen to. multiple types can be specified comma-separated. will match all events if empty",
|
||||||
"required":true,
|
"required": true,
|
||||||
"defaultValue":""
|
"default": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "payload",
|
||||||
|
"type": "TEXT",
|
||||||
|
"label": "Event Payload",
|
||||||
|
"description": "A regex to match the event's serialized payload. will match all events if empty",
|
||||||
|
"required": true,
|
||||||
|
"default": ""
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outputs":[
|
"outputs":[
|
||||||
|
|
Loading…
Reference in New Issue