Saturday, 13 May 2017

Weather34 install at WEB hotel

Updated 2017-08-25 !

Prerequisites is listed in the beginning of post for installation on Raspberry Pi(RPi)

Hosted installation

In this guide I will use Loopia as an example but other hosts schould be similar

In our case we have created a subdomain which is used for the W34 application

In the root of the subdomain a folder, named "public_html" , is created by the host and this is the webserver document root.

Download all the W34 files, Cumulus version, to Your Mac/PC and unzip them. The folder "CU-X5" will be created

Use an FTP client, Filezilla ?, and log on to Your FTP account at the Host.

Transfer the W34 folder, "CU-X5", to Your host and put it in parallel to the "public_html" folder. If You want W34 to run at root level !!!! Se picture

(Otherwise transfer the "CU-X5" folder inside the "public_html" and then for example rename it to "pws".)

Rename "public_html" to "public_html_old"

Rename "CU-X5" to "public_html"

Check the application at Your host adress, and make the configuration at ""

Create a folder named "add_on" in Your Mac/PC

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

FTP the "add_on" folder to the host and place it in the "public_html" folder

Change the authority for folder "chartswudata" and the files in it to 755

Add a cron job at the host, check picture. 
URL example;

This job will get the data, every 5 minutes, from WL and create/update the online file "realtime.txt"

If Your host don't supports cronjobs You could use an external free service like where You register the URL
to be executed up to every 2 minutes. (WL will update at most every minute.)

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"  
Now You should be up and running at and You can check the timestamp, after the cronjob has run, in the single record in the "add_on/realtime.txt" file.

Please note;
  • Trend values, temperature 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
Update W34

When You update/replace W34 to a new version, save
  • ”settings1.php” so You don't have to use "easyweathersetup.php" again 
  • "add_on" folder with included files
  • "menu.php" if You have added own Menu rows
Please also check the remarks at the bottom of RPi installation post.

No comments:

Post a Comment