different schedules for each month

has the script requirement chaged or was it a typo in your original post?
It was a typo. I've fixed it now so others don't get the same problem. Sorry it gave you trouble.
what would be the required luup code to check for day/night
[code]local day = luup.variable_get("urn:rts-services-com:serviceId:DayTime","Status",) return day == "0"[/code] Where is the device ID of the DayNight plugin. The above code placed in a scene luup will allow the scene to run only at night. To run the scene only during the daytime, change the last line to: [b]return day == "1"[/b]

[quote=“RexBeckett, post:21, topic:175501”]

has the script requirement chaged or was it a typo in your original post?

It was a typo. I’ve fixed it now so others don’t get the same problem. Sorry it gave you trouble.

No problem
imvery thankful that you have replied and assisted me in correcting it

what would be the required luup code to check for day/night
[code]local day = luup.variable_get("urn:rts-services-com:serviceId:DayTime","Status",) return day == "0"[/code] Where is the device ID of the DayNight plugin. The above code placed in a scene luup will allow the scene to run only at night. To run the scene only during the daytime, change the last line to: [b]return day == "1"[/b][/quote]

thanks i will try this right away
worked perfectly

thank you very much

[quote=“charettepa, post:16, topic:175501”]i have also tried

local schedule = {0,0,0,0, 1, 1, 1, 1, 1,0,0,0} – 12 entries, Jan-Dec, set to 1 if Summer mode
VSwitch.set(“Summer Mode”, schedule[tonumber(os.date(‘%m’))])

i have a virtual switch called Summer mode
but the status is never changed[/quote]

Glad that you have found a working alternative, but I did wonder whether the failure of this solution might be due to the fact that you had not located and downloaded the code for Vswitch, as per this post?

[url=http://forum.micasaverde.com/index.php/topic,14896.msg113156.html#msg113156]http://forum.micasaverde.com/index.php/topic,14896.msg113156.html#msg113156[/url]

Not sure i understand
i already have the virtual switch app with several virtual switches installed
i am not only confused as to what the virtual switch routine is for
but dont know where to put it

there is no section that i find in vera that alows to put in lua code

just luup in scenes

I admit, the Vera UI hides it well.
Try: APPS > Develop Apps > Edit Startup Lua

If you put code there, remember to press GO, and then SAVE, that code will be available to all your scenes - very convenient.

The VSwitch code is just a Lua utility function which allows you to access any Virtual Switch devices you have by name, rather than having to use their Device ID. But you don’t have to use it - you could do it the hard way instead!

thanks i will try this