added button to open main door

master
Georges Herber 2016-05-07 09:05:12 +02:00
parent 6d525f7e9a
commit 15ef5188d5
3 changed files with 12 additions and 0 deletions

View File

@ -4,6 +4,7 @@ then
echo "usage: $0 {main|chill|status|labsocket|alarm|screen} {on|off}"
echo "usage: $0 {projector} {on|hdmi1|hdmi2|dvi|vga1|off}"
echo "usage; $0 {receiver} {on|off|hdmi|jack1|jack2|optical}"
echo "usage: $0 {maindoor} {open}"
exit 1
fi
function dolight() {
@ -35,6 +36,8 @@ function dolight() {
;;
receiver) sudo /root/pidor/scripts/beamercontrol.sh receiver "$2"
;;
maindoor) sudo /root/pidor/scripts/opendoor.sh
;;
esac
# type (2=10bit)
# | house 1-16 (the dial thingie)

3
scripts/opendoor.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
BUZZERURL="$(cat "$(dirname "$0")"/secret.txt)/state.xml?relay1State=2&pulseTime1=5"
wget -O - --timeout=1 --tries=1 $BUZZERSTATUSURL

View File

@ -93,6 +93,12 @@
<p><a class="btn btn-danger btn-lg btn-block" data-area="receiver" data-status="off" >Off</a></p>
</div>
</div>
<div class="col-md-6">
<div class=" well">
<h1>Main Door</h1>
<p><a class="btn btn-success btn-lg btn-block" data-area="maindoor" data-status="open" >Open door</a></p>
</div>
</div>
</div>