Scheduling question

Hi,

I have a vera Edge (UI7) and I am trying to set a light switch to come on at sunset if it isn’t on already, and turn of at midnight. I can’t seem to find a way to do this without luup code which I’m trying to avoid learning. I don’t want the dimming level to change at sunset if it is already on. I can make it come on at sunset (ignoring current state) and off at midnight using 2 different scenes, but I can’t seem to get it in one scene or only work if the light is already off. Any help is appreciated.

Jeff

The easy way to do this is to make 2 scenes (1 to turn on, 1 to turn off). For the “turn on” scene, you select the trigger as “schedule”. From there you sad the interval which I would assume for your application would be daily. Below the interval you have the option for “at a time of day”, change that to “sunset”. Then click validate. I assume you know how to finish setting up the scene from there, but if not, let me know and I can give you the rest of the instructions. For the “turn off” scene, you do the same thing but rather than making the trigger “sunset” you leave it as “at a time of day” and select 12:00am.

This will work to turn the switch on if it is not already on. If it is already on, it won’t do anything. Then later the switch will be turned off regardless of how/when it was turned on.

@jbrunt

You say that you want to try to do the on and off in one scene. The trouble with this is that it is effectively two triggers (sunset and midnight) which leans towards two scenes. It would be possible to have the turn on scene start timing until midnight and then turn off but there are numerous problems there and it needs use of lua.
You started correctly with two scenes.
The other alternative, to avoid learning lua, would be to use pleg (see numerous other posts on pleg)

See also [url=http://forum.micasaverde.com/index.php/topic,34348.msg252727.html#msg252727] http://forum.micasaverde.com/index.php/topic,34348.msg252727.html#msg252727[/url]

I have not done much scene programming IN ui7 …

In UI5 you can do this with one scene and two triggers.

Sunset Trigger
LUA for trigger
LightState = 1

Sunrise Trigger
LUA for Trigger
LightState = 0

Scene Level LUA

SwPwrSvs = “urn:upnp-org:serviceId:SwitchPower1”
LightDevice = 40
luup.call_action(SwPwrSvs, “SetTarget”, {newTargetValue = LightState}, LightDevce)

Of course now I do this kind of stuff in PLEG … In Vera/LUA the code is spread out … in this case 3 places.

I am thinking about installing PLEG to make these types of logic settings easier. Does anyone have experience with this? I am happy with the stability of my VERA unit. Does adding PLEG cause any stability issues, or anything else I should be aware of?