rpi-temperature

About

This repository contains the scripts required to:

Specifications

Raspberry Pi model: B+
Sensor model: DS18B20 (waterproof)
Kernel release: 4.1.19+ (Raspbian)
RRDtool version: 1.4.7
The graphs will be of PNG file format

Installation

Install RRDtool and a web server (i.e. Apache):

apt-get install rrdtool apache2

Download and save temp-sensor.sh and temp-graph.sh in /root/bin/ for example.

Edit the following line found in function read_raw_data (temp-sensor.sh)

RAW_DATA=$(cat /sys/bus/w1/devices/28-04146dd116ff/w1_slave)

replacing 28-04146dd116ff with the number corresponding to your device. Then add the two shell scripts as cron jobs by executing:

crontab -e

and adding the following two lines:

@reboot /root/bin/temp-sensor.sh
* * * * * /root/bin/temp-graph.sh > /dev/null 2>&1

Save and exit!

Images


Webpage
Webpage


Sample graph (2 Hour Temperature Log)
Sample Graph


Sample graph (4 Hour Temperature Log)
Sample Graph


Sample graph (12 Hour Temperature Log)
Sample Graph

Developer

George Z. Zachos

Licence

GNU GENERAL PUBLIC LICENSE Version 2, June 1991