Announcement

Collapse
No announcement yet.

How to test multiple flags?

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

    How to test multiple flags?

    I have an event that I want to fire when my alarm goes to disarm. Then I want it to check the states of various flags and do an action based on that flag being set or not. Not sure the best way to do this.

    Example

    If Alarm goes Disarm
    Then
    If Flag A is Set Then do X
    If Flag B is Set Then do Y
    If Flag C is Set Then do Z
    Etc....
    -Tim

    HSPro - 3.XXX - Dell mini W7 x32
    Way2 Call
    Elk M1 Gold
    UPB HAI switches
    HAI RC2000 Thermostat

    #2
    As far as I could see you got two options, one is three (or however many) events for flags a/b/c (the main trigger is disarm and the condition is flags a/b/c) and three sets of actions. The other option is a script that is run on the event, inside that script (depending on what the action is) you decide whether the condition is met and which action to take.

    Comment


      #3
      How to test multiple flags?

      No!! Not scripting! lol

      Actually I have 8 devices to test against. Maybe more. If a flag is set, I want a relay to activate. If the flag is off, I want a relay to deactivate.

      I was hoping a group action could do this.


      Sent from my iPhone using Tapatalk
      -Tim

      HSPro - 3.XXX - Dell mini W7 x32
      Way2 Call
      Elk M1 Gold
      UPB HAI switches
      HAI RC2000 Thermostat

      Comment


        #4
        While I'm not precisely sure what flags are I'm assuming that they are some sort of variable in your alarm panel that mine doesn't have. That being said, I would make one event for every flag that is manually triggered and has the desired actions. Then I'd make one master event that is triggered on the system being disarmed that in turn runs all of the other events. This is a bit of work to set up but the log will be able to show you exactly which event ran so you'll have a clear idea of what's going on.
        Originally posted by rprade
        There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

        Comment


          #5
          How to test multiple flags?

          I just made some devices that I'm calling flags.

          I see how this would work. Thanks. I was hoping for something more streamlined. It would be great to have nested if/then/else logic. My 15 year old stargate could. But I digress [emoji3]


          Sent from my iPhone using Tapatalk
          -Tim

          HSPro - 3.XXX - Dell mini W7 x32
          Way2 Call
          Elk M1 Gold
          UPB HAI switches
          HAI RC2000 Thermostat

          Comment


            #6
            Originally posted by email68 View Post
            I just made some devices that I'm calling flags.

            I see how this would work. Thanks. I was hoping for something more streamlined. It would be great to have nested if/then/else logic. My 15 year old stargate could. But I digress [emoji3]


            Sent from my iPhone using Tapatalk

            That kind of nested logic would be pretty cool. And ELSE to go along with the THEN. It has been discussed many times. It all boils down to the fact that running events from other events lets you clearly see what's going on in the log. So while it is more work to set up it's easier to troubleshoot and generally just get useful information from the log. Rich had a open "show me how an ELSE would be useful" and nobody could come up with anything aside from it making event creation easier but at the expense of logging.
            Originally posted by rprade
            There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

            Comment


              #7
              I guess overcoming my laziness will be rewarded with better logs. lol

              Seriously though, I hadn't considered that. Thanks for pointing it out.


              Sent from my iPhone using Tapatalk
              -Tim

              HSPro - 3.XXX - Dell mini W7 x32
              Way2 Call
              Elk M1 Gold
              UPB HAI switches
              HAI RC2000 Thermostat

              Comment


                #8
                In your master event don't forget to check the box "only run if other event conditions are true" for each run another event action or else the child events will run no matter what their conditions are.
                Originally posted by rprade
                There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

                Comment

                Working...
                X