Hopefully this is the final part which gets the Raspberry Pi working as a weather monitoring station. I will cover the little things that need to be done with the website and confirm the final weather.ini and other tweaks required where appropriate.
Starting with the weather.ini file, the bits that really do make a difference:
templates = /var/www/text/
graph_templates = /var/www/plot/
work = /var/www/temp/
[ftp] secure = False
site = localhost
local site = True
user = anonymous
directory = /var/www/public/
password = anonymous
Based on these settings then some changes need to be made to the website page index.php, I am not going through all the settings but will pick a couple of samples so that you get the idea. My Raspberry Pi is now working and collecting and presenting weather data internally to me based on these changes. The site is not open to public viewing yet.
Some blocks of code from index.php, key areas requiring change will be the path:
require_once(‘public/forecast_icon.txt’)- note the path in this line needed changing, note the change to the filename too from an earlier post
text template part of web code:
require_once(‘public/1hrs.txt’); – note the path in this line needed changing
graph presentation part:
echo ‘<h2>Last 24 hours graphs</h2>’; – The title of the graph needed changing
echo ‘<p><img src=”public/24hrs.png” alt=”” title=”” /></p>’; – note the path in this line needed changing
attached is a sample graph screen grab from my web page to show what it should look like when you select the 24 hours graph option from the left hand menu.
I hope by following the steps I have outlined you have a little less trouble than I did getting your Raspberry Pi interfaced to a Maplin (or Fine Offset WH-1080) USB weather station.
You will need to spend time customising the Weather By You supplied Weather Nature template as in its raw form it will not work, hopefully the sample bits above will give you enough to work with as they are repeated in for each of the options.
From scratch it has taken me most of the day to build mine while at the same time writing these blog posts so that I have my how-to documented and available for others to use.
Next set of posts will be for setting up the CurrentCost meter which works with the Pi, just need to write it up :-) Will wait till the weather site has been running for a few days first.
Nearly forgot, once you are happy all is ok and data is being collected and published as expected, you might want to reduce the collection interval by stopping the pywws LiveLog process and then running
python SetWeatherStation.py -r XX replacing XX with the value of you choice in minutes, then restarting the LiveLog.py command to resume data collection