Giter Site home page Giter Site logo

pitemp's Introduction


Information for using plot.ly:

You have to install the plot.ly python package first. For instruction see https://plot.ly/api/.

Then, in the update_plotly.py file fill in your username and api key!

The plot.ly graph can also be embed in your website by using the following code (just replace the plot.ly link):

<iframe id="igraph" src="https://plot.ly/~jensb89/12/400/250/" width="400" height="250" seamless="seamless" scrolling="no"></iframe>

#PiTemp

A simple script that monitors your Raspberry Pi's temperature.


Example Photo

##Installation

Before you can start monitoring your Pis temperature in your webbrowser you need to install a webserver with PHP. I use a LAMP setup. Follow one of the many guides like this or this one to setup your Raspberry Pi as a webserver.

If you have git installed on your Raspberry you can easily clone the repo into the webroot of your webserver.

// Example is for apache only. 
// Replace /var/www/ with the webroot of your webserver
cd /var/www
git clone https://github.com/fechu/PiTemp

The next thing to do is to setup cron to execute the monitor.php script every 15 minutes to write down the temperature. You do this by modifing the file /etc/crontab like this:

sudo nano /etc/crontab

Add the following line to the end of the file.

*/15 *  * * *   root    /var/www/PiTemp/monitor.php

This tells cron to execute the script every 15 minutes of an hour. root is the user that executes the script. and /var/www/PiTemp/monitor.php is the script that is executed.

That's it! Now you need to wait for your script to collect the data.

As soon as you can't wait anymore, just open your browser (the computer has to be connected to the same network as the Raspberry Pi) and navigate to http://<Your Pi's IP>/PiTemp.

##Configuration

You can find all configuration options in the config.php file. Have a look at it. Everything is directly documented in the config.php file.

###Override Configuration In case you want to override the configuration but keep it easy to update PiTemp with a git pull, you can copy the config.php file and name it local.config.php. This file will then be ignored by git but merged with the config.php. This way you the config.php file stays untouched.

###Email Notification

Since version 0.1.0 there's support for email notification. You can define a maximum temperature in the config.php (or local.config.php) file. If the temperature raises above this level, you receive an email notification to the configured address.

The configuration of email notification is not that hard once you've configured your Raspberry Pi to send emails. However, this can be a little bit tricky. Use one of the many tutorials out there in the world wide web. I used this one to set postfix up. You just have to make the PHP mail() function work.

###Pushover Notification

Since version 0.2.0 there's support for Pushover notification. If you want to use this feature, make sure you have the cURL extension for PHP installed. You can do so by executing the following commands:

sudo apt-get install php5-curl

The next (and last) thing you have to do is insert your Pushover userkey in your config.php/local.config.php file.

###Pushbullet Notification

Since version 0.3.0 there's support for Pushbullet. If you want to use this feature you just have to drop in your API Key and Device ID into the config/local.config.php file.

##Todo

  • Support F° & C° in notifications
  • Support multiple Raspberry Pi
  • Select timespan
  • Use Sqlite/Mysql database instead of textfile
  • Add possibility to test notifications
  • Add support for hostname/IPAddress in Pushover notification

##Libraries

This project uses the following libraries or parts of them:

##Contributors

##License

The MIT License (MIT)

Copyright (c) 2013 Sandro Meier

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

pitemp's People

Contributors

fechu avatar mrkale avatar jensb89 avatar swooningfish avatar lfdmartins avatar elpatron68 avatar ruester avatar

Stargazers

 avatar Luke Griffiths avatar Hitesh avatar George Baker avatar Peter avatar Bryan Copeland avatar Manuel Gopar avatar Robert Dahlberg avatar David Tabernero Pérez avatar  avatar  avatar Rachel Rayns avatar Dawid van Graan avatar Jakob Aarup Skov avatar Michael Curry avatar Markus Proske avatar Russ avatar Hannes avatar  avatar JeffJRare avatar  avatar Jonas Lejon avatar  avatar  avatar  avatar

Watchers

tomasz przechlewski avatar Erik Hennerfors avatar James Cloos avatar Marvin avatar Gerardo Puerta avatar  avatar  avatar  avatar Jose Vazquez avatar Jeff Johnston avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.