Digitemp

This post contains everything that was on the last version of digitemp I updated (3.5.0) which was back in 2008.


Download | Requirements | Documentation


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 (2008-07-09), which is 3.5.0.

A major change has been made to allow for custom table and column definitions.

Please Note: I have only tested ds9097u, as I have DS18S20 sensors

This section of my site is dedicated to Brian Lane’s
Digitemp with my MySQL support addition.

I have modified Digitemp version 3.5.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 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s