Type Definitions
HistoricItem
- Source:
Properties:
Name | Type | Description |
---|---|---|
state |
string | Item state |
rawState |
HostState | Raw Java state |
numericState |
number | null | Numeric representation of Item state, or |
quantityState |
Quantity | null | Item state as |
timestamp |
time.ZonedDateTime | timestamp of historic item |
Type:
- object
ItemConfig
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string | the type of the Item |
|
name |
string | Item name for the Item to create |
|
label |
string |
<optional> |
the label for the Item |
category |
string |
<optional> |
the category (icon) for the Item |
groups |
Array.<string> |
<optional> |
an array of groups the Item is a member of |
tags |
Array.<string> |
<optional> |
an array of tags for the Item |
channels |
string | Object |
<optional> |
for single channel link a string or for multiple an object { channeluid: configuration }; configuration is an object |
metadata |
* |
<optional> |
either object |
giBaseType |
string |
<optional> |
the group Item base type for the Item |
groupFunction |
HostGroupFunction |
<optional> |
the group function used by the Item |
configuration describing an Item
Type:
- object
ItemMetadata
- Source:
Properties:
Name | Type | Description |
---|---|---|
configuration |
object | metadata namespace's configuration |
value |
string | metadata namespace's value |
a single metadata namespace of an Item
Type:
- object
EventObject
- Source:
Properties:
Name | Type | Description |
---|---|---|
oldState |
string | only for |
newState |
string | only for |
receivedState |
string | only for |
receivedCommand |
string | only for |
itemName |
string | for all triggers except |
receivedEvent |
string | only for |
channelUID |
string | only for |
oldStatus |
string | only for |
newStatus |
string | only for |
status |
string | only for |
eventType |
string | for all triggers except |
triggerType |
string | for all triggers except |
payload |
* | for most triggers |
When a rule is triggered, the script is provided the event instance that triggered it. The specific data depends on the event type. The EventObject
provides several information about that trigger.
Note:
Group****Trigger
s use the equivalent Item****Trigger
as trigger for each member.
Time triggers do not provide any event instance, therefore no property is populated.
Type:
- object
RuleCallback(event)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
event |
EventObject |
RuleConfig
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
string | name of the rule (used in UI) |
||
description |
string |
<optional> |
description of the rule (used in UI) |
|
triggers |
HostTrigger | Array.<HostTrigger> | which will fire the rule |
||
execute |
RuleCallback | callback to run when the rule fires |
||
id |
string |
<optional> |
UID of the rule, if not provided, one is generated |
|
tags |
Array.<string> |
<optional> |
tags for the rule (used in UI) |
|
ruleGroup |
string |
<optional> |
name of rule group to use |
|
overwrite |
boolean |
<optional> |
false
|
whether to overwrite an existing rule with the same UID |
configuration for rules.JSRule
Type:
- object