There must be an easier way

I have read many of the posts on Garage door opening and turning on the lights and the WD conversion model not being truly Z-Wave. So I seem to have developed a workaround that seems way to complicated to me.

My objective: Have the lights leading into the house and upstairs turn on when the garage door is opened but only if it is between 4 - 10 pm

My solution:
1 Purchase the Aeon labs Zwave door sensor (I believe this part of it is a must).

2 Install a device that will only turn on a z wave ‘trigger’ device during 4 - 10 (a simple rotary timer with a lamp module plugged into it is my thinking) This trigger can’t be the aeon since it is battery powered - but the only real purpose of the Aeon sensor is triggering the lighting rather than monitoring the opening and closing so having it active at all times is optional but short of rewiring it to a wall wort I think I’m stuck. Having the ability to monitor the door status at all times is a bit of a bonus.

3 Create a scene where the lamp module (only powered 4 - 10) is triggered with the garage is opened via a signal from the Aeon sensor. Create a separate scene that when the lamp module switches ‘on’ the pathway lights upstairs come on for a defined period of time.

This seems like too many devices in the chain, but after reading the garage door posts, the ‘party mode’ thread and hearing the frustation of not being able to limit a scene to a schedule led me to this awkward workaround.

Any feedback is greatly appreciated from this newbie.

You can eliminate the timer and have Vera take care of the timing function for you. Set up an event to turn on the pathway lights when the door is opened. Test that functionality. Then add the following code to the “Luup” tab of that scene.

[code]local t =‘*t’)
local current_time = t.hour * 3600 + t.min * 60 + t.sec
local begin_time = 16 * 3600 – 4:00pm
local end_time = 22 * 3600 – 10:00pm

if ( current_time > begin_time ) and ( current_time < end_time ) then
return true
return false

When Luup code returns false, the commands in the Commands tab do not run. Since your requirements are time based there is no need to add virtual devices or global variables as described in the “party mode” thread.

Guard, short question, if one is trying to turn on lights from 7:00pm (2100) to 5:00 am (0530) will the current Luup code work or do I have two scenes one from 2100 to 11:59 and the other from 00:00 to 0530? I’ve set-up an event that once my Kwikset lock opens that the lights in the room will come on for 5 mintues but I only want the lights to come on from sunset to sunrise. Also is minutes expressed as a decimal e.g. 19.5 = 07:30 pm? Mike