Not understanding how to create a day/time piston


#1

Hi. I need a condition that lets a piston trigger every day except from monday 10pm to tuesday 10am.
I’m not understanding how the virtual device / time woks, because the “only these days of the week” is separated from the “from time” “to time”. Or maybe I should use another tool for this? Any help is appreciated :slight_smile:

Thanks,
Rodrigo


#2

You can use a timer which lets you select “days” or not select days.
OR
I don’t know the purpose of your piston but lets say I want a piston executes daily but besides Moday 10pm to Tuesday 10 am, I would use a variable or simulated switch.
Every monday 10pm simulated switch SWITCH X turns ON (with a seperate piston)
Every Tuesday 10am simulated switch SWITCH X turns OFF

So in your original piston, you can use the status of simulates switch X as a condition:

IF motion sensor changes to active (trigger)
AND
IF SWITCH X status is OFF (condition)
the do this do that...

in this case your piston will stop workingevery monday between 10m and Tuesday 10 am… (it will execute but won’t finish the job because the condition is FALSE)

Does that make sense?


#3

Yep, I’ll try that with a variable. Thanks :slight_smile:

Edit:

Actually I knew this method, I have other variables that are defined by time, but I use those variables in many tasks. I was trying to understand if this can be configured by the date/time options in webcore.

I’ll try this, what do you think?


#4

himmmm interesting…
On the paper it should work…
Sometimes i had a problem with TIME (don’t know why) but webcore has an interesting aproach to between X time and Y time…
the best would be to test it…
But with my limited knowledge, it looks like it should work…
Anyone???

edit : Just to be safe, use 12:01:00 for am times. I don’t know IF 12:00:00 am is considered MONDAY or still SUNDAY midnight???


#5

12:00 AM is by standard the start of the day. Maybe in the “tuesdays” setting I should set it to 11:59PM.

EDIT: Also for every other day of the week.


#6

Sounds great…
my only concern is the first one
I am not sure if webcore sees that as 24 hours (or 23:59 hours) in logic??? it might even see that as a minute??? or zero minutes in the other way you did.