I decided to share this ROM with you, because I think it's really cool. Based on stock ROM with additional settings. You have to root your device, before install the ROM. You can check link below for instructions. ENJOY!
Source: xda-developers.com
News, Gadgets, Computers, Internet, Networking, GSM, EDC every day carry, lifestyle.All about cool stuff. Personal blog.
sudo modprobe w1-gpio
sudo modprobe w1-therm
cd /sys/bus/w1/devices
ls
cd 28-xxxx (change this to match what serial number pops up)
cat w1_slave
#!/usr/bin/perl
$mods = `cat /proc/modules`;
if ($mods =~ /w1_gpio/ && $mods =~ /w1_therm/)
{
print "w1 modules already loaded \n";
}
else
{
print "loading w1 modules \n";
$mod_gpio = `sudo modprobe w1-gpio`;
$mod_them = `sudo modprobe w1-therm`;
}
$sensor_temp = `cat /sys/bus/w1/devices/10-*/w1_slave 2>&1`;
if ($sensor_temp !~ /No such file or directory/)
{
if ($sensor_temp !~ /NO/)
{
$sensor_temp =~ /t=(\d+)/i;
$tempreature = (($1/1000)-0); #You can fix your temp value.In this case is0
print "fireplace temp = $tempreature\n"; #Print fireplace temp as result
exit;
}
die "Error locating sensor file or sensor CRC was invalid";
}
sudo apt-get install rrdtool
pi@raspberrypi:~/rrdtool create fireplace.rrd --step 300 \
DS:temp:GAUGE:600:0:100 \
RRA:AVERAGE:0.5:1:12 \
RRA:AVERAGE:0.5:1:288 \
RRA:AVERAGE:0.5:12:168 \
RRA:AVERAGE:0.5:12:720 \
RRA:AVERAGE:0.5:288:365
#!/bin/bash
RRDPATH="/home/pi/temperature/"
RAWCOLOUR="#FF0000"
TRENDCOLOUR="#0000FF"
# Edited 2012/12/9 to add running averages to hourly and daily graphs
#hour
rrdtool graph $RRDPATH/hour.png --start -6h \
DEF:temp=$RRDPATH/fireplace.rrd:temp:AVERAGE \
CDEF:trend=temp,1800,TREND \
LINE2:temp$RAWCOLOUR:"Hourly Raspberry PI temperature" \
LINE1:trend$TRENDCOLOUR:"30 min average"
#day
rrdtool graph $RRDPATH/day.png --start -1d \
DEF:temp=$RRDPATH/fireplace.rrd:temp:AVERAGE \
CDEF:trend=temp,21600,TREND \
LINE2:temp$RAWCOLOUR:"Daily Raspberry PI temperature" \
LINE1:trend$TRENDCOLOUR:"6h average"
#week
rrdtool graph $RRDPATH/week.png --start -1w \
DEF:temp=$RRDPATH/fireplace.rrd:temp:AVERAGE \
LINE2:temp$RAWCOLOUR:"Weekly Raspberry PI temperature" \
#month
rrdtool graph $RRDPATH/month.png --start -1m \
DEF:temp=$RRDPATH/fireplace.rrd:temp:AVERAGE \
LINE1:temp$RAWCOLOUR:"Monthly Raspberry PI temperature" \
#year
rrdtool graph $RRDPATH/year.png --start -1y \
DEF:temp=$RRDPATH/fireplace.rrd:temp:AVERAGE \
LINE1:temp$RAWCOLOUR:"Yearly Raspberry PI temperature" \
# m h dom mon dow command
*/5 * * * * /home/pi/temperature/get_temp_one.pl
*/5 * * * * /home/pi/temperature/graph_temp_one.sh
get_temp_one.pl - script for ONE sensor
get_temp_multiple.pl – script for MULTIPLE sensors
graph_temp_one.sh – graph ONE sensor
graph_temp_multiple.sh – graph MULTIPLE sensor
create_rrd.sh – creates rrd file
createrrd_multi.sh - creates rrd file for multiple sensors