Announcement

Collapse
No announcement yet.

New Conditional Processing - A good first step - however......

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

    New Conditional Processing - A good first step - however......

    Just upgraded to 4.2.18.3 -- went smoothly and so far is working. It's only been 2 hours, so time will tell. Looks good though.
    Was looking at the conditional processing and maybe I'm missing something --
    I need a trigger for activating lights on holidays such as Thanksgiving or July 4th. I thought that the new release would give me an opportunity to consolidate and simplify my event for activating a holiday schedule which basically says - it the event is manually triggered (by a dusk event) and the date is a holiday (july 4th or what ever) then the action at the bottom of the event would run. I have 15 or so of these holiday and weekend checks. I thought or maybe wish that there was a way to add a new "OR IF" to the conditional processing. In this way, the event would read -- If it's manually run and the date is July 4th, or the date is October 31st etc, then execute the action at the bottom of the event. As it stands, the only way I can see to use the new conditional processing is as depicted below. Am I missing something or is there a better way? If not, then I'm not quite seeing the value in reprogramming my old events to this format. It does, however, give an opportunity to do different actions based on the holiday -- but for now, I'm just looking for the basics -- weekends and holidays. Anyone have any ideas? Maybe an OR IF will be coming? That would really be helpful.
    Click image for larger version

Name:	ConditionalProcess.jpg
Views:	146
Size:	59.2 KB
ID:	1598413

    #2
    I agree, OR would be a great addition to the conditional processing.

    Comment


      #3
      According to HST “Or If” for Conditions is planned for the future. They are shaking out one major change at a time and Conditional Actions are not yet fully fleshed out. For now two Conditional Actions will effectively comprise an Or If. The only thing an Or If would facilitate is eliminating entering of Actions again if the same Action is called by the condition being either true or false. Otherwise it doesn’t offer any other value as far as I can see. I do feel like it would be a valuable addition, but it won’t really affect but a handful of my Events.
      HS4 Pro, 4.2.18.3 Windows 10 pro, Supermicro LP Xeon

      Comment


        #4
        I had the same question, so I asked HS (Matt) about adding an OR IF, and was told it was "Not needed" just use additional conditional actions, as you've done. Hopefully he was "mistaken"..

        Other than being a bit more difficult to read (for me), it does work, especially if you call another Event like you did (rather than enter all of the actions multiple times).
        Overall, it IS a good step up, though I was hoping for it to act more like a normal IF/ELSE IF/ELSE, and the Exit Event reminds me too much of the old "Jump/Goto To" style of coding

        To be fair, there is some "Old dog, new tricks" occurring, so I'm sure I'll survive..​

        Comment


          #5
          Matt may feel it is “Not Needed”, but as far as I have heard, that is not consistent with the devs plans. I’m not sure it is “needed”, but it just makes sense to offer it.
          HS4 Pro, 4.2.18.3 Windows 10 pro, Supermicro LP Xeon

          Comment


            #6
            I agree with Matt -- the OR IF might not be a huge win. HOWEVER, imagine that use case with a SWITCH/CASE construct:

            If dusk
            Then
            Switch 'date'
            CASE: Last Monday of May
            Then xxx
            CASE: 7/4/Y
            Then xxx​
            CASE: First Monday of September
            Then xxx

            Much clearer and with proper indenting, you could remove the THEN line and just go into the action block potentially...

            Comment


              #7
              He probably just missed the memo

              Comment


                #8
                Originally posted by vasrc View Post
                Overall, it IS a good step up, though I was hoping for it to act more like a normal IF/ELSE IF/ELSE​
                Once again, I’m not sure how that works. An Else would be any time an IF is False.

                A Trigger of If the time is… could not have an else. Most triggers would not work with an else. If a device is set and has a value of… could have an Else if the choices are binary, but would likely not work on a multiple value device. Even on a Binary device, what would be the else to this device had its value set to On? If it is set to Off, Not On. Does it require the device is set to not equal On?.

                For Conditions you could have
                IF the device is On
                THEN Actions

                ELSE
                THEN Actions

                This would work, but could be

                IF the device is On
                THEN Actions

                OR IF the device is Off
                THEN Actions​



                HS4 Pro, 4.2.18.3 Windows 10 pro, Supermicro LP Xeon

                Comment


                  #9
                  Originally posted by ecetron View Post
                  I agree with Matt -- the OR IF might not be a huge win. HOWEVER, imagine that use case with a SWITCH/CASE construct:

                  If dusk
                  Then
                  Switch 'date'
                  CASE: Last Monday of May
                  Then xxx
                  CASE: 7/4/Y
                  Then xxx​
                  CASE: First Monday of September
                  Then xxx

                  Much clearer and with proper indenting, you could remove the THEN line and just go into the action block potentially...

                  So you would advocate completely changing the verbiage and structure of Events? Does your method make it easier for new users to learn?

                  Why is it easier or clearer than:

                  Click image for larger version  Name:	image.png Views:	0 Size:	74.1 KB ID:	1598439
                  HS4 Pro, 4.2.18.3 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    #10
                    It is under the covers likely identical -- but it is easier to visualize and code. Remember, HS can't be just for those of us already here. It has to market to another whole generation who are visual and not very attune to 'programming' ... Us old-timers think if-then-else -- many of the next generation thinks Switch/Case constructs. And don't get me started about the new kids on the block who sit in adjacent cubes collaborating via Text Messages instead of turning to actually SPEAK to their colleague..

                    Comment


                      #11
                      Originally posted by ecetron View Post
                      It is under the covers likely identical -- but it is easier to visualize and code. Remember, HS can't be just for those of us already here. It has to market to another whole generation who are visual and not very attune to 'programming' ... Us old-timers think if-then-else -- many of the next generation thinks Switch/Case constructs. And don't get me started about the new kids on the block who sit in adjacent cubes collaborating via Text Messages instead of turning to actually SPEAK to their colleague..
                      You kind of contradicted yourself when you stated
                      market to another whole generation who are visual and not very attune to 'programming'
                      I've never met a non-programmer that thinks in Switch/Case constructs, which is very programmatic terminology. For an everyday person, language such as "If this happens then this should happen" seems like a more natural/intuitive thing.

                      And if they are truly visual as you say, then the indentation HS4 has provided is a pretty good start.

                      Of course, like everyone here, just my opinion based on no scientific evidence*

                      *YMMV. Objects are larger than they appear. If your For Loop continues for more than 3 hours then see a doctor immediately.

                      Comment


                        #12
                        I'm guessing the non-programmer/appliance users wouldn't understand what the difference is between the two methods. I do agree that it needs to be visual.

                        I thinking that HS probably has two general types of users, programmers/tech/DIYers and appliance users. I'd also guess that the majority of users now are on the tech/programmer side and that there's very little growth in that direction for HS. So making it more user friendly for non-programmers is where they need to go if they want to increase sales/size (which would benefit every type of user). That will take some serious work if that's the direction they want to go however. Conditional Events is a good start.

                        *Personally, 'Conditional' Events are nice, but I don't see my using them that often.. I prefer a script if it's anything complex. Sure it's seems nice to group related individual events into one+ event(s), but does it run better/faster than all of my separate existing events?

                        But HS already has my $$, unless they go subscription

                        Comment


                          #13
                          Originally posted by vasrc View Post
                          does it run better/faster than all of my separate existing events?
                          No!

                          HS4 Pro, 4.2.18.3 Windows 10 pro, Supermicro LP Xeon

                          Comment


                            #14
                            Originally posted by Airtog View Post
                            I need a trigger for activating lights on holidays such as Thanksgiving or July 4th.
                            for this specific use case, have a look at:

                            https://forums.homeseer.com/forum/3r...and-homeseer-4
                            ​​​​​
                            HS4, HSTouch Designer, ESP based devices and sensors, Tasmota, OpenMQTTGateway, RTL433, DIY ground plane antenna, BlueIris + LAN cams, USB-UIRT, ATON DLA amp, WACUP, Multiple Android tablets for control.
                            Plug-Ins Enabled: Restart:,EnvCan:,EasyTrigger:,CM15A:,BLUSBUIRT:, BLLAN:,BLBackup:,Pushover 3P:,mcsMQTT + multiple Jon00 tools

                            Comment

                            Working...
                            X