Newbie requests quick review after working with examples from BASIC , videos etc

Hello PLEG gurus of the world.

Abusing of your kindness, im asking for a little review on my work, as im a bit confused.

After doing the preliminary reading and watching very helpful videos on youtube.

I created my first PLEG setup.

My scenario, i have a motion sensor, that i want to use to turn a light ON , only if its after sunset.

So i created my tMotionSensorInOfc, is tripped.
Created a schedule sNight starts at sunset, stops after sunrise every day of the week
Created my condition tMotionSensorInOfc and sNight
The action turns on the light and after 10mins, it turns it off again.

The odd thing is, that it wont work at night like i stated it.
So just for kicks i added a ! to the condition, and it worked. ???

You can review the work on this screencast. [url=http://screencast.com/t/wsiK5wc4]http://screencast.com/t/wsiK5wc4[/url]
This is being tested at night. So it is after sunset and the location IS set for the Vera3

Status page [url=http://screencast.com/t/yp320Q9j]http://screencast.com/t/yp320Q9j[/url] says sNight is false at night ???

I would asume the !sNight meant NOT at night?
im confused
please advice , ideas and suggestions are welcomed.
thanks!

When you add new inputs or schedules … the INITIAL value is OFF … It will not get the correct state until the Schedule tripped.

However there is a DO IT NOW button in the Schedules tab where you can TOGGLE the current state of the timer.
This is useful for testing … and in your case to set the INITIAL value of the schedule to the correct state!

OoOhhhhh
So theoretically today It should work without the ! After it is sunset.

Thanks. It had me puzzled.

One more quick question if I may.
Do I need to install more instances of the plugin one for each “scene” or everything goes in the installed instance, and I just keep adding inputs, triggers , and conditions with actions?
Yesterday I some how managed to duplicate pleg and ended with two on the dashboard, I just deleted one.
Thanks

Sent from my iPad using Tapatalk

and one more question please.

Do the delays added in the action , reset themselves with a newer motion trigger?

If i trigger motion say 10:00 the delay will shut the light off at 10:10
but if i trigger it at 10:05again, will i get a shut down at 10:10 and at 10:15? or the first delay gets updated?

thanks, sorry for the newbie questions, i appreciate the patience

Each time you start a set of actions … they will complete.

So each set (initial and delayed) will happen twice.

If you want to be able to cancel delayed actions … you need to put those actions on a condition that becomes true when a delay initiated by the original condition expires but has the additional logic needed to keep the delayed condition from becoming true.

i.e.
Input:
Timer SelfRetrigger and with an off Interval of 10:00

OriginalCondition Your Cool Logic here
Actions: Do your immediate stuff and start Timer

DelayedCondition !Timer and (other logic to keep it from running)
Actions: Commands that are conditionally sent after the specified delay from Original Condition

At first you can keep adding logic to one PLEG instance. At some point it may get complicated, and you will want additional PLEG to keep things readable and shorten execution time…

Sent from my SM-G900V using Tapatalk