#! /usr/bin/perl

my $out;
my $in;
my $x;

while (42) {
	# my 1-wire sensors are 000000a81a1c and 000800c4b4f8
	#

        $out = `cat /sys/devices/w1_bus_master1/28-000000a81a1c/w1_slave |grep "t=" | sed s/.*t=//` / 1000;
        $x = `/usr/bin/rrdtool update /home/oh3nwq/temps/outside.rrd N:$out`;

        $in =  `cat /sys/devices/w1_bus_master1/10-000800c4b4f8/w1_slave |grep "t=" | sed s/.*t=//` / 1000;
        $x = `/usr/bin/rrdtool update /home/oh3nwq/temps/inside.rrd N:$in`;

	# printf ("Out:  %-8.3f°C\n", $out);
	# printf ("In:   %-8.3f°C\n", $in);
}
