How do I set up so the schedule run at or between certain times?

I want to set it up so that every night at say 10pm poll my gate sensor if it’s open then close it.

So in schedule, do I just put a start time w/o a stop time?

Or say I want it to check every hour after 10pm to 6am to see if the sensor is open and if it is then close it.

I’m only going to need one or the other.

You do not need a a timer at all.

I propose the following:
Inputs:
GateIsOpen an input Trigger that indicates the gate is open

A single condition:

GateCloseTimeout GateIsOpen and (GateIsOpen; NOW > 10:00) and ! (06:00:00; NOW; 22:00:00)

The term:

(06:00:00; NOW; 22:00:00)  

Is true between 6 AM and 10 PM.
By putting the ! in front of it, it says not during the day … so that means it true at night from 10 PM to 6 AM
The term

GateIsOpen and (GateIsOpen; NOW > 10:00) 

Is true 10 minutes after the gate is opened and, and not closed. The 10 minutes allows you to use the gate at night, it will give you 10 minutes before it is auto closed.

One Input and a single condition … That’s how automation works for you!

should my 1 condition include all in one box?

Actually this is what I have in the expression box

tGateisOpen and (tGateIsOpen; NOW > 10:00) and ! (06:00:00; NOW; 22:00:00)

that should do it?

It seems that my pleg works. Shortly after 10pm my gate was closed.

So now, if I went in schedule and set the interval for every hour, it will run every hour after 10pm to 6am?

You do not need to do anything …

If you open the Gate at NIGHT … 10 minutes later the gate will automatically close!

I tested this two nights in a row. After 10pm once the gate automatically close I would open it again in the morning it’s still open.

My condition reads exactly like this

tGateisOpen and (tGateIsOpen; NOW > 10:00) and ! (06:00:00; NOW; 22:00:00)

It will only auto close at night (10PM ti 6 AM) !

Do you also want it to close during the day ?
I do not understand what changes you want.

I should have word it better…

I would like for it to

@ 10pm close the gate if open
Repeat every hour until 6am - If open then close it

I want this because on certain days, we’d come home late or have someone over late. Say they leave and we don’t manually close the gate. So it should continue to check every hour.

And as I set … it will happen exactly 10 Minutes after you open the gate from 10PM to 6AM

So if the gate is open at 6PM … it will auto close at 10PM.
If you leave at 11PM for some reason … it will autoclose at 11:10 PM
If you come back home at 2AM after the bars close … and open the gate it will auto close at 2:10

You do not need to trigger it every hour … Opening the gate starts the timing sequence.

By the way if you opened the gate at 9:55 the gate will not close at 10PM … it will close at 10:05 PM

That’s strange then, cause @ about 11pm last night I open the gate on purpose it was till open at 8 this morning when I look.

Send me a status report when it fails.
Is your gate far away where it sometimes does not receive commands ?

If that is the case … just turn REPEATS on for the GateCloseTimeOut condition. Then it will send a command every minute until the gate closes.

Gate is not fall at all, I can control it normally everytime. It doesn’t say anything failing or anything.

Where can I pull the log files?

You need to print the output from the STATUS report … it’s on the control tab where you arm/disarm the PLEG

It’s a very important/informative view of your Automation.

Sweet learning something each day…

Installed: Tue Nov 17 2015. 90 Day Evaluation Period which allows a total of 4 PLEG and/or PLTS plugins.
Triggers

Name Description State Last True Last False
tGateisOpen Gate Sensor armed is tripped true 2015-11-19 22:27:46.317 2015-11-19 22:00:27.707
Conditions

Name Repeat Expression State Last True Last False
cGateCloseTimeout No tGateisOpen and (tGateIsOpen; NOW > 10:00) and ! (06:00:00; NOW; 22:00:00) false 2015-11-19 22:38:08.105 2015-11-20 06:00:59.116
Actions

Actions for Condition: cGateCloseTimeout

Device Actions:

Immediate

Device Action Arguments
Gate Opener SetTarget newTargetValue=1

[quote=“dannieboiz, post:14, topic:189727”]Sweet learning something each day…

Installed: Tue Nov 17 2015. 90 Day Evaluation Period which allows a total of 4 PLEG and/or PLTS plugins.
Triggers

Name Description State Last True Last False
tGateisOpen Gate Sensor armed is tripped true 2015-11-19 22:27:46.317 2015-11-19 22:00:27.707
Conditions

Name Repeat Expression State Last True Last False
cGateCloseTimeout No tGateisOpen and (tGateIsOpen; NOW > 10:00) and ! (06:00:00; NOW; 22:00:00) false 2015-11-19 22:38:08.105 2015-11-20 06:00:59.116
Actions

Actions for Condition: cGateCloseTimeout

Device Actions:

Immediate

Device Action Arguments
Gate Opener SetTarget newTargetValue=1[/quote]

You need to post your status report in PDF rather then the above.

Ahh I see why now. :slight_smile:

The status report shows that your Gate was Opened at: 22:27

At 22:38 (10 minutes later) the cGateTimeout became true … but the Gate never closed … If it did then cGateTimeout would have become false shortly after as opposed to at 6 AM when it went false because it fell outside the time period.

Do you have to TOGGLE your Gate Opener ?

So I went out this morning and found my sensor on the floor. Lets try again tonight and see how it goes…

but on the other hand, my gate opener is just a dry contact so if the sensor showed trip. My gate should be opening and closing all night. I reviewed my camera and it wasn’t the case.

I did manually open the gate @ the time 10:30 that night.

So after the gate automatically close tonight, I opened it again. Waited for awhile and still didn’t auto close…

Here’s the status just now

[quote=“dannieboiz, post:19, topic:189727”]So after the gate automatically close tonight, I opened it again. Waited for awhile and still didn’t auto close…

Here’s the status just now

https://www.dropbox.com/s/elpmgj3dhe88tka/PLEG%20Close%20Gate%20Night.pdf?dl=0[/quote]

I don’t think you waiting long enough time. The gate was last opened at 22:57:57 and it needs to be opened for 10 min. So that’s 23:07:57 the time stamp at the top of the page when the Status was taken is only 23:07:07.

PLUS when you use the “NOW” it doesn’t mean it’s going to happen right at 10 min. It could be 10 to 11 min as now is only accurate to 1 min intervals. So in reality it could have fired up to 23:08:57 but again it gets cut off early.