Global

Members

(constant) builder :RuleBuilder

Source:
Type:

Type Definitions

HostState

Source:

Native Java openHAB State (instance of org.openhab.core.types.State)

Type:
  • object

HostItem

Source:

Native Java openHAB Item (instance of org.openhab.core.items.Item)

Type:
  • object

HostClass

Source:

Native Java Class Object (instance of java.lang.Class)

Type:
  • object

HostRule

Source:

Native Jave openHAB Rule (instance of org.openhab.core.automation.Rule)

Type:
  • object

HostTrigger

Source:

Native Jave openHAB Trigger (instance of org.openhab.core.automation.Trigger)

Type:
  • object

HostThing

Source:

Native Java openHAB Thing (instance of org.openhab.core.thing.Thing)

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 ItemMetadata <optional>

either object { namespace: value } or { namespace: { value: value, config: {} } }

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 Attributes Description
stateDescription object <optional>

stateDescription configuration, required for most UIs

Properties
Name Type Attributes Description
config object <optional>

config of this metadata namespace

Properties
Name Type Attributes Description
pattern string <optional>

state formatting pattern, required for most UIs, see https://www.openhab.org/docs/configuration/items.html#state-presentation

expire object <optional>

expire configuration, see https://www.openhab.org/docs/configuration/items.html#parameter-expire

Properties
Name Type Attributes Description
value string <optional>

e.g. 0h30m0s,command=OFF

config object <optional>
Properties
Name Type Attributes Description
ignoreStateUpdates string <optional>

If the ignore state updates checkbox is set, only state changes will reset the timer; true or false

autoupdate object <optional>

autoupdate configuration, see https://www.openhab.org/docs/configuration/items.html#parameter-expire

Properties
Name Type Attributes Description
value string <optional>

true or false

Item metadata configuration, not fully documented

Type:
  • object

EventObject

Source:
Properties:
Name Type Description
oldState string

only for triggers.ItemStateChangeTrigger & triggers.GroupStateChangeTrigger: Previous state of Item or Group that triggered event

newState string

only for triggers.ItemStateChangeTrigger & triggers.GroupStateChangeTrigger: New state of Item or Group that triggered event

receivedState string

only for triggers.ItemStateUpdateTrigger & triggers.GroupStateUpdateTrigger: State that triggered event

receivedCommand string

only for triggers.ItemCommandTrigger, triggers.GroupCommandTrigger, triggers.PWMTrigger & triggers.PIDTrigger : Command that triggered event

itemName string

for all triggers except triggers.PWMTrigger: name of Item that triggered event

receivedEvent string

only for triggers.ChannelEventTrigger: Channel event that triggered event

channelUID string

only for triggers.ChannelEventTrigger: UID of channel that triggered event

oldStatus string

only for triggers.ThingStatusChangeTrigger: Previous state of Thing that triggered event

newStatus string

only for triggers.ThingStatusChangeTrigger: New state of Thing that triggered event

status string

only for triggers.ThingStatusUpdateTrigger: State of Thing that triggered event

eventType string

for all triggers except triggers.PWMTrigger, triggers.PIDTrigger, time triggers: Type of event that triggered event (change, command, time, triggered, update)

triggerType string

for all triggers except triggers.PWMTrigger, triggers.PIDTrigger, time triggers: Type of trigger that triggered event (for TimeOfDayTrigger: GenericCronTrigger)

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****Triggers 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 triggers | Array.<triggers>

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