X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=powersensordaemon%2Fswitch.cgi;h=4d99acf60a0c64de6e3e76d6420ad5d007b6077d;hb=fa5cf2acaacf73e4848f1f29d235e681a495e9f5;hp=8e4f4b505a7b3c3e6a9a742be6338f880eb61487;hpb=a7efe2b4519d00825e7aea60c4e01640b5397f5e;p=svn42.git diff --git a/powersensordaemon/switch.cgi b/powersensordaemon/switch.cgi index 8e4f4b5..4d99acf 100755 --- a/powersensordaemon/switch.cgi +++ b/powersensordaemon/switch.cgi @@ -10,6 +10,10 @@ for QUERY in `echo $QUERY_STRING | tr '&' ' '`; do POWER='?' elif [ "$POWER" == "?" ]; then POWER=$VALUE + elif [ "$VALUE" == "mobile" ]; then + MOBILE='1' + elif [ "$POWER" == "?" ]; then + POWER=$VALUE elif [ "$VALUE" == "ajax" ]; then AJAX='?' elif [ "$AJAX" == "?" ]; then @@ -20,9 +24,10 @@ for QUERY in `echo $QUERY_STRING | tr '&' ' '`; do done UNIXSOCK=/var/run/powersensordaemon/cmd.sock -VALID_ONOFF_IDS="decke ambientlights lichter all werkzeug labor dart logo idee deckehinten deckevorne" -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" - +VALID_ONOFF_IDS="decke ambientlights lichter all werkzeug labor dart logo spots1 deckehinten deckevorne boiler whiteboard pcblueleds bikewcblue" +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 @@ -39,17 +44,50 @@ if [ "$POWER" == "on" -o "$POWER" == "off" ]; then exit 0 fi done + + for CHECKID in $VALID_BANSHEE_IDS; do + if [ "$CHECKID" == "$ID" ]; then + echo "$ID/" | nc wuerfel.realraum.at 8484 + echo "Content-type: text/html" + echo "" + echo "" + echo "
" + echo "