PLEG: Schedule Question in my setup

Guys,

Working with PLEG. The documentation is thorough but I am just not grasping all of the awesomeness of PLEG.
More examples could def help newbies like me.

My goal run a scene in the morning hours during the work week, after a sensor is tripped, 1 time.

Here is my setup:

[code]Triggers
Name Description
barm Whenever the Bar Motion is tripped

Schedules
Name On Type On Time On Days Random On Delay Off After Type Off Time Off Days Random Off Delay
s1 Weekly 00:00:00 1,2,3,4,5 None None None

Conditions
Name Repeat Expression
c1 No (06:00:00; barm; 11:00:00) and (c1; barm > 5:00:00) and (s1)
Actions

Actions for Condition: c1

Device Actions:
Immediate

Device Action Arguments
MorningMotivation RunScene SceneNameOrNumber=37[/code]

Nothing is happening and I believe it is related to the schedule.
The schedule is just there to ensure it only runs Mon-Fri.

Not sure if this is the answer, but have you tried turning repeats to ON?

Why not have the s1 schedule run from 6 to 11, M-F? Then the c1 sondition would just be barm and s1 and (s1; barm) and (c1; s1). With c1 refering to itself however, we need a pdf status report to tell if it has a valid timestamp (has been true before). You can’t use a null timestamp in a sequence expression.

s1 is not completely defined … yet is is referenced in c1

It will become true and stay true forever. although it will cause c1 to be evaluated every night at midnight.

What were your intentions for s1.

This looks like you want a condition to be true … the first time there is motion in the barn between 6-11 AM.

If that is true then I would code
s1 - On at 6:00 (on specified days) and off at 11:00 (on specified days)

Then:
c1 s1 and (s1; barn)

Leave the repeats OFF

[quote=“RichardTSchaefer, post:4, topic:188833”]s1 is not completely defined … yet is is referenced in c1

It will become true and stay true forever. although it will cause c1 to be evaluated every night at midnight.

What were your intentions for s1.

This looks like you want a condition to be true … the first time there is motion in the barn between 6-11 AM.

If that is true then I would code
s1 - On at 6:00 (on specified days) and off at 11:00 (on specified days)

Then:
c1 s1 and (s1; barn)

Leave the repeats OFF[/quote]

Thanks I have made the change as a test for tomorrow.
Trying to understand I don’t see where it will only run once.

just fyi nothing against barn owners but it is barm as in bar motion. No farm animals here ;D