Author Topic: How do I set a scene to run BETWEEN a timeframe?  (Read 935 times)

Offline 416to305

  • Jr. Member
  • **
  • Posts: 61
  • Karma: +0/-0
How do I set a scene to run BETWEEN a timeframe?
« on: October 17, 2014, 12:16:23 pm »
I'm using Veralite with UI7 but can't figure this out.  I have an Insteon hidden door sensor that shows up as a motion sensor, and I was able to make a scene that when the door opens the light comes on, and then another that waits 15 minutes and turns it off.  I only want this to run after sunset though until sunrise but can't figure that out.  Under triggers if I go to Schedule, it seems like I can only pick AT a time, like if the time IS sunset, not "Enable this scene between these times".  Do I do that another way?  Thanks!

Offline Z-Waver

  • Master Member
  • *******
  • Posts: 4437
  • Karma: +247/-120
Re: How do I set a scene to run BETWEEN a timeframe?
« Reply #1 on: October 17, 2014, 12:24:49 pm »
To set a time range schedule, you will need to use a plugin like the Program Logic Event Generator(PLEG).

You can also use a single line of Lua code. Remove any schedules that you have created for the scene and add this line of code to the LUUP tab of the scene.
Code: [Select]
return luup.is_night() == true
The scene will then execute only between sunset and sunrise.

Offline 416to305

  • Jr. Member
  • **
  • Posts: 61
  • Karma: +0/-0
Re: How do I set a scene to run BETWEEN a timeframe?
« Reply #2 on: October 17, 2014, 08:10:27 pm »
Great thanks!  I found a plugin called Day/Night which seems to be from the same people as that PLEG you mentioned.  Was looking at PLEG but wasn't sure if it did that or not.  Does it work with UI7?  I love how Vera has so many plugins compared to when I used Insteon.  Seems that a lot of my issues are resolved with them.

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5625
  • Karma: +155/-376
Re: How do I set a scene to run BETWEEN a timeframe?
« Reply #3 on: October 18, 2014, 04:58:07 pm »
I love how Vera has so many plugins compared to when I used Insteon.  Seems that a lot of my issues are resolved with them.

You'll be finding new plugin's for a year or more. I still see someone talking about something and I have to run over and check it out since I never saw it before.