Updated 2017-05-26 !!
I You want Your Private Weather Station(PWS), Davis Vantage Pro2 or other Davis products that use WeatherLink, to provide data for the template we use at Domstens Båtklubb just follow the instructions below
Before You start You must ensure that;
- You have a registered account at Davis Weatherlinksite(WL)
- PWS data is pushed to WL
- You have a registered account at Weather Underground(WU)
- PWS data is pushed to Weather Underground
W34 is built so it can get online data from many different PWS solutions which should update their respective online files at the W34 web-server. In our case we pull the XML data direct from the WL site and update an online file, type "cumulus", on the W34 web-server
Install Weather34(W34) according to the instructions at the W34 site, WEB hosted installation or RPi install below.
To start up fresh on the RPi You can follow the instructions here.
Download all the files to Your Mac/PC and unzip them
Modify, RPi folder, owner/permission sudo chown pi:pi /var/www/html
Loged on as "pi" move the folder "weatherdashboardV34WF", using Finder/Explorer (Samba), to the RPi folder /var/www/html/
Rename "weatherdashboardV34WF" to "pws"
Change authority sudo chmod 777 /var/www/html/pws/settings1.php so you can make the setup
Setup with URL http://pws01/pws/easyweathersetup.php No Password
Create a folder "add_on".
Download/fork the files, "cumulusdata.php" and "realtime.templ", from Github and place them in the "add_on" folder. (The online file "realtime.txt" will be created by the program)
Edit the PHP file, "cumulusdata.php", so that the 2 records in the beginning of the program
$wlink_user = "XXXX";
$wlink_pass = "YYYY";
uses Your credentials to log on to WL
Since the updates from WU, local files are changed, is made by the W34 application, and the Apache servers default user/group is www-data, there will be authority problems.
Change authority with
sudo chmod -R 777 chartswudata
sudo chmod -R 777 chartswudata/* (I the folder is empty You will get a notice)
sudo chmod -R 777 jsondata
sudo chmod -R 777 jsondata/*
Add a crontab record, as user "pi", using, crontab -e
*/5 * * * * php /var/www/html/pws/add_on/cumulusdata.php
This job will get the data, every 5 minutes, from WL and create/update the online file "realtime.txt"
Run the "easyweathersetup.php" again and update the path to the new online file.
In the section "Software Type & Path to Data file" choose
- "Data Type" => "cumulus"
- "Your Path to data file" => "add_on/realtime.txt"
- Trend values, temperatur and pressure, will take up to 2 hours before they are OK.
- Wind run and daily max wind will be correct after a day shift
When You update/replace W34 to a new version, save
- ”settings1.php” file so You don't have to use "easyweathersetup.php" again
- "add_on" folder
- "menu.php" file if You have added own Menu rows
2017-05-26 The program "cumulusdata.php" added support for fields
- temp high/low time => cumulus[27/29]
- wind high/max time => cumulus[31/33]
NOTE ! If You are updating to the new W34 version V3.4 X4 and migrating ”settings1.php” please note that You have to use "easyweathersetup.php" and update the part ”Options for Top Row 4 Modules” before You start the W34 application.
2017-05-20 The program "cumulusdata.php" added support for fields
- uv-index => cumulus
- solar radiation => cumulus
2017-05-04 W34 has added support for the fields;
- min barometer => cumulus
- windrun => cumulus
so the program "cumulusdata.php" is updated
2017-04-25 Due to changes in W34 the program "cumulusdata.php" now calculates trend values for temperature and pressure in a new way and therefore the file "realtime.templ" is extended. So if You are doing an update You must change to the new "realtime.templ" and "realtime.txt". The best way is to delete both files and download the extended "realtime.templ". Then when the program "cumulusdata.php" runs for the first time the "realtime.txt" will be recreated.
From version 3.4G, released 2017-03-25, the croon jobs for the native functions is not used anymore, but it's still needed for the Weatherlink data pull.