From ce8a61b8a19bf98e47594051bf77be227994a260 Mon Sep 17 00:00:00 2001 From: Jamalaka Date: Tue, 9 Dec 2014 21:39:21 +0100 Subject: [PATCH] =?UTF-8?q?Aktuellen=20Stand=20von=20Dooris=20=C3=BCbernom?= =?UTF-8?q?men.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dooropen | 17 ++++++++++------- lock | 29 ++++++++++++++--------------- unlock | 29 ++++++++++++++--------------- 3 files changed, 38 insertions(+), 37 deletions(-) diff --git a/dooropen b/dooropen index 17fe669..dde2552 100755 --- a/dooropen +++ b/dooropen @@ -1,17 +1,20 @@ #!/bin/sh echo "Initializing Door Systems..." -echo "2" > /sys/class/gpio/unexport -echo "2" > /sys/class/gpio/export +echo "17" > /sys/class/gpio/unexport +echo "17" > /sys/class/gpio/export sleep 0.5 echo "Securing Communication to Door Systems..." -echo "out" > /sys/class/gpio/gpio2/direction +echo "out" > /sys/class/gpio/gpio17/direction sleep 0.5 echo "Open Communication Channel..." -curl dooris.gnomus.de/dooropen +sleep 0.5 echo "Opening Door..." -echo "1" > /sys/class/gpio/gpio2/value +echo "1" > /sys/class/gpio/gpio17/value sleep 1 echo "Welcome" -echo "0" > /sys/class/gpio/gpio2/value - +echo "0" > /sys/class/gpio/gpio17/value +sleep 3 +echo "1" > /sys/class/gpio/gpio17/value +sleep 1 +echo "0" > /sys/class/gpio/gpio17/value diff --git a/lock b/lock index 1abca82..95282f6 100755 --- a/lock +++ b/lock @@ -1,17 +1,16 @@ #!/bin/sh -#echo "Initializing Door Systems..." -#echo "2" > /sys/class/gpio/unexport -#echo "2" > /sys/class/gpio/export -#sleep 0.5 -#echo "Securing Communication to Door Systems..." -#echo "out" > /sys/class/gpio/gpio2/direction -#sleep 0.5 -#echo "Open Communication Channel..." -curl dooris.gnomus.de/lock -#echo "Opening Door..." -#echo "1" > /sys/class/gpio/gpio2/value -#sleep 1 -#echo "Welcome" -#echo "0" > /sys/class/gpio/gpio2/value - +echo "Initializing Space Systems..." +echo "22" > /sys/class/gpio/unexport +echo "22" > /sys/class/gpio/export +sleep 0.5 +echo "Securing Communication to Space Systems..." +echo "out" > /sys/class/gpio/gpio22/direction +sleep 0.5 +echo "Open Communication Channel..." +curl -s -o /dev/null "hamburg.ccc.de/dooris/status.php?apikey=sesamaenderdich&action=close" +echo "Locking Space..." +echo "1" > /sys/class/gpio/gpio22/value +sleep 0.3 +echo "Bye!" +echo "0" > /sys/class/gpio/gpio22/value diff --git a/unlock b/unlock index 7f7ec18..83f276f 100755 --- a/unlock +++ b/unlock @@ -1,17 +1,16 @@ #!/bin/sh -#echo "Initializing Door Systems..." -#echo "2" > /sys/class/gpio/unexport -#echo "2" > /sys/class/gpio/export -#sleep 0.5 -#echo "Securing Communication to Door Systems..." -#echo "out" > /sys/class/gpio/gpio2/direction -#sleep 0.5 -#echo "Open Communication Channel..." -curl dooris.gnomus.de/unlock -#echo "Opening Door..." -#echo "1" > /sys/class/gpio/gpio2/value -#sleep 1 -#echo "Welcome" -#echo "0" > /sys/class/gpio/gpio2/value - +echo "Initializing Space Systems..." +echo "27" > /sys/class/gpio/unexport +echo "27" > /sys/class/gpio/export +sleep 0.5 +echo "Securing Communication to Space Systems..." +echo "out" > /sys/class/gpio/gpio27/direction +sleep 0.5 +echo "Open Communication Channel..." +curl -s -o /dev/null "hamburg.ccc.de/dooris/status.php?apikey=sesamaenderdich&action=open" +echo "Unlocking Space..." +echo "1" > /sys/class/gpio/gpio27/value +sleep 0.3 +echo "Welcome" +echo "0" > /sys/class/gpio/gpio27/value