Announcement

Collapse
No announcement yet.

Event Logic broken with HS-WD200+ Switch!

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

    Event Logic broken with HS-WD200+ Switch!

    I have an event defined thusly:


    IF Room Area Lights has been Off for at least 1s
    Then
    Set Device Room Area Lights to Off


    This event should do absolutely nothing when triggered, so long as the light has been on for more than a second, yet it turns my lights off every time I trigger it! I also tried this variation:


    IF Room Area Lights was set and has a value equal to Off
    Then
    Set Device Room Area Lights to Off


    Again, this should do nothing. Yet, it turns my lights off every time I trigger it, regardless of the light's state! I have varied the IF statement, and I have yet to find any combination that results in the THEN action not being invoked! The IF statement always seems to evaluate to TRUE regardless of the light's state.

    Check out this crazy log:

    Feb-22 4:25:07 PM Z-Wave Device: Room Area Lights Set to 0
    Feb-22 4:25:07 PM Device Control Device: Room Area Lights to Off (0)
    Feb-22 4:25:07 PM Event Event Trigger "Test Events WD200-Test"
    Feb-22 4:25:07 PM Event Event Test Events WD200-Test triggered by the event page 'Run' button.
    Feb-22 4:25:01 PM Z-Wave Device: Room Area Lights Set to 99
    Feb-22 4:25:01 PM Device Control Device: Room Area Lights to On (99) by/from: CAPI Control Handler

    What am I doing wrong?

    #2
    The event trigger (IF statement) is overriden by manually running the event. I.e., the trigger is irrelevant because the event was triggered in another fashion. Also, and less intuitive, HS ignores conditions (AND IF statements) when an event is manually triggered.
    -Wade

    Comment


      #3
      Ok. I rewrote it as follows:


      IF This event is MANUALLY triggered
      AND IF Room Area Lights has a value equal to Off
      Then
      Set Device Room Area Lights to Off


      And set the event to be triggered by another event, a Z-Wave Scene selection in this case, and the same thing happens. The second IF component is completely ignored.

      Also tried this:


      IF Room Area Remote-01-Scene had its value set to Scene 003 Key Pressed 1 Time
      AND IF Room Area Lights has a value equal to Off
      Then
      Set Device Room Area Lights to Off

      Same result. The "IF Room Area Lights has a value equal to Off" conditional is completely ignored.

      Comment


        #4
        Originally posted by tinnov View Post
        Ok. I rewrote it as follows:

        IF This event is MANUALLY triggered
        AND IF Room Area Lights has a value equal to Off
        Then
        Set Device Room Area Lights to Off

        And set the event to be triggered by another event, a Z-Wave Scene selection in this case, and the same thing happens. The second IF component is completely ignored.
        You'll need to check the box "Run only if other event conditions are true". You may need to click the red airplane icon to see that advanced option.

        Originally posted by tinnov View Post

        Also tried this:

        IF Room Area Remote-01-Scene had its value set to Scene 003 Key Pressed 1 Time
        AND IF Room Area Lights has a value equal to Off
        Then
        Set Device Room Area Lights to Off

        Same result. The "IF Room Area Lights has a value equal to Off" conditional is completely ignored.
        The problem isn't obvious. Is Room Area Lights in the condition a virtual device, and Device Room Area Lights in the action a separate virtual device/switch? Post an image of your event and describe what you're trying to accomplish.
        -Wade

        Comment


          #5
          "Room Areas Lights" is the HS-WD200+ dimmer.

          I want to press the button on my remote "Room Area Remote-01-Scene" and have it invert the state of the light. If the light is on, turn it off, if it's off, turn it on. But with seemingly broken AND IF logic, and No ELSE support, I'm not seeing any way to do this short of learning VB Script.
          Last edited by tinnov; February 23, 2019, 02:44 PM. Reason: EDIT: Corrected typos.

          Comment


            #6
            Originally posted by tinnov View Post
            "Room Areas Lights" is the HS-WD200+ dimmer.

            I want to press the button on my remote "Room Area Remote-01-Scene" and have it invert the state of the light. If the light is on, turn it off, if it's off, turn it on. But with seemingly broken AND IF logic, and No ELSE support, I'm not seeing any way to do this short of learning VB Script.
            Try this. Two events.

            IF remote button is pressed
            AND IF light is on
            THEN turn light off

            IF remote button is pressed
            AND IF light is off
            THEN turn light on
            -Wade

            Comment


              #7
              For your trigger you'll want to use IF "This device just had its value set or changed" since the value won't necessarily change each time the scene is activated.
              -Wade

              Comment


                #8
                Ok. I set it up like this:

                IF Room Area Remote-01-Scene had its value set to Scene 003 Key Pressed 1 Time
                AND IF Room Areas Lights has a value equal to Off
                Then Set Device Room Areas Lights to On

                IF Room Area Remote-01-Scene had its value set to Scene 003 Key Pressed 1 Time
                AND IF Room Areas Lights has a value equal to On
                Then Set Device Room Areas Lights to Off

                The button turns the lights on, and then it does nothing else. Additional button-presses have no effect.

                Comment


                  #9
                  Ok, turns out that does indeed work. There was a conflicting Event elsewhere.

                  Comment


                    #10
                    So, let's make it a little more complicated. Initially what I wanted was this:

                    If any light in the room is on, then a button press should turn them all off.
                    If all lights in the room are off, then a button press should turn a specific one on.

                    I don't know how to extend the above simple event chain to do this without ELSE constructs.

                    Thoughts?

                    Comment


                      #11
                      You'll probably want to look into spud's EasyTrigger plugin. It handles groups nicely and gives conditions such as AND IF Any Device in Group has a value of XX, etc. It also does a hundred or so other things.

                      You would set up an easytrigger group containing the lights do something like this.

                      Event 1

                      IF button is pressed
                      AND IF Any device in Light Group is on ( >0 )
                      THEN Set the lights to off


                      Event 2

                      IF button is pressed
                      AND IF All devices in Light Group are off ( =0 )
                      THEN Set a particular light to on
                      -Wade

                      Comment


                        #12
                        Ok.... How do I call event 1 and event 2? I set them up to be called sequentially when the button is pressed, unfortunately, the event 1 makes the IF section of the event 2 true, so they both fire if event 1 is true.

                        Comment


                          #13
                          Originally posted by tinnov View Post
                          Ok.... How do I call event 1 and event 2? I set them up to be called sequentially when the button is pressed, unfortunately, the event 1 makes the IF section of the event 2 true, so they both fire if event 1 is true.
                          Leave them as 2 independent events. Only 1 will evaluate as true with 1 button press.
                          -Wade

                          Comment

                          Working...
                          X