Announcement

Collapse
No announcement yet.

Event: If Then Else

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

    #16
    Originally posted by ramshaklez View Post
    I am still having issues with this logic. The above triggers both events for me. For example, I am trying to manually trigger the following:

    (Event #1) IF Device = ON, Turn Off,

    (Event #2) If Device = OFF, Turn ON (Dim 17%)


    Event #3 is the Trigger Event and calls both Event #1 and Event #2 (in that order). All events are set to run manually.

    Let's say the Device is currently OFF. When I trigger Event #3, it calls Event #1 and doesn't do anything. It then runs Event #2 and turns the device ON.

    Good so far.... but....

    Now that the device is ON, when I manually trigger Event #3 again it runs Event #1 and turns the Device OFF (good) but it then continues on to Event#2 and turns the device right back ON (bad).

    This is why we need true ElseIf capabilities in HS3.

    The only other way I can see around this (without having to create virtual devices which still need multiple events) is with scripting which is fine for me but not very user friendly for the average Joe.
    As lveatch said, Dim 17% is not "On". You can use "A device's value was set and is not equal to..." Off instead of "IF Device = ON".

    Easy Trigger's toggle function is also useful for this. A single event will toggle between 17% and Off:

    Click image for larger version

Name:	Capture.jpg
Views:	1
Size:	31.5 KB
ID:	1192783
    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

    Comment


      #17
      Originally posted by Timon View Post
      Thanks, I totally missed that one.

      However, I have a question. It seems for this to work the current condition of all of the test must be done before the actual calls to the events are done if not it would still fail.

      I need to find the description for this in the helpful guides.
      It is really easy. When you create an event that calls another event using the "Run only if other event conditions are true", the trigger in the event you called is ignored (it will always trigger, whether manual, time, device value etc.), but the conditions are all observed. If you create an event calling two or more secondary events using that option, they are all triggered virtually simultaneously, with the conditions in all of the events observed. For example the following event runs quite a number of events and each looks at the values of 3 virtual devices 1) scheduling (5 values), 2) weekend setback (on-off) and 3) cold (on-off). All events will trigger, but only one event (other than the last one) will match the combination of values for those three devices.

      HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

      Comment


        #18
        Originally posted by ramshaklez View Post
        [If] the device is ON, when I manually trigger Event #3 again it runs Event #1 and turns the Device OFF (good) but it then continues on to Event#2 and turns the device right back ON (bad).
        I think Randy's suggestion of using Easy Trigger toggle function is the best solution for this situation, but in the absence of more specific knowledge of your event, I'm guessing that the problem is the condition on event #2. If you change that condition to 'has been off for at least' 1 second, that will probably prevent the behavior you are seeing.
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment

        Working...
        X