-
Notifications
You must be signed in to change notification settings - Fork 4
Manual install
Andrew Wippler edited this page Dec 30, 2015
·
3 revisions
sudo apt-get install apache2-bin php5-mysql php5-gd php5-curl php5-json php5 libapache2-mod-php5
# cd /var/
# git clone https://github.com/andrewwippler/rpi-wayfinding.git www
crontab -e
Contents:
1 0 * * * curl --silent --compressed http://localhost/cron_daily.php
1,16,31,46 * * * * curl --silent --compressed http://localhost/cron_regularly.php
CREATE DATABASE IF NOT EXISTS rpiwayfinding;
CREATE USER 'wayfinding'@'localhost' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON rpiwayfinding.* TO 'wayfinding'@'localhost';
USE rpiwayfinding;
CREATE TABLE IF NOT EXISTS events (PID INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(PID),EventName TEXT,Start DATETIME,End DATETIME,Room TEXT,Grp TEXT,Bldg TEXT);
- Edit rooms.php
- Edit settings.php
sudo apt-get install feh
touch /home/pi/rpi-wayfinding.sh
chmod +x /home/pi/rpi-wayfinding.sh
nano /home/pi/rpi-wayfinding.sh
Contents (where UPPERCASE is the same as inside rooms.php):
#!/bin/bash
sleep 75
feh --hide-pointer -F -R 1200 http://webserver/image.php?i=RPI &
For a group (floor level) sign:
#!/bin/bash
sleep 75
feh --hide-pointer -F -R 1200 http://webserver/image.php?g=GROUPNAME &
For a building (lobby) sign:
#!/bin/bash
sleep 75
feh --hide-pointer -F -R 1200 http://webserver/image.php?b=BLDGNAME &
mkdir /home/pi/.config/autostart
nano /home/pi/.config/autostart/rpi-wayfinding.desktop
Contents:
[Desktop Entry]
Type=Application
Exec=/home/pi/rpi-wayfinding.sh
1 = 90* clockwise 3 = 270* clockwise (90* counter-clockwise)
sudo echo display_rotate=1 >> /boot/config.txt