more G-Labs products

Author Topic: Dusk and Dawn function  (Read 1429 times)

March 06, 2015, 09:53:51 AM
Read 1429 times

Maximo

  • ***
  • Information
  • Full Member
  • Posts: 84
I've opened a request for this;

The Sunrise / Sunset schedules are great and can be used for a number of lighting functions. However there are times when it's quite dark inside by the time Sunset arrives. Would it be possible to create a Dusk and Dawn function, where the time is say 20 minutes prior or post?

March 06, 2015, 11:19:35 AM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Enable the Solar Altitude program and use schedules defined by it.

Cheers,
g.

March 06, 2015, 05:05:28 PM
Reply #2

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
If none of those values work for your needs, you could also either create a new script or modify the Solar Altitude code to create a new dusk/dawn value or your desired offset.  There are enough values already in the existing app that you should find something sufficient though.

March 12, 2015, 02:50:39 PM
Reply #3

NickP

  • *
  • Information
  • Newbie
  • Posts: 24
I had the same need, in my case 1 hour before sunset.
You could add this into the Solar Altitude code; easy to see where, there is a block of lines that are similar.

Code: [Select]
SolarAltitude.saveTimer("jkUtils.SolarAltitude.Evening.Sunset.Dusk",sun.sunsetStart,-20);