Is there a way of resetting a timer in an event and not just stopping it? Not seeing it in the dropdown. Maybe there's another way?
Announcement
Collapse
No announcement yet.
Reset Timer in an event
Collapse
X
-
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.
-
Originally posted by TC1 View PostSet 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.
- Likes 1
Comment
-
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
Comment
-
Originally posted by Seer1001 View PostWhy no count down timers in HS4, I think HS3 had them.
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.
- Likes 1
Comment
-
Guest
-
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.
Comment
-
Guest
Originally posted by TC1 View PostYou 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.
Comment
-
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?
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.
Comment
-
Guest
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.
Comment
-
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
Comment
-
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.
Comment
Comment