Is there any way to get the sensors to output in Kelvin?
----- Message from mjtice at gmail.com -----
Hi, I'm wondering if anyone has been successful setting up and graphing an item that fluctuates between positive and negative values? I'm trying to trend the temperature of my freezer. When I created the rrd earlier today (when positive values were generated) the graph was functional. When I put my sensors inside the freezer (where the temperatures drop a few degrees below zero F) the values wouldn't drop below zero on the graph. I tried modifying the current rrd tool with: rrdtool tune /home/hobbit/data/rrd/tice/freezer.rrd --minimum freezerf:U (which did drop the minimum to nan) but I still couldn't get negatives to show on the graph. I thought I'd delete the rrd and start over - but I think now that the values are negative numbers the rrd won't even create. Here is a snippet from my hobbitgraph and hobbitserver files
[freezer] TITLE Freezer Temperature YAXIS Degrees DEF:tl=freezer.rrd:freezerf:AVERAGE #CDEF:wipeoutf=tl,-1,* DEF:cel=freezer.rrd:freezerc:AVERAGE #CDEF:wipeoutc=cel,-1,* LINE2:tl#@COLOR@:Temperature F #LINE2:wipeoutf#@COLOR@:Temperature -F LINE2:cel#@COLOR@:Temperature C #LINE2:wipeoutc#@COLOR@:Temperature -C COMMENT:\n GPRINT:tl:LAST:Temperature F\: %2.1lf (cur) GPRINT:tl:MAX:\: %2.1lf (max) GPRINT:tl:MIN:\: %2.1lf (min) GPRINT:tl:AVERAGE:\: %2.1lf (avg)\n GPRINT:cel:LAST:Temperature C\: %2.1lf (cur) GPRINT:cel:MAX:\: %2.1lf (max) GPRINT:cel:MIN:\: %2.1lf (min) GPRINT:cel:AVERAGE:\: %2.1lf (avg)\n
NCV_freezer="*:GAUGE" (with freezer=ncv at the end of TEST2RRD and freezer and the end of GRAPHS).
Here is my script that generates the NCV for the rrd:
#!/bin/sh COLUMN=freezer # Name of the column COLOR=green # By default, everything is OK
[ -f ./.digitemprc ] || /usr/local/bin/digitemp_DS9097U -s/dev/ttyS0 -i
TEMPERATURE=$(/usr/local/bin/digitemp_DS9097U -s/dev/ttyS0 -a | awk '{print $9}' | tail -1 | awk -F. '{print $1}')
if [ "${TEMPERATURE}" -gt 30 ]; then COLOR=red MSG="Temperature above 30 degrees" else COLOR=green MSG="Temperature normal" fi
Section for data graphing
TEMPERATURE2_F=$(/usr/local/bin/digitemp_DS9097U -s/dev/ttyS0 -a | awk '{print $9}' | tail -1) TEMPERATURE2_C=$(/usr/local/bin/digitemp_DS9097U -s/dev/ttyS0 -a | awk '{print $7}' | tail -1)
echo "freezerf : ${TEMPERATURE2_F}" > $BBTMP/freezer_f.txt echo "freezerc : ${TEMPERATURE2_C}" > $BBTMP/freezer_c.txt
$BB $BBDISP "status $MACHINE.freezer $COLOR $MSG
cat $BBTMP/freezer_f.txtcat $BBTMP/freezer_c.txt"rm $BBTMP/freezer_f.txt rm $BBTMP/freezer_c.txt
exit 0
If anyone has an idea please let me know - I'd really like to trend this data.
Thanks,
Matt
-- --Ben Benjamin P. August System Administrator - VPUE Stanford University