Just a question about time


#1

I’m assuming that time starts over at midnight, If I had a piston to lock at 11:59pm and unlock after 12:01am that since its passed midnight(another day) the piston works basically as described.

Also How much time does a piston need for “if time is between” I understand it checks every 30 sec. so technically I could set it between 7:30 and 7:31 and it would work. Is there a minimum of time needed for it to work? or to run it’s best.

I did do a search on this but couldn’t find the answers in wiki or other post.


#2

If you’re talking about $time or $time24 then yes, those system variables start over again at midnight.

That’s a condition. Not a trigger. So it would work with any value. I believe the shortest that the interface would allow you to enter is a minute apart…but you could technically write an expression to get down to sub-second times. Now…having said that…there’s no way that WC could detect more than one Trigger in that amount of time…so that would be functionally useless.

What is the “it” you’re referring to here? Many things can happen or be detected in a shorter amount of time than that…but it depends on what you’re doing. Generally you can’t make hops up to the cloud and back on a very frequent basis. That’s more a limitation of the network (cloud based) than WC.

Too vague. What do you mean by that?


#3

I have several pistons for the front door lock, I just use “If time is between” so I’m not using $time or $time24 variables. I had originally had it “if time is after” for two different pistons, but had to change it to " If time is between" because it would unlock for one piston and then re lock because of another piston. The “it” would be the piston running or wc and “it” checks every 30 sec to see if the time is met. Not quite sure what “it” was that checks to see if conditions are met, WC or the piston, I’m assuming again wc. I don’t need to get down to sub seconds I just wanted to make sure that 3 mins. or so was enough time for it to run through the cloud and execute. I can see different pistons being written that uses time and didn’t want to have one overwrite the other, so the smallest time frame for between x time and y time is better for me. If this makes sense to you.
Thanks for your answers


#4

WebCoRE doesent check for a time, it subscribes to the event.

So at the precise times you subscribe, your piston gets triggered, once at the start of the ‘between’ and once at the end.

If the ‘between’ spans midnight then there is a third trigger at midnight, reaffirming the ‘true’ status of the condition.

The system can handle times down to 3 seconds apart (if you really wanted to), and you’ll probably find that it’s reliable… but, for short durations you’ll probably be better off using ‘time happens at’ followed by a wait.


#5

Thanks RobinWinbourne, about the 3rd trigger at midnight to reafirm the “true” status. I think using “time happens at” will do the trick and keep me from overlapping pistons with between time in it.


#6

Robin
Just one other question, If I use “time happens daily at” and there are other conditions that are not met, and before those conditions get met the time is after “time happens daily” will it still continue to run since it’s after the "time happens daily"
Nevermind I answered my own question.


#7

For the benefit of others, no, ‘time happens at’ is a one-off trigger that only stays ‘true’ for about 10 seconds.

If another condition in the block becomes ‘true’ later on then the piston won’t fire.

If needed, use ‘time is after’… but that will reset to ‘false’ at midnight… so ‘time is between’ is probably best for your use case.


#8

Thank you for the clarifications