We have moved at community.getvera.com

Author Topic: Newbie Luup Scene Creation Question  (Read 2623 times)

Offline iflyM3

  • Full Member
  • ***
  • Posts: 144
  • Karma: +0/-0
Newbie Luup Scene Creation Question
« on: February 23, 2011, 04:19:12 am »
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...



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) .




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!!!    :)

... and thank you if anyone responds or replies.  
« Last Edit: February 23, 2011, 04:26:28 am by iflym3 »
Vera 2 UI5 (1.5.622)... and too many Z-Wave/Ethernet/Wi-Fi devices to list.

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: Newbie Luup Scene Creation Question
« Reply #1 on: February 23, 2011, 05:09:37 am »
Add return luup.is_night() to the Luup tab of your scene.

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

Offline iflyM3

  • Full Member
  • ***
  • Posts: 144
  • Karma: +0/-0
Re: Newbie Luup Scene Creation Question
« Reply #2 on: February 23, 2011, 01:31:26 pm »
Oh, wow.  Thank you so much for the fast response.   :)
Vera 2 UI5 (1.5.622)... and too many Z-Wave/Ethernet/Wi-Fi devices to list.