We have moved at community.getvera.com

Author Topic: Switch device on during certain timeperiod  (Read 1275 times)

Offline Crismaison

  • Sr. Member
  • ****
  • Posts: 451
  • Karma: +2/-0
Switch device on during certain timeperiod
« on: December 14, 2012, 01:43:55 pm »
I have 2 scenes running, day and night. Night starts at 0:00 and day at 6:00. I have one device which should turn on at sunset and turn off at sunrise. In both scenes i added luup code to check luup.is night = true, then switch device on, but I am not sure if this is the correct way.
Vera lite - Everspring smoke & flood detectors - Fibaro doorsensors - 2 Foscams - Greenwave 6 node smartplug - Several Switches -Netatmo - PLEG - Twilio - DropBoxuploader - FindmyIphone user

Offline capjay

  • Hero Member
  • *****
  • Posts: 675
  • Karma: +9/-3
Re: Switch device on during certain timeperiod
« Reply #1 on: December 14, 2012, 02:14:05 pm »
when creating a scene, and setting a schedule, there's an option to run it at sunset or sunrise. No need to use "is_night" at all..

Offline Crismaison

  • Sr. Member
  • ****
  • Posts: 451
  • Karma: +2/-0
Re: Switch device on during certain timeperiod
« Reply #2 on: December 14, 2012, 02:33:51 pm »
Ok, i will check this. However, my night scene should start at noon. And i dont think you can run 2 scenes at once.
Vera lite - Everspring smoke & flood detectors - Fibaro doorsensors - 2 Foscams - Greenwave 6 node smartplug - Several Switches -Netatmo - PLEG - Twilio - DropBoxuploader - FindmyIphone user

Offline Crismaison

  • Sr. Member
  • ****
  • Posts: 451
  • Karma: +2/-0
Re: Switch device on during certain timeperiod
« Reply #3 on: December 16, 2012, 01:54:32 am »
Solved via the day or night plugin
Vera lite - Everspring smoke & flood detectors - Fibaro doorsensors - 2 Foscams - Greenwave 6 node smartplug - Several Switches -Netatmo - PLEG - Twilio - DropBoxuploader - FindmyIphone user