concierge/dooropen
2015-09-29 16:14:49 +00:00

18 lines
468 B
Bash
Executable file

#!/bin/sh
echo "Initializing Door Systems..."
echo "Securing Communication to Door Systems..."
echo "Open Communication Channel..."
nohup mosquitto_pub -h 'mqtt.z9' -t 'fux/door/status' -m 'opened' >/dev/null 2>&1 &
sleep 0.5
echo "Opening Door..."
echo "1" > /sys/class/gpio/gpio17/value
sleep 1
echo "Welcome"
echo "0" > /sys/class/gpio/gpio17/value
sleep 3
echo "Aaand again"
echo "1" > /sys/class/gpio/gpio17/value
sleep 1
echo "0" > /sys/class/gpio/gpio17/value