Software Overview  |  Sitemap  |  Downloads  |  Developers  |  Forums
Small_clear_logo_llc

Sun Interval Timer

The Sun Interval Timer Device is a superset of the Interval Timer. Like the Interval Timer, it acts like one of those plugin wall timers one buys at the hardware store, but it also understands times relative to when the sun rises and sets.

  • Note: for the Sun Interval Timer to work properly, the date and time must be correct on the host computer.

Time Intervals

Like the Interval Timer, the Sun Interval Timer Device has a single output terminal, "out", which it turns on for user definable intervals. It understands the same syntax as the Interval Timer plus two unique time strings called "sunrise" and "sunset". These two times are the sunrise and sunset times for a particular day.

The following are all valid intervals:

  • "9:14 to 17:00" - 9:14AM to 5PM
  • "23:30 to sunrise" - 11:30PM to sunrise (of the following day)
  • "sunset to 24:00" - sunset to midnight

If you want a time relative to sunrise or sunset, you can add or subtract the number of minutes you wish to differ.

  • "23:30 to sunrise - 10 " - 11:30PM to 10 minutes before sunrise
  • "sunset + 60 to 24:00" - an hour after sunset to midnight

As you can see, when adding and subtracting sunrise and sunset offsets, you can express the minutes as a pure number or as a simple arithmetic operation (the system understands +/-/*).

Time Intervals with a Day of the Month

You can define intervals for particular days of the month. See Interval Timer.

Time Intervals with a Day of the Week

You can define intervals for particular days of the week. See Interval Timer.

Using Days of the Month and Days of the Week Together

You can define intervals for particular days of the month and week. See Interval Timer.

Creating a Sun Interval Timer

Sun Interval Timers are created by running the TimerSunInterval Script. The Sun Interval Timer has one output terminal, "out" which is on during an interval, and off outside of any intervals. The TimerSunInterval Script takes two required parameters, "latitude" and "longitude", and three optional parameters: "intervals", "days", and "weekdays".

  • latitude : a decimal number from -90.00 to 90.00 which is the latitude of the sunrise/sunset location.

  • longitude : a decimal number from -180.00 to 180.00 which is the longitude of the sunrise/sunset location.

  • intervals : a double quoted string with one or more intervals, separated by commas. If this string is empty, the "intervals" will be valid during all times of the day.

  • days : a double quoted string with one or more days of the month, separated by commas. If this string is empty, the "intervals" will be valid during all days of the month.

  • weekdays : a double quoted string with one or more days of the week, separated by commas. Monday is day 1, and Sunday is day 7. If this string is empty, the "intervals" will be valid during all days of the week.

Running the TimerSunInterval Script with the parameters listed below will create an Sun Interval Timer which turns on from sunrise to 12PM and from an hour before sunset to 8:30AM the next day, on the first Wednesday of each month:

id: "my_timer"
intervals: "sunrise to 12:00, sunset - 60 to 8:30"
days:"1,2,3,4,5,6,7"
weekdays:"3"

Catalina Computing, LLC.

Copyright © Catalina Computing, LLC. (2013-2018)




Page last updated: Wed Jul 13 16:54:15 2016 (UTC)