Setting up sunset/sunrise

I would like to setup my outside lights to come on and off at sunset/sunrise.
Need some help setting up the scene to make that happen.
I have the location part setup already.

You have to build a scene,
In the Timers tab, select Add a timer
select Days of the week and select all days
In Time field, select Sunset
Select Command tab
Program the required actions

That’s about it.

So Le me clarify this:

  1. You need one scene for turning the light OFF at sunrise?
  2. You need another scene for turning the light ON as sunset?

That’s little strange way of doing it

I think it should work this way:

  1. Create a scene

  2. Create a command 1 to turn light OFF

  3. Hookup command 1 to timer that fires at sunrise

  4. Create a command 2 to turn light ON

  5. Hookup command 2 to timer that fires at sunset

Am I missing something for the need to create 2 exasperated scenes??
Thanks for your input

Where timers are required, its usually more reliable with Vera to have two scene’s due to the fact that if Vera or the MiOS engine restarts for any reason, then your devices will be definitely turned off by the second scene.

In a scene, when setting after sunset or after sunrise is it necessary to add specific times? I am trying to have a tripped motion sensor turn on specific lights for a period of time at night, but not during the day. Is this the best way to go? Thanks

The best way to do this (presuming you only want it active during night time hours), create the scene so that you turn on the the light (then off after X time), set up the event for your motion sensor that triggers this, and then in the luup tab enter the following:

return luup.is_night()

Hit save lua, go back to the dashboard and hit the save button

Thanks strangely. I also came across this is_night function ( I think futzle posted this somewhere else. But anyway, What about the following steps?

  1. Create a scene called Turn ON lights at sunset

  2. In the commands TAB, select the Device and select mode to ON, and the dropdown box to the right of it as Leave it.

  3. You would create a timer for sunset for the days you want.

  4. Go to Luup TAB and enter return luup.is_night()

  5. Save Lua code and Save Scene

Here I’m omitting creating any EVENT…

If you are triggering the scene with a sunset timer, there is no need for the luup code.

The luup code would be used if you triggered a scene based on a motion sensor or some other sensor. If you did not want the scene to run during the day, you would insert the is_night luup code.

@jethigh mentioned this was what he was trying to achieve and so he does indeed need it.

I am trying to have a tripped motion sensor


Worked perfectly- Thanks