Announcement

Collapse
No announcement yet.

Reset Timer in an event

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

  • Michael McSharry
    replied
    In HS4, I just tried to create an event where a timer's value is the trigger, and left the input section for the value as all 0's.... it wouldn't let me save it. You can enter 1 or -1 seconds, but not zero.
    The above is only true if the timer is stopped. If it is running then it can have an all zero trigger.

    The only place I have used timers is on triggers that need to be debounced. For example if a mechanical switch is toggled it will go through a period of rapid transitions. The timer greater than 2 seconds is used as the event's condition where one of the actions when the event occurs is to set the timer to zero. It means the timer is always running and it does persist HS4 restarts.

    Leave a comment:


  • TC1
    replied
    In HS4, I just tried to create an event where a timer's value is the trigger, and left the input section for the value as all 0's.... it wouldn't let me save it. You can enter 1 or -1 seconds, but not zero.

    The other alternative to a countdown is simply count up and create a trigger based on the desired positive value, ie, 10 minutes.

    Small annoyances but none of them are show stoppers, IMO. I just choose to design my logic/events differently and stay away from timers and use virtual devices with wait statements in events (which also do double duty as status indicators in the user interface screens). There hasn't been a use case yet where I've needed a timer instead.

    Leave a comment:


  • Seer1001
    replied
    Just to verify (Seer1001) I am talking about timers in HS4.
    I used HS3 about 5 years ago. I no longer have that system.
    I don't recall having these difficulties with timers in HS3.
    BUT HS4 seems to be missing some things that HS3 has (I think) like:
    1. Count down timers with a the capability to detect when the timer reaches zero.
    2. Reset (to zero) from an event. Seems like in HS4 you can only Set a timer to zero(or any value) IF the timer is running.
    On the timers page under tools you can set a timer when it is stopped BUT not from an event.

    I would hope that timers in HS4 would have more or at least the same functionality that HS3 has.
    Am I missing something here?

    Tom

    Leave a comment:


  • aa6vh
    replied
    Lots of good ways to do that. I personally use a one minute timer, and a virtual switch/counter/global variable to hold the actual desired time (in minutes). When the timer expires at one minute, the counter device gets incremented or decremented, and the timer is restarted if the limit has not yet been reached.

    Doing it this way makes it real easy to modify the interval, such as a motion detector timeout getting reset if new motion is detected, or if the timer just needs to be stopped midway.

    Leave a comment:


  • TC1
    replied
    Originally posted by aa6vh View Post

    So you are saying that HS4 does not allow you to have a trigger that fires when the timer "becomes" 0 hours, 0 minutes, 0 seconds?
    I brought up an event creation page and it looks like you can, but I have not actually tested it to see if it actually works. Even if it does work, what happens if you want to use the countdown timer as a secondary condition check, with something else being the primary trigger?

    Technically anything is possible given the current timer toolset, ie, for a countdown just let the timer count up and then set a condition or trigger if the count value is greater than a certain number. It just feels inelegant and I remember I had a hard time developing my timeout logic for my bathroom fan, there were too many steps to set the timer, track the timer, reset the timer, etc. It was far easier to just make a virtual device that gets triggered on by a condition and within that event, set a wait condition for X minutes, and then turn off the virtual device. I use the virtual device as an interlock in other events. Easy peasy.

    Leave a comment:


  • aa6vh
    replied
    Originally posted by TC1 View Post
    You can actually set a countdown timer in HS4, I was experimenting and found if I set a negative value like -10 minutes it would start counting towards 0. The problem is that it counts right past 0 and continues into positive numbers. A countdown that stopped at 0 would be invaluable, especially for simplified conditional test logic.
    So you are saying that HS4 does not allow you to have a trigger that fires when the timer "becomes" 0 hours, 0 minutes, 0 seconds?

    Leave a comment:


  • TC1
    replied
    You can actually set a countdown timer in HS4, I was experimenting and found if I set a negative value like -10 minutes it would start counting towards 0. The problem is that it counts right past 0 and continues into positive numbers. A countdown that stopped at 0 would be invaluable, especially for simplified conditional test logic.

    Leave a comment:


  • MattL0
    replied
    Yeah would be nice to have a reset button, that stop the timer and set it to 0.

    Leave a comment:


  • ericg
    replied
    Originally posted by Seer1001 View Post
    Why no count down timers in HS4, I think HS3 had them.
    I'm beginning to experience a new source of confusion: Some of us are using HS3, and some HS4. Often we are (IMHO) negligent in discussing our problems without tying them to a specific version. In this thread, for instance, I infer from the above quote that Seer1001 is using HS4. The format of the picture in post #7 suggests that Rvtravlr is using HS3. I have not yet moved up to HS4 because, frankly, I find all the negative comments just too daunting.

    The picture in the OP looks a little strange to me -- I'm guessing it's from HS4. If so, I can't comment -- it's a different program.



    Leave a comment:


  • Rvtravlr
    replied
    Click image for larger version

Name:	145DE096-3B10-49D5-B896-3CFB2B595D63.jpeg
Views:	82
Size:	122.3 KB
ID:	1419720

    Leave a comment:


  • Seer1001
    replied
    ericg,
    Do you set the time when the timer is running or when it is stopped on a non-zero value?
    I found that I can only set the timer to zero (or any value) when it is running. Then I can stop it BUT I have to put at least a 1 second wait before the stop. Weird! I don't like putting in waits just to get stuff to work.
    Event#1:
    Start Timer (Initiated from HSTouch)
    Event#2:
    If Timer1 value is more than 15m, 0s
    Then
    Set Timer1 to time 0 seconds
    Wait 1 second
    Stop Timer1
    Run Event #3

    I would like to stop the timer first and then rest it to zero. BUT it does not seem to work that way.
    You can reset a stopped timer on the timer page under tools but not from an event.

    Why no count down timers in HS4, I think HS3 had them.

    Tom

    Leave a comment:


  • ericg
    replied
    It works for me.

    Leave a comment:


  • Seer1001
    replied
    With no reset function for timers from an event I tried setting the time to zero (0). The set time function from an event does not work. I tried 0 and a value greater than zero.
    Nothing. Has anyone got this set time function to work?

    Tom

    Leave a comment:


  • kwolter
    replied
    Originally posted by TC1 View Post
    Set the time to 0.

    After trying to get a countdown timer to work in an event (set time to -10 minutes, which works when setting a timer outside of an event) I've given up on them. One can achieve the same functionality by creating a virtual switch device and using Wait statements in the event to simulate a timer.
    Perfect. Thanks!

    Leave a comment:


  • TC1
    replied
    Set the time to 0.

    After trying to get a countdown timer to work in an event (set time to -10 minutes, which works when setting a timer outside of an event) I've given up on them. One can achieve the same functionality by creating a virtual switch device and using Wait statements in the event to simulate a timer.

    Leave a comment:

Working...
X