Hardware used/needed

More info is pending but will be added here along with images. For now i recommend to check out the Youtube video setup for further instructions.

Software – the simple way

If you want to go the simple route and just show latest temperatures on a webpage like below this is how you should do it.

Plain installed Rasp with raspian

apache2 – as webserver to display the numbers

bc – To round the numbers given from the sensors.

First of all go ahead and install above packages needed:

sudo apt-get install bc apache2

What you then need to do is to add this line

dtoverlay=w1-gpio

into /boot/config.txt wherever you want and then reboot the computer.

When that is done you can go ahead and add this script:

#!/bin/bash
# This script is created by daromer aka DIY Tech & repairs
# 2017 and you are free to use it as long as credits goes back to me
# http://diytechandrepairs.nu
# https://www.youtube.com/channel/UCI6ASwT150rendNc5ytYYrQ

#This defines what file to store the data in for your webserver
webfile=”/var/www/html/temp.html”
#Where the 1wire sensors resides
path=”/sys/bus/w1/devices/w1_bus_master1/”

#DOnt edit below unless you know what you are doing

if [ `grep -c “dtoverlay=w1-gpio” /boot/config.txt` -lt 1 ]; then
echo “You need to add \”dtoverlay=w1-gpio\” to the bottom of /boot/configt.txt and reboot your computer”
exit
fi
if [ `lsmod | grep -c w1_gpio` -lt 1 ]; then
echo “Trying to include w1_gpio for you. You have to restart this program. If it fails again please investigate”
modprobe w1_gpio
exit
fi
if [ `lsmod | grep -c w1_therm` -lt 1 ]; then
echo “Trying to include w1_therm for you. You have to restart this program. If it fails again please investigate”
modprobe w1_therm
exit
fi

if ! [ -x “$(command -v bc)” ]; then
echo ‘bc command is not installed. Run apt-get install bc.’ >&2
exit
fi
echo “All fine and dandy and program is now up and running. Kill it with ctrl + c”
while [ 1 ]; do

This will produce output that should be shown in https://<ip to your rasp>/temp.html.

Software – The more complicated way

Above image is drawn up by Grafana. A very good front end that fetches data from Graphite.

I will not go into here how to install that but just refer to some links that will help you out. First of all there is no pre-made packages for running Grafana on Raspberry pie by the vendor but there are some guys that have some packs on Git for that instead.

First of all you need to make sure you have a running Rasp with Raspian. I recommend you follow this guide:

If you have followed all those gguides do have a script that will feed all data from your sensors into Graphite and you can then create above beautiful graphs from your charging station!

if [ `grep -c “dtoverlay=w1-gpio” /boot/config.txt` -lt 1 ]; then
echo “You need to add \”dtoverlay=w1-gpio\” to the bottom of /boot/configt.txt and reboot your computer”
exit
fi
if [ `lsmod | grep -c w1_gpio` -lt 1 ]; then
echo “Trying to include w1_gpio for you. You have to restart this program. If it fails again please investigate”
modprobe w1_gpio
exit
fi
if [ `lsmod | grep -c w1_therm` -lt 1 ]; then
echo “Trying to include w1_therm for you. You have to restart this program. If it fails again please investigate”
modprobe w1_therm
exit
fi