Last active
July 1, 2018 22:02
-
-
Save KroniK907/00ebdf3fdd7ec6bf5a3c3fba1968c01c to your computer and use it in GitHub Desktop.
Raspberry Pi doorbell scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 5 * * 1 shutdown -r now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DOOR="roof" | |
SERVER="192.168.1.61" | |
USER="pi" | |
SCRIPT="/home/pi/doorbells/doorbell_server.sh" | |
ssh $USER@$SERVER $SCRIPT $DOOR | |
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DOOR=$1 | |
case $DOOR in | |
ambulance_bay) | |
aplay /home/pi/doorbells/audio/ambulance_bay.wav | |
;; | |
office) | |
aplay /home/pi/doorbells/audio/office.wav | |
;; | |
kitchen) | |
aplay /home/pi/doorbells/audio/kitchen.wav | |
;; | |
sleeping_quarters) | |
aplay /home/pi/doorbells/audio/sleeping_quarters.wav | |
;; | |
turnout_room) | |
aplay /home/pi/doorbells/audio/turnout_room.wav | |
;; | |
aparatus_bay) | |
aplay /home/pi/doorbells/audio/aparatus_bay.wav | |
;; | |
roof) | |
aplay /home/pi/doorbells/audio/roof.wav | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment