How Event Conditions Work

Conditions are checked once every minute and when an event occurs, such as a Z-Wave signal received or device state change.  All conditions are checked only once and an action for a condition cannot affect any other conditions during the current check.  For example, suppose we have the two conditions shown below.  These conditions would allow a wall switch to turn a light on if it's off or brighten the light by 10% if it's already on.  (The light is identified by the code Q18 -- see the Status screen to find the code for a specific device.)

  1. If received Q17-ON AND Q18 is OFF then turn Q18 ON.

  2. If received Q17-ON AND Q18 is ON then brighten Q18 10%.

 

Let's assume Q18 is OFF and HomeSeer receives a Q17-ON command.  HomeSeer does the following:

Why, if the status of a device is changed in the event, is the change not detected during that event?

If the status for the device was updated immediately, both conditions would become true and the light at Q18 would go on and then brighten 10%.  (This is probably not what you want.)

Status of devices changed by a condition are not updated until all the conditions are checked.

All conditions must be true for the event to trigger.

You can use the Status Change trigger to trigger events when the status of a device actually changes.  Status changes trigger events immediately.

 

Conditions take the form:

IF (condition) AND (condition) AND ...

OR

IF (condition) AND (condition) AND ...

THEN (take some action)

 

For example, suppose you would like a light to be turned off if it was left on for 30 minutes.  Assuming the light was named "closet light", the event would appear as:

IF closet light has been ON for 30 minutes then turn it off

In the Conditions area of the trigger screen for this event, select the "closet light" device from the Device Condition field, then select Has been on for in the Condition field.  Set the time for :30.  You would then add the closet light device to the events device list and set its action to OFF.  This will turn the light off after it has been on for 30 minutes.  This only works if you turned the light on from a switch that sends Z-Wave commands so that HomeSeer knows when it was turned on.  If an event turns a device ON or OFF, HomeSeer knows the status.

Using Conditions to Control Devices Using Timed Offsets

Conditions can be used to delay the action of a trigger.  Suppose you would like a light to come on at 10:00 PM and then have a second light go on 30 minutes later.  Create an event that triggers at 10:00 PM and turns ON light #1.  Create a second event and set its trigger to the following condition:

If (light #1) (HAS BEEN ON FOR) (:30)

Set the action for the event to turn ON light #2.  You can add as many events as you like as offsets from the light #1 event.

About Time After/Time Before Conditions

Note that using the "before" and "after" time conditions are based on a 24-hour day.  For example, if you would like the condition to trigger "after 9:00 PM" then the valid range is "9:01 PM to 11:59 PM".  This makes sense since 12:00 AM starts a new day and is treated as "time 0:00".  The condition "before 8:00 AM" is valid between "12:00 AM and 7:59 AM".  The "day time" and "night time" conditions make dealing with this issue a little easier.

Or Conditions

The condition triggers if all the conditions in the condition list are true.  It may be desirable to trigger the event if any of the conditions are true, rather than all of them.  You can create OR groups, where all conditions in a particular group must be true, but the event will trigger if any group is true.  This allows you to group your AND conditions together and OR them with other groups.