more debug messages and bug corrected for projector off
parent
3888e90402
commit
210d979eef
|
@ -2,16 +2,23 @@
|
||||||
if [ "$1" = "off" ]
|
if [ "$1" = "off" ]
|
||||||
then
|
then
|
||||||
(
|
(
|
||||||
|
echo "called with parameter $1"
|
||||||
projip=$(arp -an|awk -F'[()]' '/00:50:41:79:d1:34/{print $2}')
|
projip=$(arp -an|awk -F'[()]' '/00:50:41:79:d1:34/{print $2}')
|
||||||
|
if [ "$projip" = "" ]
|
||||||
|
then
|
||||||
|
echo "no projector IP found"
|
||||||
|
arp -a
|
||||||
|
exit
|
||||||
|
fi
|
||||||
signalsource="$(wget -qO - 'http://'"$projip"'/tgi/return.tgi?query=info' |awk -F'[<>]' '/<info>/{print substr($3,33,2)}')"
|
signalsource="$(wget -qO - 'http://'"$projip"'/tgi/return.tgi?query=info' |awk -F'[<>]' '/<info>/{print substr($3,33,2)}')"
|
||||||
if [ "$signalsource" = "00" ] || [ "$signalsource" = "15" ] || [ "$signalsource" = "" ]
|
if [ "$signalsource" = "00" ] || [ "$signalsource" = "15" ] || [ "$signalsource" = "" ]
|
||||||
then
|
then
|
||||||
ssh pi@doorbuzz 'doorbuzz/projectionscreen.sh up'
|
ssh pi@doorbuzz 'doorbuzz/projectionscreen.sh up'
|
||||||
echo "wget http://$projip/tgi/return.tgi?command=2a3102fd0660"
|
echo "wget http://$projip/tgi/return.tgi?command=2a3102fd0660 #projector off"
|
||||||
wget -qO - 'http://'"$projip"'/tgi/return.tgi?command=2a3102fd0660' 2>&1
|
wget -qO - 'http://'"$projip"'/tgi/return.tgi?command=2a3102fd0660' 2>&1
|
||||||
echo $?
|
echo $?
|
||||||
else
|
else
|
||||||
echo "not disabling projection because source is at $signalsource"
|
echo "not disabling projector because source is at $signalsource"
|
||||||
fi
|
fi
|
||||||
) | logger -t "$(basename $0) $$"
|
) | logger -t "$(basename $0) $$"
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -1,2 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
if [ "$1" = "pushed" ]
|
||||||
|
then
|
||||||
$(dirname $0)/../beamerdetect.sh off
|
$(dirname $0)/../beamerdetect.sh off
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue