Left Top
About
Code
Contact
Digitemp
Jabber
Write-Ups
Blank
w3c_v
Illx Logo
 
version 3.2.0
 
This is the homepage for Digitemp with built-in MySQL support.

Update! MySQL modifications have now been made to the lastest version
of Digitemp at this time (2003-07-17), which is 3.2.0.
To find version 2.6.1 with MySQL modifications, go here.

This site is dedicated to Brian Lane's Digitemp with my MySQL support addition.

I have modified Digitemp version 3.2.0 with an extra command line argument '-e'.
When this version of digitemp is run with the -e option './digitemp -e' it will
read the '.digitemprc_mysql' config file, and insert the data into a mysql table.

Here is an example of some inserted data:
mysql> select * from temps order by time_date desc limit 1;
+--------+--------+--------+------------------+---------------------+
| sensor | temp_c | temp_f | sensor_serial    | time_date           |
+--------+--------+--------+------------------+---------------------+
|      1 | 20.125 | 68.225 | 10DDDD47000800D7 | 2002-11-19 15:06:59 |
+--------+--------+--------+------------------+---------------------+
1 row in set (0.00 sec)

Here is what the general table should look like:
mysql> describe temps;
+---------------+----------+------+-----+---------------------+-------+
| Field         | Type     | Null | Key | Default             | Extra |
+---------------+----------+------+-----+---------------------+-------+
| sensor        | int(3)   |      |     | 0                   |       |
| temp_c        | float    |      |     | 0                   |       |
| temp_f        | float    |      |     | 0                   |       |
| sensor_serial | char(24) |      |     |                     |       |
| time_date     | datetime |      |     | 0000-00-00 00:00:00 |       |
+---------------+----------+------+-----+---------------------+-------+
5 rows in set (0.00 sec)

And, here is the create_table() command to make the table:
create table temps (
  sensor int(3),
  temp_c float,
  temp_f float,
  sensor_serial char(24),
  time_date datetime
); 

I hope someone finds this useful :)