Previous Topic

Next Topic

Book Contents

Book Index

Using Built-in Handlers

Overview

The goal of this guide is to show simple and useful use cases of the automation system handlers via the Automation Built-in Handlers Demo. It contains 5 rules and each of them is designed to use a combination of different triggers, conditions and actions in order to show how to build useful rules.

There are rules which help us to save money from heating, to make our home more comfortable, or just to provide us with more free time.

All of the rules operate on items which can be found in most of the smart homes and to do things like:

The rule definitions can be found in src/main/resources/OSGI-INF/automation/rules.

The functional items are defined in com.prosyst.mbs.demo.automation.builtin.handlers.items.

Trigger Handler Factories

Event Trigger

The trigger.Event handler can be explored in the TurnOnLights.json file from the Automation Built-in Handlers Demo, placed in ../osgi/demo/com.prosyst.mbs.automation.builtin.handlers-demo/src/main/resources/OSGI-INF/automation/rules folder.

Sun Position Trigger

The trigger.SunPosition handler can be explored in the WaterLawn.json file from the Automation Built-in Handlers Demo, placed in ../osgi/demo/com.prosyst.mbs.automation.builtin.handlers-demo/src/main/resources/OSGI-INF/automation/rules folder.

Repeating Time Trigger

The trigger.RepeatingTime handler can be explored in the TurnOffHeating.json file from the Automation Built-in Handlers Demo, placed in ../osgi/demo/com.prosyst.mbs.automation.builtin.handlers-demo/src/main/resources/OSGI-INF/automation/rules folder.

Item Property Changed Trigger

The trigger.ItemPropertyChanged handler can be explored in the CloseBlinds.json file from the Automation Built-in Handlers Demo, placed in ../osgi/demo/com.prosyst.mbs.automation.builtin.handlers-demo/src/main/resources/OSGI-INF/automation/rules folder.

Item Operation Executed Trigger

The trigger.ItemOperationExecuted handler can be explored in the DimLights.json file from the Automation Built-in Handlers Demo, placed in ../osgi/demo/com.prosyst.mbs.automation.builtin.handlers-demo/src/main/resources/OSGI-INF/automation/rules folder.

Condition Handlers

Sun Position Condition

The condition.SunPosition handler can be explored in the TurnOnLights.json file from the Automation Built-in Handlers Demo, placed in ../osgi/demo/com.prosyst.mbs.automation.builtin.handlers-demo/src/main/resources/OSGI-INF/automation/rules folder.

Script Condition

Comparator Condition

The condition.Comparator handler can be explored in the CloseBlinds.json and DimLights.json files from the Automation Built-in Handlers Demo, placed in ../osgi/demo/com.prosyst.mbs.automation.builtin.handlers-demo/src/main/resources/OSGI-INF/automation/rules folder.

Repeating Time Condition

The condition.RepeatingTime handler can be explored in the WaterLawn.json file from the Automation Built-in Handlers Demo, placed in ../osgi/demo/com.prosyst.mbs.automation.builtin.handlers-demo/src/main/resources/OSGI-INF/automation/rules folder.

Action Handlers

Item Get Property Action

The action.ItemGetProperty handler can be explored in the DimLights.json file from the Automation Built-in Handlers Demo, placed in ../osgi/demo/com.prosyst.mbs.automation.builtin.handlers-demo/src/main/resources/OSGI-INF/automation/rules folder.

Item Invoke Operation Action

The action.ItemInvokeOperation handler can be explored in the CloseBlinds.json , TurnOffHeating.json, TurnOnLights.json, and in the WaterLawn.json files from the Automation Built-in Handlers Demo, placed in ../osgi/demo/com.prosyst.mbs.automation.builtin.handlers-demo/src/main/resources/OSGI-INF/automation/rules folder.

History Remove Entry Action

Item Set Property Action

The action.ItemSetProperty handler can be explored in the DimLights.json file from the Automation Built-in Handlers Demo, placed in ../osgi/demo/com.prosyst.mbs.automation.builtin.handlers-demo/src/main/resources/OSGI-INF/automation/rules folder.

Script Action

History Add Entry Action

See also