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
Cody Cutrer 2023-03-18 11:51:11 -06:00 committed by GitHub
parent 4c8e76fa06
commit a6c437e01d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 25 deletions

View File

@ -529,11 +529,12 @@ Read the JSR223 language specific documentation for examples of using these `Tri
:::
::: details core.GenericEventTrigger
| 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/\*/" |
| `eventSource` | `Item` name, `ChannelUID`, `ThingUID`, etc. |
| `eventTypes` | `ItemCommandEvent`, `ItemStateEvent`, `ItemStateChangedEvent`, `GroupItemStateChangedEvent`, `ItemAddedEvent`, `ItemRemovedEvent`, `ThingAddedEvent`, `ThingRemovedEvent`, `ThingStatusInfoChangedEvent`, `ThingStatusInfoEvent`, `ThingUpdatedEvent`, etc. |
| Parameter | Description |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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/\*\*" |
| `source` | The object that triggered the event, such as `org.openhab.core.expire` |
| `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

View File

@ -484,37 +484,45 @@ The above example uses two rule configuration properties:
### 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
{
"uid":"GenericEventTrigger",
"label":"Basic Event Trigger",
"description":"Triggers Rules on Events",
"configDescriptions":[
"configDescriptions": [
{
"name":"eventTopic",
"type":"TEXT",
"label":"Topic",
"description":"This is the topic, the trigger will listen to: >>openhab/*<<",
"required":true,
"defaultValue":"openhab/*"
"name": "topic",
"type": "TEXT",
"label": "Topic",
"description": "the topic, as a file-system style glob (*, ** and {} operators). will match all events if empty",
"required": true,
"default": ""
},
{
"name":"eventSource",
"type":"TEXT",
"label":"Source",
"description":"This is the source of the event (eg. item name)",
"required":true,
"defaultValue":""
"name": "source",
"type": "TEXT",
"label": "Source",
"description": "the source of the event (e.g. org.openhab.core.expire, etc.). will match all events if empty",
"required": true,
"default": ""
},
{
"name":"eventTypes",
"type":"TEXT",
"label":"Event Type",
"description":"the event type, the trigger should listen to. Multiple types can be specified comma-separated",
"required":true,
"defaultValue":""
"name": "types",
"type": "TEXT",
"label": "Event Type",
"description": "the event type the trigger should listen to. multiple types can be specified comma-separated. will match all events if empty",
"required": true,
"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":[