Announcement

Collapse
No announcement yet.

Group Conditions

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

    Group Conditions

    This post is a revision of an earlier post as some things have been discovered since it was initially covered. The original thread is here.


    This Condition is not well documented and has some demonstrable quirks, but can be very useful. Everything in this post has been verified by testing. Now for the concept. First we will build a simple event to turn lights On with motion

    Click image for larger version  Name:	Event1.PNG Views:	1 Size:	27.5 KB ID:	1271259

    This simple event will turn the lights on whenever there is motion.

    Click image for larger version  Name:	Event2.PNG Views:	1 Size:	25.5 KB ID:	1271260

    We want to restrict it to when there is low light and only when the house is occupied, so we add a pair of conditions to restrict the actions.

    Click image for larger version  Name:	Event3.PNG Views:	1 Size:	49.3 KB ID:	1271261
    After you have expanded the Group Options section you can add the conditions you want to selectively apply to events within this group. You will notice it says "(Choose a Trigger or Condition)", this is a misstatement, your only choice will be among conditions. Using a trigger as a condition would in almost every case cause an event to fail.

    Click image for larger version  Name:	Event13.PNG Views:	668 Size:	5.9 KB ID:	1271274


    Now that we have established a pair of conditions that will likely apply to all motion controlled lighting, we can add them to the group. Click on the triangle above to expand Group Conditions and add the same two Conditions. The first will begin with "IF" but do not let that confuse you, it is still a Condition. The second will begin with AND IF.

    Click image for larger version  Name:	Event4.PNG Views:	1 Size:	22.3 KB ID:	1271266

    Now that we have duplicated the conditions we can collapse Group Conditions. You will see a exclamation point in a triangle. If you hover over it it will remind yo that the Group Conditions are not assigned to any Event.

    Click image for larger version  Name:	Event5.png Views:	1 Size:	49.6 KB ID:	1271262

    We need to delete the two Conditions from the Event and add a single Condition "The Group Conditions Are..." to the Event

    Click image for larger version  Name:	Event6.png Views:	1 Size:	64.4 KB ID:	1271263

    Then you are presented with two options.

    Quirk #1: The Group Conditions are all TRUE is the only choice that works. The Group Conditions are all FALSE does not work as you would expect. The way it actually functions is IF ANY OF THE GROUP CONDITIONS ARE FALSE. It could actually be better worded “The group Conditions are NOT all TRUE”. Keep this in mind and the choice can be useful.


    Click image for larger version  Name:	Event7.png Views:	1 Size:	35.1 KB ID:	1271264

    Here we will choose The Group Conditions are all TRUE. Now the Event will only run when the Low Light Device is On and the Occupancy Device Is Home. You will also note that there is now a green checkmark beside Group Conditions are applied to at least one Event.

    Click image for larger version  Name:	Event8.PNG Views:	1 Size:	38.3 KB ID:	1271265

    Here are the takeaways:
    • Group Conditions must be applied to each Event individually. They are NOT applied to an Event unless specifically added as a Condition. They will not apply to ANY Event that does not include them.
    • Each group you define within your events can have different group conditions and each event within a group can have the conditions selectively evaluated and applied.
    • An advantage to Group Conditions is that you can make a change to the group conditions and affect a large number of events.
    • If the list of conditions to be applied is two or more and will apply to a number of Events, Group Conditions can save some time and may remove clutter from your events. For a single Condition it is just as easy to apply it to each Event, rather than making it a Group Condition
    • The choice of "The Group Conditions are all TRUE" works exactly as it should. If ALL Group Conditions are TRUE, the Condition is TRUE. If ANY of the Group Conditions are FALSE the Condition is FALSE
    • The choice of "The Group Conditions are all FALSE" does not work as it reads. If ALL Group Conditions are TRUE, the Condition is FALSE, but if ANY of the Group Conditions are FALSE, the Condition is TRUE. It should read "IF any Group Condition is FALSE...". If you remember how it actually works there are good use cases for the choice.

    Quirk #2: It is possible to change a Group Condition to OR IF. Choosing this is not always intuitive, but it can be done. It can be done only on a single condition, by first adding it as an AND IF and changing it to OR IF. It will only work for One of the Conditions. This behavior is so inconsistent that it is not recommended and it can be accomplished by other means, but it will be explained for those who want to try it.

    First we will delete the Occupancy Condition and replace it with "The Time is Nighttime"

    Click image for larger version  Name:	Event9.PNG Views:	1 Size:	15.4 KB ID:	1271267Then we will expand the second Condition and change it to OR IF

    Click image for larger version  Name:	Event10.png Views:	1 Size:	15.8 KB ID:	1271268

    The two Conditions will now be separated by a bit of blank space

    Click image for larger version  Name:	Event11.PNG Views:	1 Size:	16.2 KB ID:	1271269

    Now the Event will Evaluate the Group Conditions individually and if either is TRUE the Event will run. In this case the lights will come on with motion if it is EITHER Low Light or Nighttime. While this might be useful, it is functionally equivalent to the following. In either case the lights will be turned On with motion when there is Low Light or if it is Nighttime.

    Click image for larger version  Name:	Event12.PNG Views:	1 Size:	46.6 KB ID:	1271270

    Quirk #3: 3rd party (plug-in) Conditions will not work as Group Conditions. While they may be included in the dropdown of choices, they may not populate and even if they do, they probably will not work. For this reason, stick to native HomeSeer Conditions.

    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    #2
    Thanks for this post, Randy. It was very timely since I was trying to figure out why my group conditions had no effect. They should work now.

    - Robert

    Comment


      #3
      Randy,
      I just wanted to thank you for the excellent work you've done on this topic. I must say that the explanations are very good and well structured, which makes it easier to understand. I have learned a lot from your explanations and I honestly think it should be a must read for everyone.

      Comment


        #4
        +5 As I've been told recently this group thingy will make a difference the the machine speed..............

        need more like this.... to speed up the system vs bogging down the CPU ....

        it would be great to have a new training series aimed at making the system run at the fastest possible speed ..... as my system grow it has grown painfully slow.. I'm having to research and relook at what to do to the event triggers and event actions to speed up the process...

        Devoir

        Comment


          #5
          Trying to do an event with "AND IF" conditions set in HS4. When I run this event, the "AND IF" condition is ignored regardless of the "GarageStatus" value, and the event runs the Action anyways.

          Click image for larger version

Name:	Capture4.jpg
Views:	406
Size:	21.5 KB
ID:	1541953
          The purpose of this "AND IF" is to NOT open the garage door if it's already closed - the OMNI button doesn't know the status, and doesn't care, it just opens/closes the garage door upon activation.

          Are the Boolean functions broken in HS4, or am I missing something?

          Comment


            #6
            Originally posted by sj0s View Post
            Trying to do an event with "AND IF" conditions set in HS4. When I run this event, the "AND IF" condition is ignored regardless of the "GarageStatus" value, and the event runs the Action anyways.

            Click image for larger version

Name:	Capture4.jpg
Views:	406
Size:	21.5 KB
ID:	1541953
            The purpose of this "AND IF" is to NOT open the garage door if it's already closed - the OMNI button doesn't know the status, and doesn't care, it just opens/closes the garage door upon activation.

            Are the Boolean functions broken in HS4, or am I missing something?
            How are you triggering the event? The manual run icon on the events page skips the triggers and conditions and just runs the actions.
            -Wade

            Comment


              #7
              Correct, manually triggered event bypass all trigger and IF's. The event has to be triggered by something in an IF statement

              Comment


                #8
                Originally posted by sj0s View Post
                Trying to do an event with "AND IF" conditions set in HS4. When I run this event, the "AND IF" condition is ignored regardless of the "GarageStatus" value, and the event runs the Action anyways.

                Click image for larger version  Name:	Capture4.jpg Views:	0 Size:	21.5 KB ID:	1541953
                The purpose of this "AND IF" is to NOT open the garage door if it's already closed - the OMNI button doesn't know the status, and doesn't care, it just opens/closes the garage door upon activation.

                Are the Boolean functions broken in HS4, or am I missing something?
                As Wade wrote, conditions on a manually run Event are ignored in all but one case. They will only be honored when called from another Event and specifically directed to observe the Conditions. Read this post.

                From the post:

                "It is very important to remember Conditions are ALWAYS ignored when an event is run from HSTouch, IFTTT, Google Home, Echo or manually triggered from the "Run" button. It is also important to note that any event run from any means other than self triggering will ignore the Trigger."
                HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                Comment


                  #9
                  Originally posted by George View Post
                  Correct, manually triggered event bypass all trigger and IF's. The event has to be triggered by something in an IF statement
                  Unless called from another Event with "Check conditions on target event" checked in the calling Event.,
                  HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    #10
                    Originally posted by randy View Post
                    Unless called from another Event with "Check conditions on target event" checked in the calling Event.,
                    Yup, good to know, thanks

                    Comment


                      #11
                      Well.. Round and round I guess. Thank you all for pointing out that I was indeed missing something. However, manually triggering should bool with conditions. Now to set up a dummy event to trigger the actual event. ... :/

                      Thanks for the info and apologize for being a n00b.

                      Comment


                        #12
                        I think a few of us also got reminded of a feature. No question is too simple.

                        Comment


                          #13
                          Originally posted by sj0s View Post
                          Well.. Round and round I guess. Thank you all for pointing out that I was indeed missing something. However, manually triggering should bool with conditions. Now to set up a dummy event to trigger the actual event. ... :/

                          Thanks for the info and apologize for being a n00b.
                          sj0s Many of us have been bit in the butt by that one. Welcome to the family.
                          "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

                          Comment


                            #14
                            Set up 2 new dummy devices to turn on via Alexa, then trigger the events when devices turn on, then two new events to turn the devices off afterward worked the trick and I'm good. Lots more than I expected to do, but the gymnastics aren't easy. Thank you again for the replies and direction pointing. I'm sure there's a more elegant way of doing this, so I'll see if I can kludge something better out. If I do, I post the results here.

                            Comment

                            Working...
                            X