Announcement

Collapse
No announcement yet.

What do IF, OR IF, AND IF mean?

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

  • devoir
    replied
    I will have to look for the Up/Down town arrows..... Think there was a song for that one


    Devoir

    Leave a comment:


  • SteveMSJ
    replied
    Originally posted by devoir View Post
    Will HS4 allow you to drag things above one another like HS3 did? I wanted to change up the sequence and the drag function in HS4 didn't seem to work


    Devoir
    In HS4 this is replaced by the up and down buttons for sorting the order.

    Steve

    Leave a comment:


  • drhtmal
    replied
    Originally posted by devoir View Post
    Will HS4 allow you to drag things above one another like HS3 did? I wanted to change up the sequence and the drag function in HS4 didn't seem to work


    Devoir
    No, this functionality was removed in HS4.

    Leave a comment:


  • devoir
    replied
    Will HS4 allow you to drag things above one another like HS3 did? I wanted to change up the sequence and the drag function in HS4 didn't seem to work


    Devoir

    Leave a comment:


  • jmaddox
    replied
    still works the same from HS3 to HS4. They differentiate sections using a different color for Or and If

    Leave a comment:


  • sdanks
    replied
    Just upgraded to HS4 and there is not any space between Or-ifs. Does this work the same way?
    For example, If the Thermostat is either Cool or Heat (not off) AND any of the 3 doors has been open for more than 2 minutes(Global timers on each door), turn off the thermostat. Here is my event:
    IF
    Thermostat Thermostat Home Operating Mode had its value set to Cool OR IF
    Thermostat Thermostat Home Operating Mode had its value set to Heat AND IF
    Timer Front Door Open's value is more than 2m, 0s OR IF
    Timer Living Room Patio Door Open's value is more than 2m, 0s
    OR IF
    Timer Master Patio Door Open's value is more than 2m, 0s
    THEN
    Set the Honeywell WiFi Thermostat 'Home' system mode to Off

    Does this work the same way in HS4?

    Leave a comment:


  • Marty_B
    replied
    I just wanted to thank you for this write up. It helped me out tremendously. I have used Homeseer for years and never really understood the logic order and grouping in events as most of my events are pretty simple. Thanks again.

    Leave a comment:


  • randy
    replied
    Originally posted by djsaad1 View Post
    I am temporarily on a microsoft surface book i7 with windows 10 and a znet.
    That should be enough hardware. A mobile i7 is only 2 cores with hyper threading, but my very busy system on a Xeon hangs below 10% CPU which would be about 25% of a mobile processor. You can watch the log and see what sequence things are happening in to identify any bottleneck.

    Leave a comment:


  • djsaad1
    replied
    Originally posted by rprade View Post
    What controller are you running. I run under Windows 10 on a Supermicro 1U compact server with a low power Xeon E3. I have read reports that the Pi based Zee does have a little trouble executing events quickly from time to time.
    I am temporarily on a microsoft surface book i7 with windows 10 and a znet.

    Leave a comment:


  • randy
    replied
    Originally posted by djsaad1 View Post
    I must have had something wrong in one of my events then, I had 8 events turning off about 20 light switches and it was really slow compared to having all the switches in one event.
    What controller are you running. I run under Windows 10 on a Supermicro 1U compact server with a low power Xeon E3. I have read reports that the Pi based Zee does have a little trouble executing events quickly from time to time.

    Leave a comment:


  • djsaad1
    replied
    Originally posted by rprade View Post
    I don't find that to be the case. Here are log entries from my manually triggering an event that calls 35 other events. All 36 events ran in the same second. The first event is at the bottom. Only three of the called events were true.


    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 9:00 - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 9:00 - Cold - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 9:00 - Cold - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 9:00 - Cold
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 9:00 - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 9:00
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:30 - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:30 - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:30 - Cold - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:30 - Cold - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:30 - Cold
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:30
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:00 - Cold - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:00 - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:00 - Cold - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:00 - Cold
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:00 - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:00
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:30 - Cold - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:30 - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:30 - Cold - No Setback
    Apr-07 5:17:12 PM Event Event Trigger "Thermostat & DHW Programming Work Programming 7:30 - No Setback"
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:30 - Cold
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:30
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:00 - Cold - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:00 - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:00 - Cold - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:00 - Cold
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:00 - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:00
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Non-Work Programming - Cold - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Non-Work Programming - Cold
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Non-Work Programming - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Non-Work Programming
    Apr-07 5:17:12 PM Event Event Trigger "Thermostat & DHW Programming Non-vacation Programming - Bathrooms"
    Apr-07 5:17:12 PM Event Event Trigger "Thermostat & DHW Programming 3a)Thermostat Programming Check Home"
    Apr-07 5:17:12 PM Event Event Thermostat & DHW Programming 3a)Thermostat Programming Check Home triggered by the event page 'Run' button.
    I must have had something wrong in one of my events then, I had 8 events turning off about 20 light switches and it was really slow compared to having all the switches in one event.

    Leave a comment:


  • randy
    replied
    Originally posted by djsaad1 View Post
    I noticed that if you run another event through an event, it slows down if you add multiple events to run. If it is one event it seems to run quicker.
    I don't find that to be the case. Here are log entries from my manually triggering an event that calls 35 other events. All 36 events ran in the same second. The first event is at the bottom. Only three of the called events were true.


    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 9:00 - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 9:00 - Cold - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 9:00 - Cold - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 9:00 - Cold
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 9:00 - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 9:00
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:30 - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:30 - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:30 - Cold - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:30 - Cold - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:30 - Cold
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:30
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:00 - Cold - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:00 - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:00 - Cold - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:00 - Cold
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:00 - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 8:00
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:30 - Cold - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:30 - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:30 - Cold - No Setback
    Apr-07 5:17:12 PM Event Event Trigger "Thermostat & DHW Programming Work Programming 7:30 - No Setback"
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:30 - Cold
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:30
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:00 - Cold - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:00 - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:00 - Cold - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:00 - Cold
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:00 - No Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Work Programming 7:00
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Non-Work Programming - Cold - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Non-Work Programming - Cold
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Non-Work Programming - Weekend Setback
    Apr-07 5:17:12 PM Event 'Run Event' action execution skipped, the conditions applied were not met: Thermostat & DHW Programming Non-Work Programming
    Apr-07 5:17:12 PM Event Event Trigger "Thermostat & DHW Programming Non-vacation Programming - Bathrooms"
    Apr-07 5:17:12 PM Event Event Trigger "Thermostat & DHW Programming 3a)Thermostat Programming Check Home"
    Apr-07 5:17:12 PM Event Event Thermostat & DHW Programming 3a)Thermostat Programming Check Home triggered by the event page 'Run' button.

    Leave a comment:


  • djsaad1
    replied
    Originally posted by Summerguy
    what's the difference between nested events, eg. with 3 events.

    And two copy pasted events.. but with slightly different condition at the end?

    it seems to give the same result at the end


    Will it take less computer resources with nested event , since the event engine do not have to validate 2x the same sets of conditions each time?
    I noticed that if you run another event through an event, it slows down if you add multiple events to run. If it is one event it seems to run quicker.

    Leave a comment:


  • randy
    replied
    Originally posted by rprade View Post
    ....It is simply an IF, OR IF, OR IF logic...
    Originally posted by larhedse View Post
    I guess you actually refer to "IF, AND IF, OR IF" ?
    No, I used "IF, OR IF, OR IF" for a very specific reason. They are Triggers. The only way to wrap your mind around the function of the HomeSeer Event Engine is to thoroughly understand the fundamental difference between Triggers and Conditions. Triggers are the launching point for any event. IF and OR IF are Triggers. One of them must be true before any Event can begin to run. AND IF statements are always Conditions, which are only evaluated if the Trigger is true. Conditions are simply boolean filters for Triggers. That would answer the question "Now why is there different number of choices depending on OR / AND?" you asked in this post. 12:00 PM is a Trigger or Condition, Monday is only a Condition. You cannot use Monday as a Trigger for an event, but you can trigger an Event at 12:00 AM on a Monday (using Monday as a Condition). You can turn a light on when a door opens at 12:00 AM (using the door opening as a trigger and 12:00 AM as a Condition). Understanding the most practical Trigger for an Event is very important to building a successful one. If it is nighttime and I close a door, closing the door is the Trigger and nighttime is the Condition.

    If you look at the statement "Events use simple "IF" "THEN" "ELSE" logic. They may contain multiple conditions in order to trigger the event:" in the HomeSeer help file, it simply isn't true, there is no ELSE. In most programming an ELSE is true when an IF is not. That will not work in HomeSeer's event logic, because any event has a fixed set of actions, regardless of how many (IF, OR IF) Triggers and their associated (AND IF) Conditions. A more accurate description would be: "Events use simple "IF" "AND IF" "THEN" logic".

    Think about "If the time is 9:00 PM". What would be the ELSE? If the ELSE is NOT 9:00 PM, it is true 23h, 59m, 59.999999s out of every day - definitely not useful as a trigger. Triggers in most cases are a "moment in time" and will not be true again until a device changes value or is set, a time of day, recurring trigger, etc.

    After a trigger occurs, HomeSeer does provide for ELSE functions before Actions are performed by nesting events. The logic of this is to have a single triggering event which in turn call other events that perform different actions based upon the conditions set in them. For example:

    Trigger Event
    IF the living room motion detector is set to motion
    AND IF the time is Nighttime
    AND IF the TV is On

    Then If the Event Conditions are True, Run Event Evening Lights
    Then If the Event Conditions are True, Run Event Night Lights

    Evening Lights Event
    IF this event is manually triggered
    AND IF the time is before 11:59PM
    (this is the IF)
    Then set living room lights to 50%


    Night Lights Event
    IF this event is manually triggered
    AND IF the time is after 12:00 AM
    (this is the ELSE)
    Then set living room lights to 25%


    The above series basically says - If I enter the living room while someone is watching TV at night before midnight, set the lights at 1/2 brightness, Else If I enter the the room at night after midnight set the lights to 1/4 brightness. Because there is a small flaw in the standard logic available, there is a one minute gap between 11:59 PM and midnight, so I would probably build this event with a virtual device. Each day starts and ends at midnight, so 12:00 AM is tomorrow. That said, for the purpose of illustration of nested events, this is a reasonable example.

    This is explained in this post.

    In an Event setting, Else just doesn't make sense. In HS2 I don't think there was a true distinction between Triggers and Conditions, because all events were evaluated on a recurring trigger basis.

    Originally posted by sooty View Post
    Think of "OR IF" as a trigger and "AND IF" as a condition.
    Originally posted by larhedse View Post
    Also, I think this is good reference:
    This just reiterates what I stated above. You might want to look at this post which directs you to a number of posts that attempt to explain the logic behind the Event Engine, primarily the usage and difference between Triggers and Conditions. This thread is linked in that table of contents post.

    Leave a comment:


  • larhedse
    replied
    Originally posted by rprade View Post
    ....It is simply an IF, OR IF, OR IF logic...
    I guess you actually refer to "IF, AND IF, OR IF" ?

    Also, I think this is good reference:
    Originally posted by sooty View Post
    Think of "OR IF" as a trigger and "AND IF" as a condition.

    Leave a comment:

Working...
X