Announcement

Collapse
No announcement yet.

Triggers - A Counter's Value Is -or- A Timer's Value Is

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

    Triggers - A Counter's Value Is -or- A Timer's Value Is

    A Counter’s Value Is…



    This trigger is full of “gotchas”. Fully half of these triggers can result in an event continually triggering unless limited by conditions or options. All four of these:
    • A counter’s value has exceeded this:
    • A counter’s value has exceeded this or a multiple of this:
    • A counter’s value has exceeded this absolute value:
    • A counter’s value has exceeded this or a multiple of this absolute value:
    If your event resets the counter you are not going to have a runaway, otherwise you need to limit it with Conditions or option.
    Last edited by randy; December 18, 2015, 11:46 AM.
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    #2
    A Timers Value Is



    There are only three choices for timer triggers. They only run forward - a timer always counts up. It can be stopped, restarted (reset and started), set to a value or resumed from where they are stopped. A timer increments by the second and can accumulate to days, hours, minutes and seconds. It is not stated if there is a technical limit to the number of days a timer can run. Timers do persist over a restart. A timer that is running will reflect a value such that it ran even when HomeSeer is down. If it is stopped when HS is shut down the value is retained. Obviously the timer will not respond to the usual start/stop triggers when HS is not running, so it could be way off when HS is restarted, depending on it's state when HS was shut down and for how long. It is not dependent upon the "Enable event catch-up upon power restoration" setting.

    Two of the three choices on this trigger are gotchas. Only A Timers value becomes represents a moment in time and will only trigger once when a timer is running. A Timers Value is less than will continually trigger until the set value is achieved and A Timers Value is more than will trigger continually after the set value is achieved. If the event doesn't set or reset the timer, it should be limited by Conditions or option.Timers always count up in value. A timer trigger can be set for when a timer is equal to, greater than or less than a preset value. The value is set in Days, Hours, Minutes and Seconds.

    After you have selected one of the three choices for the type of Timer trigger, You are given an opportunity to choose or create a new timer. You can select a timer you have already created from a drop down list




    Or you can click on "Create/Edit Timers" where you will be presented with the ability to create a new timer, or you can still select an existing timer from a drop down list.




    If you can click on "Create/Edit Timers" when you have already selected a timer, you will be given an additional choice to change the name of the selected timer. Be cautious of this as it can affect any event or script you have used the timer's name in. It will not affect events that refer to the timer as a trigger or condition as they will all automatically be updated to the new name.




    Like most settings there is an edit icon beside the value(s) to be set.




    Clicking on the icon will present you with a popup to enter the values.




    Each value window other than Days will offer a selection popup of the valid values.




    After you enter the values and click on "Submit" the selection will be completed.



    Last edited by randy; August 9, 2018, 11:39 AM.
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      Question: is there any way to specify a timer to count up instead of down?

      Comment


        #4
        Originally posted by mikedr View Post
        Question: is there any way to specify a timer to count up instead of down?
        Timer's only count up, they do not count down. This will be covered under actions, and I spoke to it under conditions,. Timers can be restarted, resumed, stopped or set, but when they are running, they always count up. I would be curious as to how a timer could be used differently if it was a countdown timer.
        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

        Comment


          #5
          Originally posted by rprade View Post
          Timer's only count up, they do not count down.
          That seems counter intuitive. Typically a counter count's up from 0 with each "count" event and a timer counts down to 0 from a preset time. Not a big deal I guess just not how I would have expected it to work.

          Comment


            #6
            Originally posted by Gunneyk View Post
            That seems counter intuitive. Typically a counter count's up from 0 with each "count" event and a timer counts down to 0 from a preset time. Not a big deal I guess just not how I would have expected it to work.

            You're thinking of something like a cooking timer? This is more like a stop watch. I can see how the terminology has confused you though. A timer like a cooking timer wouldn't serve a purpose here since it's easier to create an event which triggers on or is conditioned by something being in a certain state for a specific amount of time. No need to go through the hassle of running a countdown timer. IF lights on for exactly 5 minutes and so on.
            Originally posted by rprade
            There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

            Comment


              #7
              Originally posted by Gunneyk View Post
              That seems counter intuitive. Typically a counter count's up from 0 with each "count" event and a timer counts down to 0 from a preset time. Not a big deal I guess just not how I would have expected it to work.
              While I agree with you that a cooking timer counts down, I would still be curious how you could use a timer that counts down any differently than one that measures elapsed time. For example what would be different in an event triggering when a timer that you set for 3 minutes reaches 0 than one that starts at 0 and triggers when it reaches three minutes. An elapsed timer is much more useful because it has virtually limitless time triggers, where a countdown timer is limited by the starting point as it always stops at 0. If you can show how a countdown timer would do something that cannot be done with an elapsed time timer, we might want to add it as an enhancement request.

              I also understand how you might have expected it to work differently, that is the reason I took the initiative to begin this series of "how to" posts.
              HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

              Comment


                #8
                Is the value specified for 'less than' or 'greater then' in seconds?

                Comment


                  #9
                  Originally posted by twking View Post
                  Is the value specified for 'less than' or 'greater then' in seconds?
                  It is Days, Hours, Minutes and Seconds. I added a post above showing how it is set.
                  HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    #10
                    I see now that I missed the 'Control a Timer' in the Event drop down list. I was selecting 'Control a Device' instead. Thanks for the help!
                    Ted

                    Comment


                      #11
                      Is it possible to set a condition "timer value greater than 0 seconds" ? I am trying to do this with an event that manages air conditioners, but the dialog boxes only seem to accept minimum timer values of 1 second.

                      Comment


                        #12
                        The minimum value for timer triggers or conditions is 1 second. What are you trying to do?
                        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                        Comment


                          #13
                          Okay thanks. I am trying to create an event that stops timer "B" if it is running when Counter A is greater than 0. Like this:

                          If counter A > 0
                          And if timer B > 0s

                          then stop timer B
                          then reset timer B to 0s

                          But I think I've found a work around;

                          If counter A > 0
                          And if timer B >1s

                          Or If timer B becomes 1s
                          And if counter A > 0

                          then stop timer B
                          then set timer B to 0s

                          Comment


                            #14
                            Hi,

                            Sorry if this is obvious, but it seems like having a condition for timers of equal to or greater than (or equal to or less than) would be useful. My concern is if I have multiple conditions along with a timer is greater than, it is theoretically possible that the timer would just be equal to, not greater or less than. Thus, would this prevent the event from running?

                            For example:
                            If X condition changes and becomes true
                            AND Y condition is true
                            AND timer is greater than 30 minutes

                            Then Run Event

                            In this example, isn't it possible that the conditions will be met for X and Y but the timer will be exactly 30 and prevent the event from running?

                            Thank you!


                            Comment


                              #15
                              Originally posted by fx12002 View Post
                              Hi,

                              Sorry if this is obvious, but it seems like having a condition for timers of equal to or greater than (or equal to or less than) would be useful. My concern is if I have multiple conditions along with a timer is greater than, it is theoretically possible that the timer would just be equal to, not greater or less than. Thus, would this prevent the event from running?

                              For example:
                              If X condition changes and becomes true
                              AND Y condition is true
                              AND timer is greater than 30 minutes

                              Then Run Event

                              In this example, isn't it possible that the conditions will be met for X and Y but the timer will be exactly 30 and prevent the event from running?

                              Thank you!

                              What about:

                              If X condition changes and becomes true
                              AND Y condition is true
                              AND timer’s value is greater than 29m, 59s

                              HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                              Comment

                              Working...
                              X