[go: nahoru, domu]

Skip to content

DigitumDei/raspberry-pi-temperature

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raspberry Pi temp with Grafana/InfluxDB

There are two parts to this set up

  1. Remote server to run Docker with grafana and influx containers provisioned with docker-compose.yml. This is where the Raspberry Pi is going to push its temp stats
  2. A Raspberry Pi, running rasbian, with a waterproof DS18B20 Digital temperature sensor

One the remote host (ie your local PC, a DigiatlOcean Droplet, ensure that docker is running.

then clone this repo and run docker-compose up

This will create a grafana/influxDB stack where we will be able to see our RPi Temp stats.

Copy the logger.py script on to the Raspberry Pi host. You may need to change the following variables, to match what you set for the grafana/influxdb stack:

influx_host = '192.168.0.5'
host = 'some-hostname'
port = 8086
dbname = 'dname'
user = 'user'
password = 'pass'
temp_sensor = '/sys/bus/w1/devices/28-0315906e8dff/w1_slave'

You can then import the grafana-dashboard.json from your grafana instance, and be able see the temp stats from your RPi! The dashboard is simple with a time graph, and s single stat gauge for near real time temp. I have also greated some alerts when temperatures are outside of a specified range

I use this in my home brewing rig, to monitor mash temperatures, and alert me when mash temp has deviated too much from the desired mash mash temperature.

You will need to rename some of the parameters in the dashboard for you own use case!

Feel free to reach out to me if you have any issues!

About

OneWire temp logger on RPI, with Grafana and InfluxDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 88.4%
  • Shell 11.6%