Permalink
Browse files

New PHP based version of the datalogger.

  • Loading branch information...
1 parent 33cfb88 commit 91c3f128ea00c529350c75db6be0b2e01967a57a @berwinter committed Jan 8, 2013
Showing with 6,366 additions and 35 deletions.
  1. +0 −12 .gitignore-e
  2. +0 −12 .gitignore-e-e
  3. +53 −3 README.md
  4. +0 −4 README.md-e
  5. +0 −4 README.md-e-e
  6. +6 −0 analogChart.php
  7. +10 −0 config/config.ini
  8. +173 −0 css/format.css
  9. BIN css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
  10. BIN css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
  11. BIN css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
  12. BIN css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
  13. BIN css/smoothness/images/ui-bg_glass_75_dadada_1x400.png
  14. BIN css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
  15. BIN css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
  16. BIN css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  17. BIN css/smoothness/images/ui-icons_222222_256x240.png
  18. BIN css/smoothness/images/ui-icons_2e83ff_256x240.png
  19. BIN css/smoothness/images/ui-icons_454545_256x240.png
  20. BIN css/smoothness/images/ui-icons_888888_256x240.png
  21. BIN css/smoothness/images/ui-icons_cd0a0a_256x240.png
  22. +462 −0 css/smoothness/jquery-ui-1.9.2.custom.css
  23. +5 −0 css/smoothness/jquery-ui-1.9.2.custom.min.css
  24. +6 −0 energyChart.php
  25. BIN images/chart_bar.png
  26. BIN images/chart_bar.pxm
  27. BIN images/home.png
  28. BIN images/indicator.png
  29. +3,137 −0 images/kollektoren.svg
  30. BIN images/loading.gif
  31. BIN images/logo.png
  32. +1,131 −0 images/schema.svg
  33. +60 −0 index.html
  34. +416 −0 js/main.js
  35. +38 −0 latest.php
  36. +10 −0 lib/backend/constants.inc.php
  37. +312 −0 lib/backend/database.inc.php
  38. +118 −0 lib/backend/parser.inc.php
  39. +214 −0 lib/backend/uvr1611-connection.inc.php
  40. +36 −0 lib/commonChart.inc.php
  41. +49 −0 lib/config.inc.php
  42. +10 −0 menu.php
  43. +6 −0 powerChart.php
  44. +114 −0 sql/structure.sql
View
@@ -1,12 +0,0 @@
-# Compiled Object files
-*.slo
-*.lo
-*.o
-
-# Compiled Dynamic libraries
-*.so
-
-# Compiled Static libraries
-*.lai
-*.la
-*.a
View
@@ -1,12 +0,0 @@
-# Compiled Object files
-*.slo
-*.lo
-*.o
-
-# Compiled Dynamic libraries
-*.so
-
-# Compiled Static libraries
-*.lai
-*.la
-*.a
View
@@ -1,4 +1,54 @@
-uvr1611
-=======
+UVR1611 Datalogger Pro
+======
-UVR1611 Data Logger Pro
+Der *UVR1611 Datalogger Pro* ist ein webbasierender Datenlogger für die Universalregelung UVR1611 von TA mithilfe des BL-NET über den CAN-Bus.
+
+Die Features sind:
+* Datenlogging über den CAN-Bus in eine MySQL Datenbank
+* Web-Interface
+* Onlinegrafik
+* Temperaturkurven
+* Leistungskurven
+* Ertragsdiagramme
+
+Ein Beispiel der Anwendung befindet sich hier: [Demo](http://berwinter.dyndns.org/uvr1611/)
+
+Installation
+------
+
+Für die Anwendung wird ein Webserver mit PHP und ein MySQL Datenbank-Server benötigt. Die benötigten Pakete können unter Ubuntu mit folgendem Befehl installiert werden:
+
+ sudo apt-get install lighttpd php5-cgi mysql-server mysql-client
+
+Danach kann die Anwendung in den Ordner `/var/www/` kopiert werden. Zum erstellen der Datenbankstruktur kann das Skript `sql/structure.sql` importiert werden.
+
+Die Anwendung benütigt zur Laufzeit Schreibrechte für den Ordner `/tmp/`.
+
+
+Konfiguration
+------
+
+Die Konfiguration des Datenloggers befindet sich in der Datei `config/config.ini`:
+
+ [mysql]
+ server = localhost
+ user = uvr1611
+ password = uvr1611
+ database = uvr1611
+
+ [uvr1611]
+ address = 10.0.0.100
+ port = 40000
+ reset = false
+
+In der Sektion `mysql` befinden sich die Parameter für den Zugang zur Datenbank und in `uvr1611` die IP-Adresse für den BL-NET. Mit dem Schalter `reset` kann das Löschen der Daten vom BL-NET nach dem Logging aktiviert werden.
+
+Anpassen der Anwendung
+------
+
+Die Anpassung der Anwendung erfolgt vollständig über die Datenbank.
+
+Kontakt
+------
+Bertram Winter
+bertram.winter@gmail.com
View
@@ -1,4 +0,0 @@
-uvr1611
-=======
-
-UVR1611 Data Logger Pro
View
@@ -1,4 +0,0 @@
-uvr1611
-=======
-
-UVR1611 Data Logger Pro
View
@@ -0,0 +1,6 @@
+<?php
+include_once 'lib/commonChart.inc.php';
+
+echo preg_replace('/"(-?\d+\.?\d*)"/', '$1', json_encode($database->queryAnalog($date,$chartId)));
+
+
View
@@ -0,0 +1,10 @@
+[mysql]
+server = localhost
+user = uvr1611
+password = uvr1611
+database = uvr1611
+
+[uvr1611]
+address = 10.0.0.100
+port = 40000
+reset = false
View
@@ -0,0 +1,173 @@
+body {
+ background-color: #EEE;
+ margin:0;
+ padding:0;
+ font-size:12px;
+ font-family:Helvetica;
+}
+
+#content {
+ left:0;
+ right:0;
+ bottom:0;
+ top:100%;
+ position:fixed;
+ background-color: #FFF;
+ display:none;
+}
+
+
+#menu {
+ top:0;
+ bottom:0;
+ right:0;
+ left:0;
+ margin: auto;
+ width: 400px;
+ height: 250px;
+ position:absolute;
+ background-color: #FFF;
+ border: 1px solid #DDD;
+ border-radius: 10px;
+ padding: 10px 20px;
+}
+
+#browser h1 {
+ font-size:1.5em;
+}
+
+#browser {
+ font-size: 1.1em;
+ color: #444;
+}
+
+#browser a {
+ color: #444;
+}
+
+#browser ul {
+ padding-left:20px;
+ color: #444;
+ list-style-type: none;
+}
+
+#indicator {
+ top: 24px;
+ left: 19px;
+ background-color: #eee;
+ border: 1px solid #DDD;
+ border-radius: 5px;
+ height:60px;
+ width:100px;
+ position: absolute;
+ display:none;
+}
+
+div.chart {
+ background: url(../images/chart_bar.png) no-repeat transparent;
+}
+
+div.home {
+ background: url(../images/home.png) no-repeat transparent;
+}
+div.icon
+{
+ background-position: 50% 100%;
+ width:32px;
+ height:32px;
+ margin: 20px auto 5px;
+}
+
+div.item {
+ position: relative;
+ color:#BBB;
+ text-align:center;
+ font-size:1.1em;
+ height:80px;
+ width:100px;
+ float: left;
+ display:none;
+}
+
+div.hover, div.active{
+ color:#888;
+ cursor:pointer;
+}
+
+div.hover > div.icon, div.active > div.icon {
+ background-position: 50% 0;
+}
+
+#chart_div {
+ margin:20px;
+}
+
+#logo {
+ top:50%;
+ left:50%;
+ margin-left:-210px;
+ margin-top:-210px;
+ background: url(../images/logo.png) no-repeat transparent;
+ width:400px;
+ height:80px;
+ position: absolute;
+}
+
+#pages {
+ margin:auto;
+ width:800px;
+}
+#container {
+ width:100%;
+ top:37px;
+ bottom:0;
+ position:absolute;
+ overflow:auto;
+}
+
+#toolbar {
+ border-top: 1px solid #DDD;
+ border-bottom: 1px solid #DDD;
+ background-color: #EEE;
+ height: 35px;
+ position:absolute;
+ width:100%;
+}
+
+#datepicker {
+ position:absolute;
+ display:block;
+ left: 50%;
+ margin-top:5px;
+ margin-left:-75px;
+ width:150px;
+ text-align:center;
+ font-size: 1.5em;
+}
+#buttonset {
+ right: 10px;
+ position:absolute;
+}
+
+#buttonset > button{
+ margin-top:2px;
+}
+
+#home {
+ margin-top:2px;
+ left: 10px;
+ display:block;
+ position:absolute;
+}
+
+#overlay {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ background: url(../images/loading.gif) 50% 50% no-repeat #FFF;
+ z-index: 100;
+ opacity: 0.75;
+ display: none;
+}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit 91c3f12

Please sign in to comment.