From: Bernhard Tittelbach Date: Wed, 24 Oct 2012 20:04:24 +0000 (+0000) Subject: switch cam motor X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=268c77e6c7f49a543abc8b2b92c8c4f5b53d8eb0;p=svn42.git switch cam motor --- diff --git a/powersensordaemon/switch.cgi b/powersensordaemon/switch.cgi index 8198e90..3f0b06e 100755 --- a/powersensordaemon/switch.cgi +++ b/powersensordaemon/switch.cgi @@ -27,6 +27,7 @@ UNIXSOCK=/var/run/powersensordaemon/cmd.sock VALID_ONOFF_IDS="decke ambientlights lichter all werkzeug labor dart logo spots1 deckehinten deckevorne boiler lichterkette pcblueleds" VALID_SEND_IDS="ymhpoweron ymhpoweroff ymhpower ymhvolup ymhvoldown ymhcd ymhwdtv ymhtuner ymhaux ymhsattv ymhvolmute ymhmenu ymhplus ymhminus ymhtest ymhtimelevel ymheffect ymhprgup ymhprgdown ymhtunplus ymhtunminus ymhtunabcde ymhtape ymhvcr ymhextdec ymhsleep ymhp5 panicled blueled moviemode" VALID_BANSHEE_IDS="playPause next prev" +VALID_CAM_MOTOR_IDS="c C w W" [ "$POWER" == "send" ] && POWER=on if [ "$POWER" == "on" -o "$POWER" == "off" ]; then @@ -44,7 +45,7 @@ if [ "$POWER" == "on" -o "$POWER" == "off" ]; then fi done - for CHECKID in $VALID_BANSHEE_IDS; do + for CHECKID in $VALID_BANSHEE_IDS; do if [ "$CHECKID" == "$ID" ]; then echo "$ID/" | nc wuerfel.realraum.at 8484 echo "Content-type: text/html" @@ -57,6 +58,20 @@ if [ "$POWER" == "on" -o "$POWER" == "off" ]; then exit 0 fi done + + for CHECKID in $VALID_CAM_MOTOR_IDS; do + if [ "$CHECKID" == "$ID" ]; then + echo "$ID" > /dev/ttyACM0 + echo "Content-type: text/html" + echo "" + echo "" + echo "" + echo "Realraum rf433ctl" + echo '' + echo "" + exit 0 + fi + done fi DESC_pcblueleds="Blaue Leds PC" @@ -103,6 +118,11 @@ DESC_seep="Sleep Modus" DESC_panicled="HAL9000 says hi" DESC_blueled="Blue Led" DESC_moviemode="Movie Mode" +DESC_w="Cam >" +DESC_W="Cam >>" +DESC_c="Cam <" +DESC_C="Cam <<" + echo "Content-type: text/html" echo "" echo "" @@ -182,7 +202,7 @@ for DISPID in $VALID_SEND_IDS; do done echo "" echo "
" -for DISPID in $VALID_BANSHEE_IDS; do +for DISPID in $VALID_BANSHEE_IDS $VALID_CAM_MOTOR_IDS; do NAME="$(eval echo \$DESC_$DISPID)" [ -z "$NAME" ] && NAME=$DISPID if [ -z "$AJAX" ]; then @@ -190,8 +210,7 @@ for DISPID in $VALID_BANSHEE_IDS; do echo "
" echo "" echo "
$NAME
" - echo " " - echo " " + echo " " echo "
" echo "
"