diff --git a/bundles/org.openhab.automation.jsscripting/README.md b/bundles/org.openhab.automation.jsscripting/README.md index e3b8e2e04..d2112f77c 100644 --- a/bundles/org.openhab.automation.jsscripting/README.md +++ b/bundles/org.openhab.automation.jsscripting/README.md @@ -1109,7 +1109,7 @@ Operations and conditions can also optionally take functions: ```javascript rules.when().item("F1_light").changed().then(event => { - console.log(event); + console.log(event); }).build("Test Rule", "My Test Rule"); ``` @@ -1225,21 +1225,22 @@ The `event` object provides some information about that trigger. This table gives an overview over the `event` object: -| Property Name | Trigger Types | Description | Rules DSL Equivalent | -|-------------------|------------------------------------------------------|-------------------------------------------------------------------------------------|------------------------| -| `oldState` | `ItemStateChangeTrigger`, `GroupStateChangeTrigger` | Previous state of Item or Group that triggered event | `previousState` | -| `newState` | `ItemStateChangeTrigger`, `GroupStateChangeTrigger` | New state of Item or Group that triggered event | N/A | -| `receivedState` | `ItemStateUpdateTrigger`, `GroupStateUpdateTrigger` | State of Item that triggered event | `triggeringItem.state` | -| `receivedCommand` | `ItemCommandTrigger`, `GroupCommandTrigger` | Command that triggered event | `receivedCommand` | -| `itemName` | `Item****Trigger`, `Group****Trigger` | Name of Item that triggered event | `triggeringItem.name` | -| `receivedEvent` | `ChannelEventTrigger` | Channel event that triggered event | N/A | -| `channelUID` | `ChannelEventTrigger` | UID of channel that triggered event | N/A | -| `oldStatus` | `ThingStatusChangeTrigger` | Previous state of Thing that triggered event | N/A | -| `newStatus` | `ThingStatusChangeTrigger` | New state of Thing that triggered event | N/A | -| `status` | `ThingStatusUpdateTrigger` | State of Thing that triggered event | N/A | -| `thingUID` | `Thing****Trigger` | UID of Thing that triggered event | N/A | -| `eventType` | all except `PWMTrigger`, `PIDTrigger`, time triggers | Type of event that triggered event (change, command, triggered, update) | N/A | -| `triggerType` | all except `PWMTrigger`, `PIDTrigger`, time triggers | Type of trigger that triggered event | N/A | +| Property Name | Trigger Types | Description | Rules DSL Equivalent | +|-------------------|------------------------------------------------------|-------------------------------------------------------------------------|------------------------| +| `oldState` | `ItemStateChangeTrigger`, `GroupStateChangeTrigger` | Previous state of Item or Group that triggered event | `previousState` | +| `newState` | `ItemStateChangeTrigger`, `GroupStateChangeTrigger` | New state of Item or Group that triggered event | N/A | +| `receivedState` | `ItemStateUpdateTrigger`, `GroupStateUpdateTrigger` | State of Item that triggered event | `triggeringItem.state` | +| `receivedCommand` | `ItemCommandTrigger`, `GroupCommandTrigger` | Command that triggered event | `receivedCommand` | +| `itemName` | `Item****Trigger`, `Group****Trigger` | Name of Item that triggered event | `triggeringItem.name` | +| `groupName` | `Group****Trigger` | Name of the group whose member triggered event | N/A | +| `receivedEvent` | `ChannelEventTrigger` | Channel event that triggered event | N/A | +| `channelUID` | `ChannelEventTrigger` | UID of channel that triggered event | N/A | +| `oldStatus` | `ThingStatusChangeTrigger` | Previous state of Thing that triggered event | N/A | +| `newStatus` | `ThingStatusChangeTrigger` | New state of Thing that triggered event | N/A | +| `status` | `ThingStatusUpdateTrigger` | State of Thing that triggered event | N/A | +| `thingUID` | `Thing****Trigger` | UID of Thing that triggered event | N/A | +| `eventType` | all except `PWMTrigger`, `PIDTrigger`, time triggers | Type of event that triggered event (change, command, triggered, update) | N/A | +| `triggerType` | all except `PWMTrigger`, `PIDTrigger`, time triggers | Type of trigger that triggered event | N/A | All properties are typeof `string`. diff --git a/bundles/org.openhab.automation.jsscripting/doc/rule-config.png b/bundles/org.openhab.automation.jsscripting/doc/rule-config.png index e26c6a07c..f338d23dc 100644 Binary files a/bundles/org.openhab.automation.jsscripting/doc/rule-config.png and b/bundles/org.openhab.automation.jsscripting/doc/rule-config.png differ diff --git a/bundles/org.openhab.automation.jsscripting/doc/rule-engines.png b/bundles/org.openhab.automation.jsscripting/doc/rule-engines.png index 6faa0fb6c..5c382879f 100644 Binary files a/bundles/org.openhab.automation.jsscripting/doc/rule-engines.png and b/bundles/org.openhab.automation.jsscripting/doc/rule-engines.png differ diff --git a/bundles/org.openhab.automation.jsscripting/doc/rule-script.png b/bundles/org.openhab.automation.jsscripting/doc/rule-script.png index 585d16e15..63f05273d 100644 Binary files a/bundles/org.openhab.automation.jsscripting/doc/rule-script.png and b/bundles/org.openhab.automation.jsscripting/doc/rule-script.png differ diff --git a/bundles/org.openhab.automation.jsscripting/doc/settings.png b/bundles/org.openhab.automation.jsscripting/doc/settings.png index 0e9a6eb53..a0f5dddc0 100644 Binary files a/bundles/org.openhab.automation.jsscripting/doc/settings.png and b/bundles/org.openhab.automation.jsscripting/doc/settings.png differ diff --git a/bundles/org.openhab.automation.jsscripting/pom.xml b/bundles/org.openhab.automation.jsscripting/pom.xml index 3cb3aaabc..98444bc3e 100644 --- a/bundles/org.openhab.automation.jsscripting/pom.xml +++ b/bundles/org.openhab.automation.jsscripting/pom.xml @@ -24,7 +24,7 @@ 22.0.0.2 ${project.version} - openhab@4.3.0 + openhab@4.4.0 @@ -67,7 +67,7 @@ - install ${ohjs.version} webpack@5.75.0 webpack-cli@4.10.0 + install ${ohjs.version} webpack@^5.87.0 webpack-cli@^5.1.4 @@ -77,8 +77,8 @@ - webpack -c ./node_modules/openhab/@globals-webpack.config.js --entry - ./node_modules/openhab/@openhab-globals.js -o ./dist + webpack -c ./node_modules/openhab/build/@globals-webpack.config.js --entry-reset --entry + ./node_modules/openhab/build/@openhab-globals.js -o ./dist @@ -87,7 +87,9 @@ npx - webpack -c ./node_modules/openhab/webpack.config.js --entry ./node_modules/openhab/ -o ./dist + + webpack -c ./node_modules/openhab/build/webpack.config.js --entry-reset --entry + ./node_modules/openhab/ -o ./dist