From e8d00e770a26280c5645ef210bf44bae399de4b1 Mon Sep 17 00:00:00 2001 From: SvenPeitz Date: Sun, 6 Mar 2011 09:50:11 +0100 Subject: [PATCH 1/2] cosmetics --- misc/controller/bash/log_i2c_ds1631_ecmd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/controller/bash/log_i2c_ds1631_ecmd.sh b/misc/controller/bash/log_i2c_ds1631_ecmd.sh index c7513db..828c22a 100755 --- a/misc/controller/bash/log_i2c_ds1631_ecmd.sh +++ b/misc/controller/bash/log_i2c_ds1631_ecmd.sh @@ -39,7 +39,7 @@ URL="http://192.168.10.1/backend" # sensor settings # Sensor 0x48 (72) ist bei ds1631 sensorid = 0 warum auch immer? # folglich ist sensor 0x4d (75) sensorid = 3 usw. -SENSORID= +SENSORID= # ip address of the controller board running ethersex ESEXIP= # uuid of the sensor in the volkszaehler database @@ -52,7 +52,7 @@ NC=/bin/nc # ========= do not change anything below this line ============== -echo "ds1631 convert $SENSORID 1" |$NC $ESEXIP 2701 -q 1 2>/dev/null | grep -qie OK || exit 1 +echo "ds1631 convert $SENSORID 1" |$NC $ESEXIP 2701 -q 1 2>/dev/null | grep -qe OK || exit 1 TEMPERATURE=`echo ds1631 temp $SENSORID | $NC $ESEXIP 2701 -q 1 2>/dev/null | sed -e 's/Temperatur: //'` $CURL --data "" "$URL/data/$UUID.json?value=$TEMPERATURE" From 8623eab82608858e918b01eeef8452e2cbbb512b Mon Sep 17 00:00:00 2001 From: SvenPeitz Date: Fri, 25 Mar 2011 17:30:23 +0100 Subject: [PATCH 2/2] Eingabeformular um eine uuid zu erstellen --- htdocs/query.php | 43 ++++++++++++++++++++++++++++++++++++++ htdocs/uuid_anlegen.php | 46 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 htdocs/query.php create mode 100644 htdocs/uuid_anlegen.php diff --git a/htdocs/query.php b/htdocs/query.php new file mode 100644 index 0000000..7ced8d7 --- /dev/null +++ b/htdocs/query.php @@ -0,0 +1,43 @@ + +## +# This file is part of volkzaehler.org +# +# volkzaehler.org 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 +# any later version. +# +# volkzaehler.org 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 volkszaehler.org. If not, see . +## + +#Daten vom Eingabeform uebernehmen und Variablen zuordnen + $serverip = $_POST["serverip"]; + $title = $_POST["title"]; + $resolution = $_POST["resolution"]; + $description = $_POST["description"]; + +#Link anschliesend aufrufen +header("Location: http://$serverip/middleware/channel.json?operation=add&title=$title&type=power&resolution=$resolution&description=$description"); + +#Einige Debug hilfen +#echo "http://"; +#echo $serverip; +#echo "/middleware/channel.json?operation=add&title="; +#echo $title; +#echo "&type=power&resolution="; +#echo $resolution; +#echo "&description="; +#echo $description; + + +?> \ No newline at end of file diff --git a/htdocs/uuid_anlegen.php b/htdocs/uuid_anlegen.php new file mode 100644 index 0000000..28dc6a5 --- /dev/null +++ b/htdocs/uuid_anlegen.php @@ -0,0 +1,46 @@ + +## +# This file is part of volkzaehler.org +# +# volkzaehler.org 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 +# any later version. +# +# volkzaehler.org 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 volkszaehler.org. If not, see . +## +?> + +
+Einfaches Formular zum erstellen einer UUID in der SQL Datenbank +
+
+ServerIP mit pfad zum genutzten volkszaehler (server) angeben
+z.B http://192.168.0.1:/zaehler oder http://192.168.0.1 oder http://www.vokszaehler.org
+Es kann auch https verwendet werden https://192.168.0.1
+
+
+ Beschreibung angeben z.B. Kuehlschrank
+
+
+ Aufloesung des Zaehlers angeben z.B. 1000
+
+
+ Hersteller des Zaehlers z.B. Swissnox
+
+
+
+ Es wird eine UUID erstellt und dann die json Antwort zurueckgesendet in der sich die UUID befindet.
+ diese muss dann im Controller angegeben werden z.B. Netio +
+
+ \ No newline at end of file