doorbuzz/README.txt

79 lines
2.2 KiB
Plaintext
Raw Normal View History

2015-04-08 21:13:10 +02:00
# doorbuzz
raspberry Pi opening the front door and playing videos
2015-04-08 22:16:20 +02:00
the button has an RGB led to show status
2015-07-19 17:01:54 +02:00
features:
* button to push to open the door
* LED ring of 60 neopixels showing the current clock
* video player showing some default videos while the space is open
* a shutdown button for a clean shutdown
* watchdog
2015-04-08 22:16:20 +02:00
how to install
==============
sudo vi /etc/xdg/lxsession/LXDE/autostart
remove screensaver
sudo apt-get install unclutter xdotool git-core screen imagemagick
2015-04-08 22:16:20 +02:00
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build
mkdir -p /home/pi/.config/lxsession/LXDE/
cat > /home/pi/.config/lxsession/LXDE/autostart <<"EOF"
@xset s off
@xset -dpms
@xset s noblank
@unclutter -display :0 -noevents -grab
@sudo python ./doorbuzz/setneocolor.py
@./doorbuzz/buzzctrl.sh
@./doorbuzz/videoplayer.sh
@sudo python ./doorbuzz/shutdownbutton.py
@./doorbuzz/phone_notification_client.sh
2015-04-08 22:16:20 +02:00
EOF
connect the button and LED to pins as shown in buzzctrl.sh
create a file "secret.txt" containing the http://user:pass@10.1.1.xx part of the URL
adapt the URL in buzzctrl.sh
adapt spaceapi URL in spacestatus.py
put .mp4 videos into ~pi/ and they will show when your hackerspace is open
you can add videos and they will be taken into account automatically
when booting, the button led uses morsecode to send the low byte of the
IP adress in decimal
phone_notification_client.sh communicates with pidor's doorbuzz_wrapper.sh
to command the flash light
# new: using redis to manage the 60 led circle
sudo apt-get install python-pip redis-server
sudo pip install redis
#the redi.sh comes from here: https://github.com/crypt1d/redi.sh
cd ~
git clone https://github.com/jgarff/rpi_ws281x.git
cd rpi_ws281x
sudo apt-get install scons
scons
sudo scons
2015-07-19 17:01:54 +02:00
# setup watchdog
sudo modprobe bcm2708_wdog
echo "bcm2708_wdog" | sudo tee -a /etc/modules
sudo apt-get install watchdog
sudo update-rc.d watchdog defaults
sudo sed -i 's/#\(watchdog-device\)/\1/
s/#\(max-load-1\s\)/\1/
' /etc/watchdog.conf
sudo service watchdog start
2015-04-08 22:16:20 +02:00
todo
====
create a config file
put more of the hardcoded values from code into parameters
make code resilient against missing commands (e.g. gpio not in PATH)
move script to run in screen instead starting from rc.local