Announcement

Collapse
No announcement yet.

Counter conditions

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

    Counter conditions

    I have been following the discussion on the latest HS version and note that counter and timer devices can create a problem.

    I have two events that use a counter value, testing if it is in a specified range. That is, it has to be greater than one value and less than another. As far as I can tell, there is no way to do that without using the corresponding device or a script. Is there an alternative that I am not aware of?

    While exploring that question I realized that there is a counter condition that does not appear to make sense. Namely, 'And If [Counter] value becomes this'

    This would appear to be a nearly useless condition because the counter becoming a specific value would have to be coincident with the trigger. Am I misunderstanding how this event condition works?
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548, NUC i3

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

    #2
    Originally posted by Uncle Michael View Post
    I have been following the discussion on the latest HS version and note that counter and timer devices can create a problem.

    I have two events that use a counter value, testing if it is in a specified range. That is, it has to be greater than one value and less than another. As far as I can tell, there is no way to do that without using the corresponding device or a script. Is there an alternative that I am not aware of?

    While exploring that question I realized that there is a counter condition that does not appear to make sense. Namely, 'And If [Counter] value becomes this'

    This would appear to be a nearly useless condition because the counter becoming a specific value would have to be coincident with the trigger. Am I misunderstanding how this event condition works?
    It is another of the unclear descriptions between Triggers and Conditions. The real description is “The counter value IS this...”, just like the Condition “This device had its value set and is not equal to..”, which becomes “{Device} has a value not equal to” when collapsed. The Counter Condition should go through a similar modification (or be more appropriately defined from the beginning), but it doesn’t.

    The only purported problem with these devices is with the HomeSeer devices for Timers, not the actual Timers. When the creation of Timer and Counter devices are selected in setup, all running timers will update the devices once a second.

    Comment


      #3
      So the condition works properly, it's just described incorrectly in the event condition statement?
      The only purported problem with these devices is with the HomeSeer devices for Timers, not the actual Timers. When the creation of Timer and Counter devices are selected in setup, all running timers will update the devices once a second.
      If I delete the devices related to timers (I don't need them) and retain only the devices associated with the two counters that I use in event conditions, does that remove the issue with the excess callback overhead?
      Mike____________________________________________________________ __________________
      HS3 Pro Edition 3.0.0.548, NUC i3

      HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

      Comment


        #4
        Originally posted by Uncle Michael View Post
        So the condition works properly, it's just described incorrectly in the event condition statement?
        If I delete the devices related to timers (I don't need them) and retain only the devices associated with the two counters that I use in event conditions, does that remove the issue with the excess callback overhead?
        Yes, and yes.

        Comment


          #5
          Originally posted by rprade View Post
          Yes, and yes.
          Thanks Randy. Your interest (and willingness to devote the time and attention) is a real asset. Having someone who stays up to speed on these details is a huge time and confusion saver for the rest of us.

          HST is definitely getting their money's worth from your work.
          Mike____________________________________________________________ __________________
          HS3 Pro Edition 3.0.0.548, NUC i3

          HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

          Comment


            #6
            Originally posted by Uncle Michael View Post
            Thanks Randy. Your interest (and willingness to devote the time and attention) is a real asset. Having someone who stays up to speed on these details is a huge time and confusion saver for the rest of us.

            HST is definitely getting their money's worth from your work.
            Agreed.
            Michael

            Comment


              #7
              I also have a question related to counter conditions. I am trying to use a value of a counter that has already been set by another event, I then want to check the value of this counter and trigger another event but all options for using a counter use the word "becomes" meaning it would have to happen in this event. Is there something i'm missing that would allow me to do what I want.

              My other option is to create a device instead and check its status but I thought I could use a counter to do the same job but appears not.

              EDIT; rereading the OP I think randy answered this, its incorrectly worded.

              Comment


                #8
                To be clear...

                If a counter or timer is used as a Trigger (IF, OR IF), it must change in order to be true and is only true at the moment it changes.

                If a counter or timer is used as a Condition (AND IF), it must match the statement to be true. No Condition is based upon a device’s value changing, just the value when Trigger is true. Think of a trigger as a system snapshot, any condition that was true at the instant the trigger remains true, even if it changes a microsecond later, the event has already acted on the snapshot.

                Do not use the HomeSeer devices that are optionally created through the system option “Create Devices for Counters and Timers” in Events, always use the actual timer or counter.

                Look at the table of contents post in the Event Clinic forum here for a lot of these topics.

                Comment


                  #9
                  Thanks for the reply Randy. I created a device to do the same job as when I try to use a counter as a condition the wording still requires a change in the value, whether this is a bug i'm unsure.

                  EDIT: Currently running .445 homeseer

                  Below i'm trying to use a counter called 1 as a condition when it has already been set to 1, not when it "becomes" 1
                  Attached Files

                  Comment


                    #10
                    Originally posted by Steaktastic87 View Post
                    Thanks for the reply Randy. I created a device to do the same job as when I try to use a counter as a condition the wording still requires a change in the value, whether this is a bug i'm unsure.

                    EDIT: Currently running .445 homeseer

                    Below i'm trying to use a counter called 1 as a condition when it has already been set to 1, not when it "becomes" 1
                    Dont pay attention to the way it reads. Even though it reads “has become”, it means “is”. It doesn’t mean “just changed”. It is one of many examples of clumsy wording in a few of the conditions.

                    For the record “has become” is (at least in American English) is present perfect tense. It does not mean it just happened, it means it happened sometime in the past, but remains true at this moment. So while the wording feels wrong in a technical sense, it is literally correct. When you say “your son has become a handsome man” it means it happened sometime in the past, but remains true at this moment.

                    We have asked the verbiage to be corrected on a number of Conditions, but have seen no response from HST. That is why I wrote a couple of posts above “No Condition is based upon a Device’s value changing”. No matter how it may read, all conditions are evaluated at the exact instant the Trigger is true, there are no conditions that will expect the value to have changed at the same instant.

                    Comment


                      #11
                      Ah right, thanks for clearing that up. I thought I'd designed the event correctly using a counter and it didn't work so assumed this was the reason. I'd had a couple of beers though so probably user error as per. Thanks again

                      EDIT: Yeah now I look back when I read it it makes sense, I had it my head it said becomes.

                      Comment


                        #12
                        Back again with a random one. I have a counter involved in lighting events, one for automatic and one for manual light switching which each have different timers associated. For some reason one event does not work correctly even though I have two events precisely worded the same (but for different timers), one works, on does not. My mind is broken at this stage. The images might clear it up a bit for you.

                        The light is turned on (manually) then counter is increased in one event which runs the timer event. Light is turned off (manually due to testing, usually another event is used with timer for turning light off), counter is reset in an event, then timer is stopped in another event. I use the same event to reset counter for auto and manual, so that's why the auto timer stops, yet the manual timer does not.

                        Only difference i can see is the manual timer is running and the auto timer is not. Don't know if there's some reason this would affect the logic.

                        Comment


                          #13
                          These are the events associated with the above

                          Comment


                            #14
                            A condition serves to filter the trigers . If it fires or not.

                            Comment

                            Working...
                            X