-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from marcelb98/charts
Charts
- Loading branch information
Showing
15 changed files
with
271 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,10 @@ License: MIT | |
Copyright © Federico Zivolo and contributors | ||
License: MIT | ||
|
||
* CHARTIST.JS (http://gionkunz.github.io/chartist-js/) | ||
Copyright (c) 2013 Gion Kunz <[email protected]> | ||
License: MIT | ||
|
||
piTemp also relies on 3rd-party-software which isn't distributed with the source code of piTemp: | ||
- Python (https://www.python.org/) | ||
- PostgreSQL (https://www.postgresql.org/) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
# piTemp | ||
piTemp gives you the availability to show and track temperatures measured by DS1820-sensors. | ||
You can access the tracked temperatures over HTTP. | ||
|
||
## Installation | ||
1. Install postgresql (On RPi: `sudo apt install postgresql libpq-dev`) | ||
2. Install python3/pip (On RPi: `sudo apt-get install python3-pip`) | ||
3. Clone this repo and switch to the cloned directory | ||
4. Run `sudo pip3 -r requirements.txt` to install all dependencies | ||
5. Create a database + user with access-rights to this db | ||
6. Run `./setup.py` to configure piTemp | ||
7. Setup cronjob for `./cron.py` to automatically save temperatures to db. | ||
Initially piTemp was developed for Raspberry Pi, but it should run on every Linux with Python3 and PostgreSQL. | ||
|
||
![alt text](https://screenshots.firefoxusercontent.com/images/e2d5f2fe-8d64-4c08-988f-7fceab16adb8.png "Overview") | ||
|
||
![alt text](https://screenshots.firefoxusercontent.com/images/f1977798-9466-4337-9858-50cc00f4b770.png "Detail") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{# Copyright 2017 Marcel Beyer | ||
|
||
This file is part of piTemp. | ||
|
||
piTemp is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
piTemp is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with piTemp. If not, see <http://www.gnu.org/licenses/>. #} | ||
|
||
{% extends "chart_template.html" %} | ||
{% block body %} | ||
|
||
<div class="container"> | ||
<a href="/detail/{{ sensor }}/{{ begin }}/{{ end }}">back</a> | ||
<b>{{ sensor_name }}</b> {{ begin }} - {{ end }}<br> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div class="ct-chart ct-minor-seventh" style="width:100%;height:100%"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript" > | ||
var data = { | ||
labels: [{% for label in labels %}'{{label}}',{% endfor %}], | ||
series: [ | ||
[{% for value in values %}{{value}},{% endfor %}] | ||
] | ||
}; | ||
var options = { | ||
axisX: { | ||
offset: 50 | ||
}, | ||
} | ||
|
||
new Chartist.Line('.ct-chart', data, options); | ||
</script> | ||
|
||
{% endblock %} |
Oops, something went wrong.