Announcement

Collapse
No announcement yet.

Count up timer, but why no count down timer?

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

    #16
    Or this, you start a timer that triggers an event at at or above 8 minutes. The event triggers, and because the timer keep incrementing every second, the event becomes a machine gun before you can reset the timer to something under 8 minutes.

    Hence, countdown to zero, trigger at timer becoming 0. Has happened to me until I figured out what was going on!

    Sorry for the pun, but this is not Rocket Science. Why should we create virtual devices and have events to decrement them causing more overhead? Timers are timer are timers, they are incremented or decremented in the core loop of the HS base code. It's just a bit flag that differentiates the difference between a count up timer and an count down timer.

    So why do we need multiple events, multiple statements, complex variable devices and a PITA when HS triggers itself once a second and goes through it's routines to increment any of of it's internal timers. So, a timer that is a countdown, is probably 15 lines of code that everyone can use versus everyone writing multi-line events, multiple events and increasing the workload of the HS server when it's already ticking up or down?

    Not sure why everyone is being defensive about this. Just because there is another more difficult way to do it doesn't mean that it would not be a simple and small way for HST to do it for us and do it very simply?

    Comment


      #17
      Originally posted by jmaddox View Post

      The trope of counting down began with filmmaker Fritz Lang who felt that counting down instead of up created more dramatic tension....

      https://www.atlasobscura.com/article...9-1f0d72a193db
      Cool!

      But again, if a countdown is stopped, it can be restarted. But if it's stopped too late, they reset the clock back to a restart point where they can restore the systems status of the rocket. 0 means 0 to everyone (even though the pumps start at T-5, flames at T-3 and T-0 is when the hold down clamps release!

      BTW, does anyone know the real definition of a successful launch that NASA uses and at what time it occurs. I know it because I had to go through all the manuals when I trained on the STS Shuttle simulator.

      Comment


        #18
        Originally posted by George View Post
        Not sure why everyone is being defensive about this. Just because there is another more difficult way to do it doesn't mean that it would not be a simple and small way for HST to do it for us and do it very simply?
        I do not think anyone is being defensive, just trying to supply alternatives until you can upgrade to HS4, which has what you want.

        Comment


          #19
          Originally posted by George View Post
          Or this, you start a timer that triggers an event at at or above 8 minutes. The event triggers, and because the timer keep incrementing every second, the event becomes a machine gun before you can reset the timer to something under 8 minutes.

          I don't know about HS3, but in HS4 you have this to account for your scenario:

          Click image for larger version

Name:	Capture.PNG
Views:	99
Size:	43.3 KB
ID:	1421647

          I don't think anyone's getting defensive, simply pointing out there's more than one way to solve use-cases.

          Comment


            #20
            Originally posted by George View Post
            Or this, you start a timer that triggers an event at at or above 8 minutes. The event triggers, and because the timer keep incrementing every second, the event becomes a machine gun before you can reset the timer to something under 8 minutes.

            Hence, countdown to zero, trigger at timer becoming 0. Has happened to me until I figured out what was going on!
            I don't understand the problem. If you can trigger when the timer becomes zero, why not trigger when the timer becomes 8 minutes? Choosing the wrong trigger will get you into trouble in all sorts of ways, but that's not the fault of the direction the timer is running.

            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


              #21
              Set an event to trigger on 8 mins. It won’t work most of the time.. you have to set it to trigger’’ if the timer goes over 8 mins .

              Comment


                #22
                Originally posted by jmaddox View Post

                The trope of counting down began with filmmaker Fritz Lang who felt that counting down instead of up created more dramatic tension....

                https://www.atlasobscura.com/article...9-1f0d72a193db
                That's a really cool article, thank you.

                A countdown timer is what one would probably want when setting up an alarm system. The alarm panel looks a lot better when it's counting down from 30 (or whatever number you want to start with) so the bad guys (or drunken step-son) sees how much time they have to enter a valid code to stop the alarm from sounding.

                The only way I could figure out how to do it in HS3 was through a combination of script and event. I have HS4, but have not installed yet, so can't speak to that.

                Comment


                  #23
                  Originally posted by MattL0 View Post
                  Set an event to trigger on 8 mins. It won’t work most of the time.. you have to set it to trigger’’ if the timer goes over 8 mins .
                  Interesting. I have not encountered that problem. Obviously, if it is, that's another reason to use the state timer for the device itself.

                  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


                    #24
                    I find it easy enough to shut off my kitchen light after being on for 6 minutes. Motion turns if on. If it needs to be reset before reaching the six minutes, as long as the light is on the motion triggers this the hs.setdevicelastchange (dev, now). It resets the time without extra events having to be tended to.

                    Stuart

                    Comment

                    Working...
                    X