Announcement

Collapse
No announcement yet.

Delayed Event

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Delayed Event

    This Action is much the same as a Delayed Device Action. If you have an Event with the Action Run Another Event, you are given the option to Delay the Event from 1 second to several days or anything in between. In an Event when you Run Another Event you are presented with "Delay Event Period::" where you can select from a second to several hours or anything in between. Unlike a Delayed Device Action, you cannot delay an Event by several Days. Here is an Action to run another Event with a Delay of 5 minutes.

    Click image for larger version

Name:	DelayedEventStart.PNG
Views:	470
Size:	29.9 KB
ID:	1269913

    Just like a Delayed Device Action, this Action is launched by another Event created when this one is run. The delay is only on the called Event and does not affect any of the other Actions in the calling Event. The Event being run from this Event simply turns a Device on

    Click image for larger version

Name:	DelayedEvent1.PNG
Views:	339
Size:	22.7 KB
ID:	1269915

    When the Delay Test Event is run the Action will be delayed by 5 Minutes. As in Delayed Device Actions, HomeSeer will create a fresh Event with a time dependent Trigger. It will be placed in a special Event Group "Delayed Events"

    Click image for larger version

Name:	DelayedEventGroup.PNG
Views:	371
Size:	9.8 KB
ID:	1269914

    Inside the group will be a new Event to perform the Action, with a time Trigger Exactly 5 minutes after the first Event has run.

    This temporary Event is set with a time trigger of the time the first event was run plus the delay.

    Dec-27 11:12:29 AM Event Event Trigger "HomeSeer Demo Delay Test"

    The first Event was run at 11:12:29, creating a temporary Event to be run at 11:17:29.

    Click image for larger version

Name:	DelayedEvent2.PNG
Views:	348
Size:	38.2 KB
ID:	1269916

    The advanced option "Run Only if Other Event Conditions are TRUE" is also honored in the Delayed Event.

    Click image for larger version

Name:	DelayedEventStart1.PNG
Views:	342
Size:	30.1 KB
ID:	1269917

    The temporary Event will have the option selected.

    Click image for larger version

Name:	DelayedEvent3.PNG
Views:	343
Size:	40.1 KB
ID:	1269918

    You should also note that the temporary Event has the advanced option "Remove This Event After Triggering" selected. In summation the steps are as follow:
    • The first Event runs with a Delay on Run Another Event
    • A secondary (self-deleting) Event is created with a Time Trigger equal to the current time plus the Delay imposed in th action. In the above case 5 minutes
    • After the time has lapsed the secondary Event will run, calling the Event referenced in the first Event
    • The secondary Event is deleted after running
    • Since the Delayed Event temporary Event has a time trigger, if HomeSeer is down at the time of the trigger, it will run the next day at that time.
    As you can see there are several steps involved in this process, making it somewhat inefficient for very short delays. For a short delay of 1-10 seconds a Wait Action is preferable as it saves the database writing and subsequent deleting of the delay Event. For longer delays, the Delayed Event Action is usually preferable to suspending an Event. It is important to understand that the Delay applies only to a specific Event. All actions are performed at the instant the Event is run, with delays built in to the Actions.

    Any Delayed Event in the queue Group can be cancelled by the Event Action "Cancel a Delayed Event Action", before it runs. If you cancel a Delayed Event for a particular Event, all delayed Events for that Event will be Cancelled. This is NOT the same as "Cancel Another Running Event". These will be covered in other Threads.

    #2
    Sorry if this is obvious, but do events execute sequentially? Meaning, if you have an "after a delay of" action in an event, does it wait and then continue to run the other steps of the event. Or, does it wait for that one step but continue running the others? Thank you!


    Comment


      #3
      All actions are spun off immediately when an Event is run. There is a single Action ‘Wait” that will halt execution of subsequent Actions until the wait period elapses, then the next Actions are launched. Multiple “Wait” Actions can be used in an Event. See the thread here.

      Comment

      Working...
      X