Left Top
About
Code
Contact
Digitemp
Jabber
Write-Ups
Blank
w3c_v
Illx Logo
 
Download | Requirements | Changes | Documentation
 

With my additions to digitemp, another configuration file is now needed.
The name of the configuration file is .digitemprc_mysql
It takes the following paramaters:

paramvalue
DBNAMEDATABASE_NAME
DBUSERDATABASE_USERNAME
DBPASSDATABASE_PASSWORD
DBHOSTHOSTNAME_WHERE_MYSQL_DB_LIVES
DBTABLEDATABASE_TABLE_TO_INSERT_DATA_INTO
DBCOLUMNSBLANK,SERIAL,SENSOR,TEMPC,TEMPF,TIMESTAMP

A sample .digitemprc_mysql file is located in the distribution.

Please note that there is only one space between the param and value

For DBTABLE: if undefined it will default to temps

For DBCOLUMNS: Any of the above columns can be specified in any order and can be duplicated.
   For example:

BLANK,TIMESTAMP,SENSOR,TEMPC,TEMPF,TIMESTAMP,SERIAL,BLANK
   would work for following the table
CREATE TABLE `ntemps1` (
  `foo` varchar(10) default NULL,
  `dt` datetime default NULL,
  `sensor` int(3) NOT NULL default '0',
  `temp_c` float NOT NULL default '0',
  `temp_f` float NOT NULL default '0',
  `time_date` datetime NOT NULL default '0000-00-00 00:00:00',
  `sensor_serial` char(24) NOT NULL default '',
  `bar` varchar(10) default NULL
);

Currently, I have digitemp run on a cron to take temps on my sensors every 5 minutes. Below is the cron entry:

0-55/5 * * * *  cd /home/user/digitemp-3.5.0;./digitemp -q -e

Also, more documentation on Home