This code computes sunrise and sunset times. There is a library and an assortment of utilities. The most useful utility is x10events. This program parses crontab files and updates the time fields to track sun events given instructions in the comments.
This code does not control X10 devices directly. You need a package like HEYU or X10 depending on the kind of hardware you have. x10events merely updates crontab entries.
I use HEYU to control my X10
devices. A special user, x10, has a crontab file containing only heyu
events. Special comments on each event specify the style of event:
absolute, sunrise relative, or sunset relative.
Absolute events are not modified. Relative events are scheduled according
to the specified event and offset. Here is a section of my crontab file:
22 5 * * * /usr/local/bin/heyu turn tree on # rise +0.00 51 17 * * * /usr/local/bin/heyu turn tree off # set +0.00 0:15 51 16 * * * /usr/local/bin/heyu turn porch on # set -1.00 30 23 * * * /usr/local/bin/heyu turn porch off # abs
There is also a program, today, that calculates sunrise and sunset information for the current day and a program, year, that computes an entire year's data.
X10 Ephem is GPL'd free software.
Here is the current version .
Here is the README .
Here are the Frequently Asked Questions .
...for bug fixes or feature code: