Announcement

Collapse
No announcement yet.

IF-THEN-ELSE Action

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

    #46
    Originally posted by simonmason View Post
    spud Hopefully you have the energy to revisit this. It would be a life saver. I am running mostly on HS3 - I have HS4 running on another machine but don't really have the 6 months needed to invest to move to it completely.
    Why would you need 6 months to move to HS4? Pretty much everything works moving from HS3 to HS4 except that HS4 easily corrupts the database which could possibly cost you more than 6 months but they now have backup solutions. +1 on the if-then-else

    Comment


      #47
      To begin with I have several plugins that don't work in HS4 so need to find solutions for those or write something to replace them. Second, I have a lot of scripts that I know won't work out of the box (based on what I read in the forums) so will have to work on each of these one by one to fix them. Third, when converting to HS3 it took months to get everything working so I assume this will be 2X. One of these days I will be brave enough to give it a shot.

      Comment


        #48
        Originally posted by simonmason View Post
        It would be ideal for a lot of my events to be able to set devices only if they are not already at the state I am about to set them to?
        Is this what you're asking about?

        Click image for larger version

Name:	Capture.JPG
Views:	331
Size:	52.6 KB
ID:	1532846
        It's available with Set Device to Expression and Set Group of Devices to Expression.
        -Wade

        Comment


          #49
          Frankly, I am not familiar with "Send command only..." but it seems to me this is preventing a value from being set if it doesn't change (is the same). This is important because you can trigger events either when a value is set even if it's the same value or if a value changes. So the way I understand this is that EasyTrigger doesn't even set the value if it doesn't result in a change. What the 'if-then-else' or conditional events are really about is "Do Action x" "if device y meets this condition".

          Comment


            #50
            Originally posted by mulu View Post
            Frankly, I am not familiar with "Send command only..." but it seems to me this is preventing a value from being set if it doesn't change (is the same). This is important because you can trigger events either when a value is set even if it's the same value or if a value changes. So the way I understand this is that EasyTrigger doesn't even set the value if it doesn't result in a change. What the 'if-then-else' or conditional events are really about is "Do Action x" "if device y meets this condition".
            Please don't call me Frankly. I was responding to the part of simonmason's post that I quoted in my reply. Spud added the "Send only..." option after I and others requested it to reduce z-wave traffic when sending a command to a large group of devices. In my case, when sending an off command to many devices (75+) such as at bedtime, there were significant delays and frequent missed commands. Since only a handful actually needed to be commanded off at any given time, this option fixed the problem. I realize this is only a specific condition added to certain types of actions, but it may address the stated need.
            -Wade

            Comment


              #51
              Is this only HS4?

              Comment


                #52
                Originally posted by Wade View Post

                Please don't call me Frankly. I was responding to the part of simonmason's post that I quoted in my reply. Spud added the "Send only..." option after I and others requested it to reduce z-wave traffic when sending a command to a large group of devices. In my case, when sending an off command to many devices (75+) such as at bedtime, there were significant delays and frequent missed commands. Since only a handful actually needed to be commanded off at any given time, this option fixed the problem. I realize this is only a specific condition added to certain types of actions, but it may address the stated need.
                Sorry, I missed the quote. My thoughts were just on the if-then-else.

                Comment


                  #53
                  Originally posted by simonmason View Post
                  Is this only HS4?
                  It's EasyTrigger. There's not a HS4 version, although the HS3 version works fine under HS4.
                  -Wade

                  Comment


                    #54
                    Originally posted by simonmason View Post
                    Is this only HS4?
                    EasyTrigger is only HS3 but also works on HS4. The most annoying thing about EasyTrigger is that it has like 10 entries for events. If every plugin would do this you would end up with a list of like 100+ options. Otherwise, EasyTrigger is one of those very few plugins everybody should have. I just wish we would get this if-then-else or some variation of it since HS doesn't do it.

                    Comment


                      #55
                      Ok, I've been lurking but curious how anyone would use an IF-THEN-ELSE in an event being the IF is a trigger

                      So,

                      If you put an Else statement as a result of an IF (In other words it didn't trigger) wouldn't the ELSE just be continuously firing??

                      If time is 12:00am
                      Then Turn on the light
                      Else Turn off the light

                      So if it's not exactly 12am HS would turn off the light every second..

                      Even ANDIF's and ORIF's would result in the event being triggered or not, so the ELSE would always be true every second wouldn't it?

                      Can someone come up with a case use of how an ELSE can be use in conjunction with an triggering IF statement with a valid even example?

                      Now if you mean embedded IF's inside an already triggered event, isn't that what scripting and the complex logic it provides all about?

                      Comment


                        #56
                        Originally posted by George View Post
                        Ok, I've been lurking but curious how anyone would use an IF-THEN-ELSE in an event being the IF is a trigger

                        So,

                        If you put an Else statement as a result of an IF (In other words it didn't trigger) wouldn't the ELSE just be continuously firing??

                        If time is 12:00am
                        Then Turn on the light
                        Else Turn off the light

                        So if it's not exactly 12am HS would turn off the light every second..

                        Even ANDIF's and ORIF's would result in the event being triggered or not, so the ELSE would always be true every second wouldn't it?

                        Can someone come up with a case use of how an ELSE can be use in conjunction with an triggering IF statement with a valid even example?

                        Now if you mean embedded IF's inside an already triggered event, isn't that what scripting and the complex logic it provides all about?
                        My thoughts exactly. I think that's why the native HS event engine does not have ELSE built in to it. It would be too easy to make a mistake that result in a flood of events being triggered.

                        The only way I can see it working is like you say embedded IFs, i.e. multiple conditions must be met:

                        IF time is 12:00am THEN
                        ...........IF device x value = y THEN do this ELSE do that ENDIF
                        ENDIF

                        The initial trigger is time, the THEN/ELSE decision is based on the value of device x. So if the time is not 12:00am the event does not meet the conditions and neither THEN or ELSE happen. If the time is 12:00am the the THEN/ELSE action is determined by the value of device x.

                        IF/THEN, AND/NAND, OR/NOR logic can be very confusing at times. I think HS made the right decision to not provide ELSE. Like you say if you that level complexity in events then it's probably best to use a script.
                        iCore5 Win 10 Pro x64 SSD

                        HS3 Pro Edition 3.0.0.435 Windows

                        BLOccupied:,Device History:,Yamaha:,UltraMon3:,mcsXap:,Restart:,UltraNetatmo3:, UltraM1G3:,Ultra1Wire3:,BLBackup:,Harmony Hub:,DoorBird:,UltraECM3:,Nanoleaf 3P:,UltraRachio3:,Z-Wave:,SDJ-Health:,BLGarbage:,Blue-Iris:,Chromecast:,Pushover 3P:,EasyTrigger:

                        Comment


                          #57
                          Originally posted by George View Post
                          Ok, I've been lurking but curious how anyone would use an IF-THEN-ELSE in an event being the IF is a trigger

                          So,

                          If you put an Else statement as a result of an IF (In other words it didn't trigger) wouldn't the ELSE just be continuously firing??

                          If time is 12:00am
                          Then Turn on the light
                          Else Turn off the light

                          So if it's not exactly 12am HS would turn off the light every second..

                          Even ANDIF's and ORIF's would result in the event being triggered or not, so the ELSE would always be true every second wouldn't it?

                          Can someone come up with a case use of how an ELSE can be use in conjunction with an triggering IF statement with a valid even example?

                          Now if you mean embedded IF's inside an already triggered event, isn't that what scripting and the complex logic it provides all about?
                          Please see post #15 https://forums.homeseer.com/forum/ul...71#post1278771 The if-then-else in EasyTrigger would be a condition, not a trigger. So you have some kind of trigger and then based on certain conditions you execute one action or another or another. So the concept is the same as the conditional actions that HS told us they will implement in HS4. I am not quite sure which way is better. The if-then-else if-else from EasyTrigger is easier a pretty good concept but the conditional actions from HS sounds pretty good, too. I think the later has some more flexibility because you can still have actions that will always execute and then you have some actions that will only execute if some conditions are met. This stuff is actually quite powerful.

                          As for scripting, sure you can do this but now you are asking people to learn a .NET language, knowing all the stuff to include, knowing how to read decipher debug files when things don't work (and they won't from the get-go). HS is for advanced home automation people (and more and more 'regular' folks which is a good thing) but scripting should be left for really hardcore users. I have written some scripts but I try to avoid them as much as I can because neither my wife nor my son could be bothered fixing those scripts if they break.

                          Comment


                            #58
                            Maybe people need to open a service ticket to get this implemented. It was already in the development plan anyways

                            https://dev.homeseer.com/servicedesk/customer/portals

                            Comment


                              #59
                              Originally posted by mulu View Post


                              As for scripting, sure you can do this but now you are asking people to learn a .NET language, knowing all the stuff to include, knowing how to read decipher debug files when things don't work (and they won't from the get-go). HS is for advanced home automation people (and more and more 'regular' folks which is a good thing) but scripting should be left for really hardcore users. I have written some scripts but I try to avoid them as much as I can because neither my wife nor my son could be bothered fixing those scripts if they break.
                              For sure,

                              I'm not questioning the ability to add greater flexibility but it has to be balanced against the probability of significantly increasing the technical support load on HST because of the point mentioned above. Unintended actions or triggers on complex events.

                              As for scripting, I agree that the current state of the scripting documentation and examples are a severe mess and totally lacking.
                              Your example of what to include, what the statements are is a very valid point.

                              If the scripting functions were detailed as they were in HS1. There was/is a very well thought and laid out of all the function and more importantly for each and every function call there was a complete snippet example of how to use it. So the issue of what to add, how to encapsulate it a function you wanted to perform was a non-issue. This in contrast to the sparse or non-existent documentation currently provided which is basically just the Function or Object declaration statement with no narrative as to what it addresses, what each of the parameters do and more importantly an real example of how to use it.

                              Just saying. CAPI.Control(Stuff,"Crap",True,0,False,Sigmund is NOT documentation! What the heck are the trues, false's and more importantly what are the implications of setting something true or false.

                              I believe that is a major reason for the drop in institutional user knowledge, sharing and advancement of the user base with many of the gifted coders that have either moved on or simply lost interest in helping people. Lot of time to code, not a lot of time to go back and do or fix the documentation. Why bother to do documentation when you can just code more stuff and make it more complex ??????

                              Comment


                                #60
                                I am running HS4 but it keeps on telling me that EasyTrigger is not licensed and not active. I try to register with HS3 version but it says wrong version.

                                Comment

                                Working...
                                X