dooropen 468 Bytes
Newer Older
gnomus's avatar
gnomus committed
1
2
3
4
5
#!/bin/sh

echo "Initializing Door Systems..."
echo "Securing Communication to Door Systems..."
echo "Open Communication Channel..."
mad's avatar
mad committed
6
nohup mosquitto_pub -h 'mqtt.z9' -t 'fux/door/status' -m 'opened' >/dev/null 2>&1 &
7
sleep 0.5
gnomus's avatar
gnomus committed
8
echo "Opening Door..."
9
echo "1" > /sys/class/gpio/gpio17/value
gnomus's avatar
gnomus committed
10
11
sleep 1
echo "Welcome"
12
13
echo "0" > /sys/class/gpio/gpio17/value
sleep 3
Jamalaka's avatar
Jamalaka committed
14
echo "Aaand again"
15
16
17
echo "1" > /sys/class/gpio/gpio17/value
sleep 1
echo "0" > /sys/class/gpio/gpio17/value