Index

DelayedEvent

  1. Description
  2. Configuration
  3. Example

Delay and translate any event into one or more new events.

Description

This event handler is typically used to generate delayed events, for example 1 hour after sunset.

Configuration

The handler specific element in this case is called delay within which are one or more newEvent elements. The delay element has one of 3 attributes, delaySeconds, delaySeconds, delayHours, these each specify a number of units to delay. The newEvent elements can have copy_other_data and other_data elements refer to EventMapper for the details on these.

Example

<?xml version="1.0" encoding="utf-8"?>
<eventInterfaces>
    <eventInterface module='EventHandlers.DelayedEvent' name='DelayedEvent'>
        <eventtype type='http://id.webbrick.co.uk/events/webbrick/DO'>
            <eventsource source='webbrick/100/DO/5'>
                <event>
                    <params>
			<testEq type='int' name='state'> 
			    <value>0<value/>
			</testEq>
                    </params>
                    <delay delayMinutes="1">
                        <newEvent source='boiler/IsOff' type='internal'>
                        </newEvent>
                    </delay>
                </event>
                <event>
                    <params>
			<testEq name='state'> 
			    <value>1<value/>
			</testEq>
                    </params>
                    <delay delaySeconds="23">
                        <newEvent source='boiler/IsOn' type='internal'>
                        </newEvent>
                        <newEvent source='hotwater/IsOn' type='internal'>
                        </newEvent>
                    </delay>
                </event>
            </eventsource>
        </eventtype>
    </eventInterface>
</eventInterfaces>

This example creates events delayed by 2 minutes or 23 seconds.