Newbie Luup Scene Creation Question

I am not expecting a reply or anything but any help or assistance would be greatly appreciated. I just got my Vera 2 UI4 (firmware 1.1.1186) about two weeks ago.

I am more of a hardware person then a software person although I have done some java/html/sql/VB programming in college 10 years ago. If someone could get me started I could probably figure the rest out. I just need a little help on Lua to get me started. I enjoy figuring things out, that is the reason I went the Vera route and not Homeseer. Besides the cost factor, lol. I like to get my hands dirty.

I have a total newbie question here… woodsby, Ap15e, guessed, cj… this one is for you. lol. I have been lurking on this forum for some time and I have noticed these guys really know their stuff. Any help would be extremely appreciated!!!

All I am trying to do is to create some scenes where…

[b]IF door with Z Wave Schlage Lever lock is opened AND it is ‘After Sunset’, THEN the Z Wave GE Receptacle (which has a lamp plugged into it) is turned on.

However, IF the Z Wave Schlage Lever lock is opened AND it is ‘After Sunrise’ THEN the Z Wave GE Receptacle is not turned on (meaning the sun is up and there is no need for the Z Wave GE Outlet to be turned on) . [/b]

I’ve tried configuring Two Different Scenes through the GUI on UI4 with an Event AND a Timer, however the timer seems to take precedence over the Event so the Lamp turns on after sunset without the door being opened (without the event triggering the command). As if I can only do one or the other (either a timer OR an event, not Both within the same scene).

I believe that the only way that I can accomplish this task is through Luup, as the GUI seems about useless.

Again, woodsby, Ap15e, guessed, cj if either one of you have any tips, hints, throw a bone of code at me I would be extremely indebted to you guys!!! :slight_smile:

… and thank you if anyone responds or replies.

Add [tt]return luup.is_night()[/tt] to the Luup tab of your scene.

http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_is_night

Oh, wow. Thank you so much for the fast response. :slight_smile: