Announcement

Collapse
No announcement yet.

Event with a timer in the conditions runs always it ignoirs the timer

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

    Event with a timer in the conditions runs always it ignoirs the timer

    I have two events, one with a condition timer less then 5 seconds and one with a condition the same timer more then 4 seconds.
    They both run at the sametime!! (the timer value is on that moment 15 minutes)

    Is this a bug? I run HS4.2.18.0 on windows 10Pro
    Attached Files

    #2
    I would guess that the first event runs because the timer is > 4 seconds; it starts the timer which resets it to zero, so by the time the second event conditions are checked it passes the < 5 seconds condition.

    Comment


      #3
      I'm not sure what you're trying to do, but maybe put the timer conditions into the actions instead (i.e. first action if timer > 4s then start timer and end event, add the < 5s condition to the other actions)

      Comment


        #4
        Originally posted by pseudocode View Post
        I'm not sure what you're trying to do, but maybe put the timer conditions into the actions instead (i.e. first action if timer > 4s then start timer and end event, add the < 5s condition to the other actions)
        In the log you see that they run at the same time.

        The idee is that when I press the button twice, within 4 seconds, the house goes in away mode (or home mode).

        First I had the timers in the actions, no result.

        It has worked ok for years.

        Comment


          #5
          I have split them up in six events and now it's working again!!
          I think it should also work like I made before!

          Comment


            #6
            The log is only accurate to one second, which is the difference in times you have in the event, so you can't say they run at the same time to the level of accuracy needed for that test.

            A design which depends on precise timing in an asynchronous system is not a good idea; maybe it worked before because HS ran events in a slightly different order, and the new version works slightly differently (which it clearly does as it now has action conditions), or maybe the new version is just faster or runs more events in parallel (both of which are probably good things for most of us). None of those points are faults in the software but rather they highlight the fault in your design.

            Many people think things should work a different way to reality!

            Comment


              #7
              Before Central Scene Devices became available I used a timer and counter. When the device is turned on, the counter is incremented and the timer resumed. Another Event is triggered when the timer exceeds 2 seconds. If the counter is greater than 1, a double On Event is triggered. When the timer exceeds 3 seconds, the timer is stopped and reset and the counter is reset, getting it ready for the next action. I wrote about it here.
              HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

              Comment

              Working...
              X