A question about setting times.

I’m trying to figure out how to turn on my porch lights when my garage door is opened. Here is the problem I’m running into.

My porch lights turn on at sunset and stay on until 9pm.
From 9pm to sunrise I would like the porch light to turn on when the door is opened. I would like the light to stay on for 5 minutes after the door is closed.

I have tried setting up a scene to turn on the porch light for 5 minutes that is triggered by the garage door sensor. The problem I’m running into is it happens during the day, which I don’t want.

How do I exclude times from a scene? Another way to ask is. Is there a way to do a from, to time when talking about scenes?

You are getting into an area that is too complex for a regular scene. You would need to use your own custom LUUP code, but this will be difficult if you are not familiar with programming in LUA. A simpler alternative to custom LUUP code is to use the [url=http://rts-services.com/Vera/Plugin/PLEG/]Program Logic Event Generator/url plugin which allows more complex conditional logic than a basic scene to control a device.

Using PLEG to turn on lights only under very specific conditions has been covered many times in these forums.

Oh well, I was was hoping to avoid it but it looks like I’m going to have to dive into PLEG.

Thanks

I was was hoping to avoid it...
You will not regret learning how to use PLEG. It turns Vera from a toy into a tool.

Where do I find inclusive times in my case, between 2100 and Sunrise?

Also, are we allowed to use IMG code? What I posted doesn’t seem to work.

For an inclusive time, set Stop Type to Day of Week with required time.

You can post a png file by attaching it.

OK, thanks. Looks like I’ve got a a lot of reading to do. :cry:

Just set up a PLEG with a few VariableSwitch devices - or a MultiSwitch - and try a few simple conditions. Once you get the feel for how it works you’ll be amazed what you can get it to do for you.

I just don’t really get the interface in PLEG.

Are there any tutorials besides
[url=http://rts-services.com/Vera/Plugin/PLEG/]http://rts-services.com/Vera/Plugin/PLEG/[/url]

Is there a step by step setup explanation? I’m not looking for exactly what I want to do but something that explains a little better what the different options are.

Once again, Thanks.

Not that I’m aware of although I believe there is one being written for a French HA forum. The RTS documentation on PLEG and PLC explains the principles of how it works and what options are available. Searching the forum will almost certainly get you examples of how others used PLEG to implement whatever function you are looking to do.