Skip to content

philelson/Twilight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple script to turn on a group of hue lights at sunset+x

Turning a group on at twilight

  1. Configure config.json (see the example)
  2. Set the group you want to control
  3. Set the username hash from the hub
  4. Set the IP address of the hub
  5. Set the offset between sunset and when you want the lights on
  6. Set the loop delay
  7. Execute php run.php twilight

Turning a group off at night

  1. Configure night_config.json (see the example)
  2. Set the group you want to control
  3. Set the username hash from the hub
  4. Set the IP address of the hub
  5. Set the offset between sunset and when you want the lights on
  6. Set the loop delay
  7. Execute php run.php night

Configure the cron

Example cron below

0 16 * * *      /usr/bin/php /path/to/project/Twilight/run.php twilight
0 16 * * *      /usr/bin/php /path/to/project/Twilight/run.php night

In essence the twilight one runs at 16:00 and waits for the time to pass before turning the group on and exiting. The night one runs at 4 and waits for the cut of time to lapse before turning the lights off and exiting.

Logs

Output is sent to twilight.log which is in the root of the project

About

Simple project for switching on hue lights at sunset (+ offset)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages