From c2e6568981f672656146bb27409b3c8403dfd35a Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sat, 24 Apr 2010 03:18:14 +0000 Subject: [PATCH] value in diagram --- sensor_graph/sensor-light.cgi | 14 +++++++--- sensor_graph/sensor-temp.cgi | 14 +++++++--- sensor_graph/sensors.cgi | 43 +++++++++++++++++++++-------- sensor_graph/switch.cgi | 61 ----------------------------------------- 4 files changed, 52 insertions(+), 80 deletions(-) delete mode 100755 sensor_graph/switch.cgi diff --git a/sensor_graph/sensor-light.cgi b/sensor_graph/sensor-light.cgi index bf3f019..7ea59ad 100755 --- a/sensor_graph/sensor-light.cgi +++ b/sensor_graph/sensor-light.cgi @@ -3,9 +3,15 @@ ' - --title="Room Illumination" - DEF:cel=/home/sensorlight.rrd:light:LAST - LINE2:cel#00a000:"0 dark to 1023 bright"> + --imginfo '' + --color="BACK#d0d0af" --color="CANVAS#ffffff" + --color="SHADEA#dfdfdf" --color="SHADEB#525252" + --color="AXIS#761407" --color="FONT#272727" --color="MGRID#b65447" + --color="ARROW#761407" --color="GRID#d0d0af" + --title="Room Illumination" --lazy + --start=now-36h --end=now --width=490 + --slope-mode + DEF:cel=/home/sensorlight.rrd:light:LAST VDEF:lv=cel,LAST + LINE2:cel#04d532:"0 dark to 1023 bright," GPRINT:lv:"Current Value\: %1.0lf"> diff --git a/sensor_graph/sensor-temp.cgi b/sensor_graph/sensor-temp.cgi index ee2bf34..3f2a7fd 100755 --- a/sensor_graph/sensor-temp.cgi +++ b/sensor_graph/sensor-temp.cgi @@ -3,9 +3,15 @@ ' - --title="Temperatures" - DEF:cel=/home/sensortemp.rrd:temp:LAST - LINE2:cel#00a000:"D. Celsius"> + --imginfo '' + --color="BACK#d0d0af" --color="CANVAS#ffffff" + --color="SHADEA#dfdfdf" --color="SHADEB#525252" + --color="AXIS#761407" --color="FONT#272727" --color="MGRID#b65447" + --color="ARROW#761407" --color="GRID#d0d0af" + --title="Room Temperature" --lazy + --start=now-36h --end=now --width=490 + --slope-mode + DEF:cel=/home/sensortemp.rrd:temp:LAST VDEF:lv=cel,LAST + LINE2:cel#e21407:"°C (±0.5)," GPRINT:lv:"Current Temperature\: %1.2lf °C"> diff --git a/sensor_graph/sensors.cgi b/sensor_graph/sensors.cgi index 5b52164..9c85c93 100755 --- a/sensor_graph/sensors.cgi +++ b/sensor_graph/sensors.cgi @@ -6,23 +6,44 @@

' + --imginfo '' + --color="BACK#d0d0af" --color="CANVAS#ffffff" + --color="SHADEA#dfdfdf" --color="SHADEB#525252" + --color="AXIS#761407" --color="FONT#272727" --color="MGRID#b65447" + --color="ARROW#761407" --color="GRID#d0d0af" --title="Room Illumination" - DEF:cel=/home/sensorlight.rrd:light:LAST - LINE2:cel#00a000:"0 dark to 1023 bright"> + --start=now-36h --end=now --width=490 + --slope-mode + DEF:cel=/home/sensorlight.rrd:light:LAST VDEF:lv=cel,LAST + LINE2:cel#04d532:"0 dark to 1023 bright," GPRINT:lv:"Current Value\: %1.0lf">

+Current Light Value:

' - --title="Temperatures" - DEF:cel=/home/sensortemp.rrd:temp:LAST - LINE2:cel#00a000:"D. Celsius"> + --imginfo '' + --color="BACK#d0d0af" --color="CANVAS#ffffff" + --color="SHADEA#dfdfdf" --color="SHADEB#525252" + --color="AXIS#761407" --color="FONT#272727" --color="MGRID#b65447" + --color="ARROW#761407" --color="GRID#d0d0af" + --title="Room Temperature" + --start=now-36h --end=now --width=490 + --slope-mode + DEF:cel=/home/sensortemp.rrd:temp:LAST VDEF:lv=cel,LAST + LINE2:cel#e21407:"°C (±0.5)," GPRINT:lv:"Current Temperature\: %1.2lf °C">

+Current Temperature: °C +

' - --title="Graph of Movement Sensor" + --imginfo '' + --color="BACK#d0d0af" --color="CANVAS#ffffff" + --color="SHADEA#dfdfdf" --color="SHADEB#525252" + --color="AXIS#761407" --color="FONT#272727" --color="MGRID#b65447" + --color="ARROW#761407" --color="GRID#d0d0af" + --title="Movement Sensor" + --start=now-36h --end=now --width=490 DEF:cel=/home/sensormovement.rrd:movement:LAST - LINE2:cel#00a000:"1 Movement, 0 No Movement"> -

+ LINE2:cel#1407e2:"Movements / Minute"> +

+Page generated: diff --git a/sensor_graph/switch.cgi b/sensor_graph/switch.cgi deleted file mode 100755 index 765778c..0000000 --- a/sensor_graph/switch.cgi +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -for QUERY in `echo $QUERY_STRING | tr '&' ' '`; do - for VALUE in `echo $QUERY | tr '=' ' '`; do - if [ "$VALUE" == "id" ]; then - ID='?' - elif [ "$ID" == "?" ]; then - ID=$VALUE - elif [ "$VALUE" == "power" ]; then - POWER='?' - elif [ "$POWER" == "?" ]; then - POWER=$VALUE - fi - i=$i+1 - done -done - -UNIXSOCK=/var/run/powersensordaemon/cmd.sock -VALIDIDS="werkzeug stereo labor schreibtisch logo idee deckehinten deckevorne" - -if [ "$POWER" == "on" -o "$POWER" == "off" ]; then - for CHECKID in $VALIDIDS; do - if [ "$CHECKID" == "$ID" ]; then - echo "power $POWER $ID" | usocket $UNIXSOCK - fi - done -fi - -DESC_werkzeug="Werkzeug LEDs" -DESC_stereo="Stereo Anlage" -DESC_labor="Labor Licht" -DESC_schreibtisch="Schreibtisch Licht" -DESC_logo="Logo" -DESC_idee="Idee" -DESC_deckehinten="Decke Hinten" -DESC_deckevorne="Decke Vorne" - -echo "Content-type: text/html" -echo "" -echo "" -echo "" -echo "Realraum rf433ctl" -echo "" -echo "" -echo "

Realraum rf433ctl

" -echo "" -for DISPID in $VALIDIDS; do - NAME="$(eval echo \$DESC_$DISPID)" - [ -z "$NAME" ] && NAME=$DISPID - echo "" - echo "" -# echo " " - echo "" - echo "" -done -echo "
$NAME
$NAME
" - echo " " - echo " " - echo "
" -echo "" -echo "" -- 1.7.10.4