only switch off projector if there is no signal or if it shows demo videos
parent
ddd7df81a1
commit
5b949e9d82
|
@ -1,9 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ "$1" = "off" ]
|
if [ "$1" = "off" ]
|
||||||
then
|
then
|
||||||
|
(
|
||||||
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}')
|
||||||
|
signalsource="$(wget -qO - 'http://'"$projip"'/tgi/return.tgi?query=info' |awk -F'[<>]' '/<info>/{print substr($3,33,2)}')"
|
||||||
|
if [ "$signalsource" = "00" ] || [ "$signalsource" = "15" ]
|
||||||
|
then
|
||||||
ssh pi@doorbuzz 'doorbuzz/projectionscreen.sh up'
|
ssh pi@doorbuzz 'doorbuzz/projectionscreen.sh up'
|
||||||
wget -qO - 'http://'"$projip"'/tgi/return.tgi?command=2a3102fd0660'
|
echo "wget http://$projip/tgi/return.tgi?command=2a3102fd0660"
|
||||||
|
wget -qO - 'http://'"$projip"'/tgi/return.tgi?command=2a3102fd0660' 2>&1
|
||||||
|
echo $?
|
||||||
|
else
|
||||||
|
echo "not disabling projection because source is at $signalsource"
|
||||||
|
fi
|
||||||
|
) | logger -t "$(basename $0) $$"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
prevstatus="unknown"
|
prevstatus="unknown"
|
||||||
|
|
Loading…
Reference in New Issue