diff --git a/tellstickd/README b/tellstickd/README index b702939e..9e1885ba 100644 --- a/tellstickd/README +++ b/tellstickd/README @@ -13,20 +13,20 @@ Installation ================= 0. Install rfcmd and necessary perl modules (on a typical Fedora/Centos/RHEL with the necessary repos installed, this should do it for you: yum install perl-DateTime perl-DateTime-Event-Sunrise). -1. Copy the file tellstickd-version/tellstickd to /usr/local/bin/ +1. Copy the file tellstickd-version/tellstickd to /usr/local/bin/ (or anywhere else depending on your wishes). -2. Copy the file tellstickd-version/tellstickd.conf to /etc/ +2. Copy the file tellstickd-version/tellstickd.conf to /etc/ (or anywhere else depending on your wishes). 3. Copy the suitable init script found under tellstickd-version/init_script to /etc/rc.d/init.d, this way you can control the script as any other service, easily make it start at boot (with chkconfig --level 35 tellstickd on). The file init_script/tellstickd is a Redhat type script whereas init_script/tellstickd.debian not unexpectedly should work on Debian type systems. -4. Remember to make the perl-script and init scripts executable. As root chmod 755 /usr/local/bin/tellstickd /etc/rc.d/init.d/tellstickd +4. Remember to make the perl-script and init-script executable. As root chmod 755 /usr/local/bin/tellstickd /etc/rc.d/init.d/tellstickd Configuration ================= 1. In tellstickd.conf: a. Set appropriate coordinates and timezone to suit your geographical location (further information: http://search.cpan.org/dist/DateTime-Event-Sunrise/lib/DateTime/Event/Sunrise.pm). - b. Specifiy the rfcmd binary location. Default: /usr/local/bin/rfcmd + b. Specifiy the rfcmd-binary location. Default: /usr/local/bin/rfcmd c. Specify the tellstick device name. Default: /dev/tellstick - d. If the default locations of the config and logfile not are according to your wishes, modify them here. Note 1: this can also be done with the tellstickd options --config and --logfile. Note 2: If you use the init script, these settings must be done in the init-script /etc/rc.d/init.d/tellstickd. + d. Specify the location of the logfile. e. Add device configurations. Multiple definitions for each device are possible (avoid having on and off times of multiple definitions overlapping each other). 2. If you would like this script to start at boot-time, on a RHEL/Centos/Fedora system, execute the following command chkconfig --level 35 tellstickd on diff --git a/tellstickd/tellstickd.conf b/tellstickd/tellstickd.conf index e08bcbbd..081194e7 100644 --- a/tellstickd/tellstickd.conf +++ b/tellstickd/tellstickd.conf @@ -23,31 +23,38 @@ log_file = /var/log/tellstickd pid_file = /var/run/tellstickd.pid # -# +# # # In valid day field, days are numbered 1=Monday, 2=Tuesday, ... , 7=Sunday. I.e. 1234567 means that the rule should be active every weekday. # The day fields can be prefixed with "o" or "e" making the rule valid on odd or even weeks. Week numbers are # calculated according to ISO, with the first week of the year being the one containing 4 jan # Time format xx:yy where xx is hour and yy is minute -# Multiple definitions are possible for each device +# Multiple definitions are possible for each device. Be aware that overlapping rules (overlapping in time) can/will cause troubles. # # Setting and the same means that the device will always be switched on. # + +# Sample rules + + # The sample rule below will turn on the device between 06:10 and 06:20 and off between 22:00 and 23:00 monday to friday. # The device will be turned off daytime 10 minutes after sunrise and 15 before sunset SARTANO 0000000000 12345 06:10-06:20 22:00-23:00 10 15 -# This device will be turned on between 07:34 and 07:48, turned off between 23:00 and 23:15 (applies for every day in the week). -# It will not be turned off daytime -NEXA P2 1234567 07:34-07:48 23:00-23:15 +# This device will be turned on between 07:34 and 07:48, turned off between 23:00 and 23:15 (every day of the week). +# It will be turned off exactly on sunrise and off exactly on sunset. +NEXA P2 1234567 07:34-07:48 23:00-23:15 0 0 # This device will be turned on 07:00 off between 20:00 and 20:30 and will be on daytime on sundays. NEXA P3 7 07:00 20:00-20:30 -# This device will be turned on 07:00 and off 20:00 on fridays and sundays on even numbered weeks +# This device will be turned on 07:00 and off 20:00 on fridays and sundays on evenly numbered weeks NEXA P3 e57 07:00 20:00 +# This device will be turned on 07:00 and off 20:00 on fridays and sundays on oddly numbered weeks +NEXA P3 o57 07:00 20:00 +