This project will provide you with a graphical dashboard of the current weather observation based on the Raspberry Pi Weather Station data.
Contributions to this project can be made by using the program and providing feedback or by assisting in the programming and submitting pull requests. In either case, please read the contributing page for instructions.
-
Install the Apache2 package with the following command:
sudo apt-get install apache2 -y
-
Install PHP5 and the PHP module for Apache
sudo apt-get install php5 libapache2-mod-php5 -y
-
Install the MySQL DLL's for PHP5
sudo apt-get install php5-mysql -y
-
You will need root access on the Raspberry Pi. From the command line type:
sudo -s
-
Navigate to the web folder:
cd /var/www/html
-
Download the files to a folder named
dashboard
:git clone https://github.com/JoshuaCarroll/Raspberry-Pi-Weather-Station-Dashboard.git dashboard
-
Return to the dashboard site root.
cd dashboard
You should now be in /var/www/html/dashboard
-
Update the the php script with the MySQL password that you chose when installing the database.
nano variables.php
Update the variables to the values that you chose.
Press
Ctrl O
thenEnter
to save andCtrl X
to quit nano. -
Create the GETCURRENTOBS stored procedure.
mysql -u root -p weather < CREATE-SP.sql
-
Find the weather station's ip address:
ifconfig
The IP address will be on the second line just after inet addr:
Enter this IP address into a browser followed by /dashboard
. For example:
http://192.168.0.X/dashboard
This is a work-in-progress. New features and bug-fixes will be added here as needed. If you want to update your copy with the latest changes, follow these steps.
-
Navigate to the dashboard folder:
cd /var/www/html/dashboard
-
Backup your variables file:
sudo cp variables.php ../
-
Update your code with the latest changes:
sudo git pull
-
Update the variables file with the values appropriate to your environment and installation:
sudo nano variables.php
NOTE: Since new variables may have been introduced since the time when you initially installed this program, do not overwrite the new variables file with your old one. Rather edit the new file and enter the appropriate values. If needed, refer to the backup copy of the variables file you made (located at /var/www/html) for values that you don't remember.