Announcement

Collapse
No announcement yet.

Are conditions ignored if the event is run from another event?

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

    Are conditions ignored if the event is run from another event?

    Sorry if this is already posted but a search didn't yield an answer for me.

    I have a lot of scripts that handle conditions right now and I'd like to move away from those to events. This is a part of preparing to move to HS4 and the fact that I'd have to modify a ton of scripts due to the new device model.

    I have an event that closes a garage door if it's open. It's called from another event that compares garage and outside temperature and then does several things like turn off an exhaust fan and call other events which close each door, if open.

    The event that closes a door if open has the condition IF "manually triggered AND IF "Single Door Reed Switch is not equal to Closed" then "Pulse Single Door Opener Relay". When called from "Run Another Event" the condition of the door being open or closed seems to be ignored.

    Any ideas or suggestions for a workaround?

    Thanks,
    Ken

    #2
    Originally posted by kenm View Post
    Sorry if this is already posted but a search didn't yield an answer for me.

    I have a lot of scripts that handle conditions right now and I'd like to move away from those to events. This is a part of preparing to move to HS4 and the fact that I'd have to modify a ton of scripts due to the new device model.

    I have an event that closes a garage door if it's open. It's called from another event that compares garage and outside temperature and then does several things like turn off an exhaust fan and call other events which close each door, if open.

    The event that closes a door if open has the condition IF "manually triggered AND IF "Single Door Reed Switch is not equal to Closed" then "Pulse Single Door Opener Relay". When called from "Run Another Event" the condition of the door being open or closed seems to be ignored.

    Any ideas or suggestions for a workaround?

    Thanks,
    Ken
    Yes, conditions are ignored if you run an event from another event, however, click on the red airplane below your action that calls the other event and then put a check mark next to “Run only if other event conditions are TRUE” and it will run as you expect.


    Sent from my iPad using Tapatalk
    HS3 3.0.0.548 &HSTouch Designer 3.0.71 with 996 Devices, 547 Events
    Plugin's:
    BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee, Nest, AK Bond
    EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
    weatherXML, Jon00 Alexa Helper, Network Monitor, MyQ, Z-Wave 3.0.1.252

    Comment


      #3
      It is also important to note that ALL triggers in an Event are considered TRUE (ignored) when manually run. Therefore Conditions must be attached to all triggers in the called Event. Say you have an Event:

      IF The time is 6:00PM

      OR IF the Event is manually triggered
      AND IF The door is Open

      The Condition attached to the second Trigger will never be evaluated. At 6:00PM the Event will run. If you manually run the Event, both triggers will be true, therefore the Condition still will not be evaluated. Instead the Event should be:

      IF The time is 6:00PM
      AND IF The door is Open

      OR IF the Event is manually triggered
      AND IF The door is Open

      Since Every Trigger is true when manually run, there is no need for a pure manual trigger. The only time you need to use that trigger is if the Event is ONLY manually triggered.

      Comment


        #4
        Originally posted by rprade View Post
        It is also important to note that ALL triggers in an Event are considered TRUE (ignored) when manually run. Therefore Conditions must be attached to all triggers in the called Event. Say you have an Event:

        IF The time is 6:00PM

        OR IF the Event is manually triggered
        AND IF The door is Open

        The Condition attached to the second Trigger will never be evaluated. At 6:00PM the Event will run. If you manually run the Event, both triggers will be true, therefore the Condition still will not be evaluated. Instead the Event should be:

        IF The time is 6:00PM
        AND IF The door is Open

        OR IF the Event is manually triggered
        AND IF The door is Open

        Since Every Trigger is true when manually run, there is no need for a pure manual trigger. The only time you need to use that trigger is if the Event is ONLY manually triggered.
        Randy, so if I'm reading your example correctly, the only way one can test an event's conditional logic on demand (manual trigger) is to logically AND an "OR IF the Event is manually triggered" with the other conditional clauses in the event, correct?

        Comment


          #5
          Originally posted by TC1 View Post

          Randy, so if I'm reading your example correctly, the only way one can test an event's conditional logic on demand (manual trigger) is to logically AND an "OR IF the Event is manually triggered" with the other conditional clauses in the event, correct?
          Not quite. Randy's wording may be a bit confusing. The "manual" trigger is just a place holder to use with an event that you do not intend to trigger any other way. If you already have a trigger (of any kind) then there is no need to add a "manual" trigger, because all events can be manually triggered, regardless of the trigger they've been assigned. As Randy put it, "It is also important to note that ALL triggers in an Event are considered TRUE (ignored) when manually run." He probably should have added that it is only the conditions that are checked (if you specifically direct HS to check them).

          You are correct, though, that if you do add a manual trigger, then you will need to add (And If) all the conditions to it.
          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


            #6
            Can I confirm? Is "Run Another Event" from an event the same as a manual trigger?

            Comment


              #7
              Originally posted by TC1 View Post

              Randy, so if I'm reading your example correctly, the only way one can test an event's conditional logic on demand (manual trigger) is to logically AND an "OR IF the Event is manually triggered" with the other conditional clauses in the event, correct?
              A bit more clarification: If you want to test Event A's logic by manually triggering it; you should create a 2nd Event B that then calls event A. Event B must have the advanced property “Run only if other event conditions are TRUE” checked.


              I have a lot of scripts that handle conditions right now and I'd like to move away from those to events. This is a part of preparing to move to HS4 and the fact that I'd have to modify a ton of scripts due to the new device model.
              All of my scripts are working after the HS3->HS4 migration; I'm not sure you need to worry about depreciating your scripts but I could be mistaken. At least one event condition was removed/depreciated.


              I have an event that closes a garage door if it's open. It's called from another event that compares garage and outside temperature and then does several things like turn off an exhaust fan and call other events which close each door, if open.

              The event that closes a door if open has the condition IF "manually triggered AND IF "Single Door Reed Switch is not equal to Closed" then "Pulse Single Door Opener Relay". When called from "Run Another Event" the condition of the door being open or closed seems to be ignored.

              Any ideas or suggestions for a workaround?
              This is how I accomplish the same thing; granted this shows HS4 and I'm using a virtual device Gate which can be set to Open or Closed and shows the current state of the gate. I have 5 events that pertain to the gate, 4 of which interact with the virtual device. one event to open if the virtual device changes to open, one to close, one to change the state of the virtual device if the gate is opened manually, one to update the virtual device on manual close, and finally a push notification if the alarm panel doesn't indicate the gate has closed when it's been triggered to do so. I don't bother with a fail to open push notification since I'll either be there watching in person or with the camera pointed at the gate. I also don't have an alarm contact for the full open travel of the gate so if it opened 6" then stalled there would be no way for my alarm panel to know it was not fully open.

              attached is my close event triggered when the virtual device is changed to 'closed'
              Attached Files
              HS4 Pro on Shuttle NC10U, Win10; Z-NET
              Number of Devices: 449
              Number of Events: 210

              Plug-Ins: Arduino, BLLock, DirecTv, EasyTrigger, Honeywell WiFi Thermostat, MeiHarmonyHub, PHLocation2, Pushover 3P, UltraM1G3, WeatherXML, Worx Landroid, Z-Wave

              External applications: Homebridge-homeseer, Geofency, EgiGeoZone.

              Comment


                #8
                Originally posted by kenm View Post
                Can I confirm? Is "Run Another Event" from an event the same as a manual trigger?
                As with all of life. . .it's complicated.
                There are at least two ways to run an event "manually".
                1. One is to run the event as the action of another event. In that case, you can test the event conditions if you indicate that you want the event to run only if the conditions are satisfied.
                2. Another is by pressing the run button on the event in the event list. If you do it that way there is no way to check the effect of the conditions. That only allows you to test the event actions.
                As jmaddox noted, the only way to run an event from the event list and test its conditions is to create another event whose action is to run the event you want to test.

                The "manual" trigger designation, for this situation, is ambiguous and misleading. It was chosen by computer nerds, not linguists, and it's easy to over interpret its meaning. I find it useful to simply think of it as a place holder for an event that doesn't have a real trigger, but which you want to run only from other events. The most confusing part comes from the fact that an event that does have a real, independent trigger can also be run as an event action. When that occurs, the real trigger(s) is/are ignored and the event runs when it is called (unless the event action specifies that the conditions be satisfied, whereupon it is run when called if the event conditions are satisfied). Just to add to the confusion, if the event has several (Or If) triggers, each with different conditions, then running the event as the action of another event if the conditions are satisfied will cause it to run if the set of conditions are satisfied for any of the triggers as rprade noted.

                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


                  #9
                  Thanks All. Good information that I just need to go off, digest, and experiment with, to figure out how I need to set it up.

                  jmaddox - Thanks for the info on scripts. It was my understanding that the device model had changed and the function of setting "device value" wasn't available any longer. I may have misunderstood or it could have been old info. Do you know of any porting guide or "Changes" list that would help with this?

                  I just ordered the new hardware to host HS4 so I'll be able to run both HS3 and HS4 in parallel, if needed.

                  Ken

                  Comment


                    #10
                    Originally posted by kenm View Post
                    Thanks All. Good information that I just need to go off, digest, and experiment with, to figure out how I need to set it up.

                    jmaddox - Thanks for the info on scripts. It was my understanding that the device model had changed and the function of setting "device value" wasn't available any longer. I may have misunderstood or it could have been old info. Do you know of any porting guide or "Changes" list that would help with this?

                    I just ordered the new hardware to host HS4 so I'll be able to run both HS3 and HS4 in parallel, if needed.

                    Ken
                    I don't think there are any changes to the device model, unless I misunderstand I'm setting the device value with no problems. Unfortunately, while there may be a comprehensive list of changes between HS3-HS4 I'm not sure where it might be. In some cases; not all, there is a changelog for each HS4 release, but that list may not be complete.
                    HS4 Pro on Shuttle NC10U, Win10; Z-NET
                    Number of Devices: 449
                    Number of Events: 210

                    Plug-Ins: Arduino, BLLock, DirecTv, EasyTrigger, Honeywell WiFi Thermostat, MeiHarmonyHub, PHLocation2, Pushover 3P, UltraM1G3, WeatherXML, Worx Landroid, Z-Wave

                    External applications: Homebridge-homeseer, Geofency, EgiGeoZone.

                    Comment


                      #11
                      Originally posted by The Profit View Post

                      Yes, conditions are ignored if you run an event from another event, however, click on the red airplane below your action that calls the other event and then put a check mark next to “Run only if other event conditions are TRUE” and it will run as you expect.


                      Sent from my iPad using Tapatalk
                      Thanks rprade That did the trick,

                      jmaddox As soon as I can get an HS4 test platform up and running I can start to experiment. Thanks for the insight.

                      Comment

                      Working...
                      X