Announcement

Collapse
No announcement yet.

And If question

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

  • And If question

    I have an event to turn on water fountain. I have a question to see if I mis-understood how the "AND IF" trigger occurs


    It's still cold in the mornings below 40' F when the sun rises.....

    My Question: Is this a one time trigger that equals sunrise + >40'F or....... if it's after sunrise and the temperature is above 40 it will trigger any time during the day?

    Many thanks for your assistance.

    Devoir
    Attached Files

  • #2
    It'll only trigger exactly at sunrise as you have an offset of 0. I would trigger on the temperature becoming above 40 and then use after sunrise as a condition (AND IF). Sunrise as a trigger only happens once per day, so right now it will only turn on the pump on weekend days if it's above 40 right at sunrise. AND IF is a condition, not a trigger.
    HS 3.0.0.532: 1963 Devices 1141 Events
    Z-Wave 3.0.1.261: 122 Nodes on one Z-Net

    Comment


    • #3
      Here's how I would structure it (I use a light in the example rather than your pump). I also use the status of the light/pump as a condition so that it won't trigger over and over as the temperature changes.
      Click image for larger version

Name:	Capture.PNG
Views:	13
Size:	85.9 KB
ID:	1293067
      HS 3.0.0.532: 1963 Devices 1141 Events
      Z-Wave 3.0.1.261: 122 Nodes on one Z-Net

      Comment


      • #4
        Sparkman,

        Many thanks for the support, great example to follow and response....


        I thought the event would continue to run or scan this until the event was true. based on your feedback I wanted to understand when an event is no longer scanned or run.

        Original event

        after sunrise = true ( triggered due to time after sunrise runs only one time)
        temp >40 = false
        Pump=Off
        this event doesn't run or scan again...

        vs

        new event
        temp >40 = false ( this scan continues to run... until the temp is >40 then it evaluates sunrise )
        sunrise = true
        Pump=off







        Sorry for the slow response WAF had me outside working ......


        Devoir

        Comment


        • #5
          You need to break your thought into two parts. First is the trigger that will start the evaluation "if" . 2nd are conditions that are evaluated "and if"

          A trigger is just that a trigger it trips when the specific event happens. Time changes to after sunrise is trigger. Conditions are a current state evaluation.

          So After Sunrise in the If only triggers once as time changes to be after sunrise. And After sunrise in an and if is a condition that is evaluated to see if it is true.

          Sent from my SM-N960U using Tapatalk

          HS3 SEL running Pro Edition 3.0.0.531 on Ubuntu 18.04, mono 5.20, 656 devices, 209 events.
          Plug-Ins: Chromecast, Device History, EasyTrigger, Ecobee, JowiHue, LutronCaseta, MeiUnifi, PHLocation2, Pushover 3P, SDJ-Health, Sonos, WeatherFlow, weatherXML
          Scripts: SparkMan's Lock Event, 5 of Jon00 scripts.

          Comment


          • #6
            drparker many thanks... for your assistance.. I will think about restructuring my event in a different sequence, picking for a trigger that is is the highest importance followed by the remaining "And IF"


            Devoir

            Comment


            • #7
              It's more about selecting a trigger that will allow your event to fire when you want it to be fired.

              At Sunrise is a specific time of day, and thus is only true once a day.

              If temp is above 40 degrees, is a condition that will be continuously evaluated to determine if it's true.


              But with that in mind, it's important to add additional logic to ensure events are not thrown into a continuous loop, notice the 'AND IF Fountain is OFF, then turn fountain ON' logic that Sparkman used. Without that check, as soon as all of your conditions were true, Homeseer would constantly be sending an ON signal to whatever device is controlling that fountain.


              ...v

              Sent from my LGUS997 using Tapatalk



              Comment


              • #8
                Originally posted by sparkman View Post
                Here's how I would structure it (I use a light in the example rather than your pump). I also use the status of the light/pump as a condition so that it won't trigger over and over as the temperature changes.
                Click image for larger version

Name:	Capture.PNG
Views:	13
Size:	85.9 KB
ID:	1293067
                I'm fairly certain that the "was set and has a value greater than" trigger really operates more like "trigger once at the moment the device is set if it has a value greater than" -- in other words, it doesn't re-trigger until it gets set again. As a practical matter, some temperature sensors periodically report their temperature even if the temperature doesn't changes, so each of these is a new "set" event and you'll likely get the result you wanted, but others only report if there is a change of greater than a certain threshold so there may not be additional "set" events if the temperature is stable. Depending on how your sensor operates, you may need a few separate trigger groups each separated by an "OR", these would include both (1) A trigger that occurs at the moment of sunrise (If sunrise and temperature > 40 and etc. etc.) along with a separate trigger (2) If temperature is set and is greater than 40 ....

                Comment


                • #9
                  Another (less ambiguous) way to do this is with a recurring trigger:
                  If this event will automatically trigger every 10 min
                  And If the time is daytime
                  And If the days of the week are Weekend days
                  And If Outdoor Temperature is greater than 40
                  And If waterfall pump has a value equal to Off
                  Then Set Device waterfall pump to On
                  Mike____________________________________________________________ __________________
                  HS3 Pro Edition 3.0.0.548

                  HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

                  Comment


                  • #10
                    thanks everyone for the support / suggestions to test...

                    Devoir

                    Comment

                    Working...
                    X