We have moved at community.getvera.com

Author Topic: Turning Off light automaticly when on daytime  (Read 1354 times)

Offline yatagx

  • Sr. Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Turning Off light automaticly when on daytime
« on: June 07, 2015, 12:19:17 am »
Hi i am new on the forums, i've been working with VERA controller for quite some time, i am trying to make a scene that always turn the light off in about 1 min
when is daytime only, i've heard that this is something that can be easly don with a ISY controller, but i would like to know if this can be done with a VERA controller

Offline Z-Waver

  • Master Member
  • *******
  • Posts: 4437
  • Karma: +249/-120
Re: Turning Off light automaticly when on daytime
« Reply #1 on: June 08, 2015, 11:01:14 am »
Yes, you can do this easily. Add the following code to the LUUP tab of your turn off scene. It will make the scene work only during the day and not at night.
Code: [Select]
return luup.is_night() == false
You could instead use plugins, like (Program Logic Event Generator(PLEG), to do this and a lot more.

Offline yatagx

  • Sr. Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Re: Turning Off light automaticly when on daytime
« Reply #2 on: June 18, 2015, 12:01:13 am »
hi, thank for your response, however this luup will not work for what i want, what i need is to make the light never gets on (or automaticly turn off after a sec) from 6:00 AM to 6:00PM or daylight

however will this plugin allow me to do this?

Offline Z-Waver

  • Master Member
  • *******
  • Posts: 4437
  • Karma: +249/-120
Re: Turning Off light automaticly when on daytime
« Reply #3 on: June 18, 2015, 07:43:36 am »
Yes.

Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
Re: Turning Off light automaticly when on daytime
« Reply #4 on: June 18, 2015, 09:08:15 am »
You can do this as a scene that has two triggers
1 when the light turns on
2 at the beginning of your off schedule

Then using the conditional logic guide you can use LUA to allow the actions to run during your off schedule.

The action is to turn off your lights.

You can also do this in PLEG. You can also turn it on at a specific time.

Note:with Vera you can use a time relative to sunlight for the start of your schedule using Scenes or PLEG.

If you have a lot of logic that operates relative to sunrise or sunset you may want to use the Day or Night plugin.

Offline yatagx

  • Sr. Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Re: Turning Off light automaticly when on daytime
« Reply #5 on: June 21, 2015, 02:47:51 pm »
Thankyou i finnaly solved the issue inserting  the Luup code in the scene