# $Id: temperaturecontrolrc.sample,v 1.11 2005/04/03 03:40:39 grog Exp grog $ # # Sample configuration file for brewing temperature control program. # # Greg Lehey, 30 May 2004. # # Copyright (c) 2004 by Greg Lehey # # This software is distributed under the so-called ``Berkeley # License'': # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # This software is provided ``as is'', and any express or implied # warranties, including, but not limited to, the implied warranties of # merchantability and fitness for a particular purpose are disclaimed. # In no event shall Domenick Venezia be liable for any # direct, indirect, incidental, special, exemplary, or consequential # damages (including, but not limited to, procurement of substitute # goods or services; loss of use, data, or profits; or business # interruption) however caused and on any theory of liability, whether # in contract, strict liability, or tort (including negligence or # otherwise) arising in any way out of the use of this software, even if # advised of the possibility of such damage. # ############### End of legalese ############### # # By default this file is called # /usr/local/etc/temperaturecontrol/.temperaturecrontrolrc (and yes, # the long name is deliberate). # # Entries in this file are of two kinds: # # 1. Comments, like this one. The program completely ignores lines # starting with #, and also empty lines. # 2. Configuration entries. They start with a keyword and possible # parameters. In fact, the program considers them to be commands. # # All of these parameters have defaults, the ones shown in the # example. As a result, the contents of this configuration file make # no net change to the program configuration. # # The serial line from which to read temperature data. # For Linux, you might use something like /dev/ttyS0. # serialline /dev/cuaa0 # # The bit rate of the serial line (bps). */ linespeed 2400 # # Temperature probe use. Presently we measure only room temperature # (outside the fridge), ambient temperature (inside the fridge) and # fermenter temperature (typically intended to be the surface). This # program is currently set up for four probes, which leaves one over. # It will be monitored, but at present there's no particular use for # it. This may change. # The temperature probe with the room temperature. # roomtempprobe 1 # # The temperature probe with the ambient (in-fridge) temperature. # This doesn't have to exist; set to -1 if it isn't there. # ambientprobe 2 # # Next we have a number of descriptive texts. They're purely # cosmetic: a list saying "fermenter 1" is less informative than # "brew 37" or "pale ale". For each fermenter there are three # labels: one for printing when there's enough space, and two others # for when there isn't, and it needs to be split over two lines. # This is the case with the status display. # # For silly reasons, the short versions for the first fermenter are # limited to 6 characters each, while the short versions for the # second fermenter are limited to 7 characters. Expect this to # change. # fermenter1label Fermenter 1 fermenter1label1 Ferm- fermenter1label2 enter fermenter2label Fermenter_ 2 fermenter2label1 Ferm- fermenter2label2 ent_2 # # The temperature probe with the fermenter temperature. # fermenterprobe 3 # # The temperature probe with the second fermenter temperature. # fermenter2probe 0 # # Due to the nature of the cooling hardware, the same cooling applies # to all fermenters in the fridge, but the temperatures of each # fermenter can be different according to the rate of fermentation # and the air flow around the fermenter. By default, the base # temperature (the one used to control the temperature) is the # temperature of the first fermenter. probe2factor is a value # between 0 and 1 which specifies to what extent the temperature of # the second probe should be used to calculate the base temperature. # # The formula is: # # basetemp = probe2temp * factor + probe1temp * (factor - 1) # # A factor of 0 will use the temperature of probe 1 as the base # temperature; a factor of will use the temperature of probe 2 as the # base temperature. A factor of 0.4 will set the base temperature at # .4 of the way from probe 1 temperature to probe 2 temperature. # probe2factor 0 # # The file in which to save temperature information. By default, it # is relative to the current working directory, but it doesn't have to # be. # logfile "tempinfo" # # The time interval with which to log, in seconds. 900 seconds is 15 # minutes. # loginterval 900 # # The number of lines on a "page" of the log file. After this # interval, a new heading appears. # logpagesize 50 # # The time to display idle status messages. These are typically the # reason that the system is currently idle, and they soon become # boring. On the other hand, if they're only displayed once, they're # liable to be missed. This parameter is the number of seconds to # display the message. idledisplaytime 10 # The file to which to display current information. This is intended # to be displayed on a screen, so it's written to every time. By # default the current information is not displayed; set this variable # to display it. To display on the current terminal, set it to # /dev/tty. # # displayfile /dev/tty # # The file in which to log information for graph plotting. # Default is not to log. # graphlogfile # # The time interval with which to log, in seconds. 600 seconds is 10 # minutes. # graphloginterval 600 # # Set to on to log significant events to syslogd. # dosyslog on # # syslog priority. Currently not changeable. # # syslog_prio LOG_INFO | LOG_USER # # For debugging, log to this file. By default there is no file, # meaning that we don't do debug logging. # # To turn debugging off, specify the debugfile keyword without an # argument. # debugfile # # Part 2: temperature control outputs. # relayline is the (parallel) port controlling the relays. # relayline /dev/ppi0 # # We define two relays for controlling the temperature. These values # specify the output bits on relayline needed to set them. # coolrelay 1 heatrelay 2 # # We can't turn things on and off all the time. In particular, # refrigerators would die quickly. It also confuses the regulation. # The following two variables specify the minimum times, in seconds, # that the heater and cooler should be on and off. heateronmin 30 heateroffmin 300 cooleronmin 30 cooleroffmin 120 # To avoid oscillation, it's probably a good idea to wait longer # betweeen changing tack. These are the minimum times from cooler # off to heater on and heater off to cooler on. coolertoheaterdelay 600 heatertocoolerdelay 600 # Temperatures. All temperatures are in Celsius (or Kelvin where it # doesn't make any difference). If you really want to use Fahrenheit, # either change the source, or better, don't. Instead, convert to # Celsius with the formulae C = (F - 32) / 1.8 and F = C * 1.8 + 32. # # Initial goal temperature. This is the temperature you want to aim # for when you start the program. Depending on what you're doing, # you can maintain this temperature throughout the fermentation or # gradually change to the end temperature at a fixed rate. # # This variable has a relatively sensible default, but you'll almost # certainly want to change it. starttemp 18 # Final goal temperature. This is the temperature you want to aim # for later in fermentation. The goal temperature changes uniformly # from starttemp to endtemp by the time specified by the second # parameter, which specifies the time and date by which to complete # the change. So, for example, you could complete the transition # from 20° to 17° by 15 August 2005, 20:15 with: # # starttemp 20 # endtemp 17 15 aug 2005 20:15 # # To disable this feature, remove the second parameter. Under these # circumstances the end temperature is ignored. Commenting out the # line won't work, since the program logic will then leave the old # value in place. Yes, this is not the most intuitive way to do # things, but I can't think of a better one. endtemp 18 0 # It's easy to overshoot the temperature we're aiming for. We need a # middle ground where we're neither heating nor cooling. These values # specify how far the temperature should drop below the goal # temperature before turning on the heating and how far the # temperature should rise above the goal temperature before turning on # the cooling. # coolerholdoff 0.5 heaterholdoff 0.5 # # On the other hand, if there's no or only minimal overrun, stopping # dead on the temperature can mean that the average is offset. # Counter this by not stopping until we have overrun a little. This # can use a lot of tuning. # # These values relate to coolerholdoff and heaterholdoff # respectively: they're the multiple of these values by which the # cooler or heater should overshoot. So a cooler holdoff of 0.5° and # a cooler overshoot of 0.9 means that the cooler will turn off when # the temperature has risen 0.45° above the goal temperature. # coolerovershoot 0.9 heaterovershoot 0.9 # # In addition to this, we have some absolute values for the difference # between ambient temperatures and desired wort temperature. They're # differences, not absolute temperatures, so they depend on the # desired wort temperature. I'm particularly concerned about # overheating worts, so this one is lower. # maxcooltempdiff 15 maxheattempdiff 5 # # Finally, for lagers, we need to ensure that we don't freeze the # thing. We also don't want to boil it. These are absolute # temperatures. # maxambienttemp 30 minambienttemp 0 monitor