November 23, 2018

Weather34 install at WEB hotel


Updated 2019-04-01 !

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

You will find migration information, from WeatherLink 1.0 to WeatherLink 2.0, in this post



Hosted installation

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

In our case we have created a subdomain http://vader.domsten.nu 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.

The Cumulus version of W34 is now, 2019-01-08, supported by the Cumulus team. There is a Wiki, a Forum, a GitHub repository and a source zip-file for download.

Download all the W34 files, to Your Mac/PC and unzip them.

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

Transfer the W34 folder, "CU-HWS-master", 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-HWS-master" folder inside the "public_html" and then for example rename it to "pws".)

Rename "public_html" to "public_html_old"


Rename "CU-HWS-master" to "public_html"

Check the application at Your host adress, and make the configuration at "yourhost.nu/easyweathersetup.php"

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)

(It could be that Your Host don't supports Curl and then You have to use an older version of W34 found here. Our Host did support Curl !)


Edit the PHP file, "cumulusdata.php", so that the 3 records in the beginning of the program

$wlink_user = "XXXX"; 
$wlink_pass = "YYYY";
$wlink_apiToken = "ZZZZ";

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;

http://yourhost.nu/add_on/cumulusdata.php

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 https://cron-job.org/en/ where You register the URL http://yourhost.nu/add_on/cumulusdata.php
to be executed up to every minute. (WL will update at most every minute.)

Avoiding cron job ? Check this

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 http://yourhost.nu 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, daily max wind and yesterday's rainfall 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
Remarks
Please also check the remarks at the bottom of RPi installation post.

2 comments:

  1. Hello,

    I would like to use this system, but the W34 website is down. Do you have some mirror?

    ReplyDelete
  2. Hi! Check this out.... https://pysselilivet.blogspot.com/2018/03/weather34-production-version.html

    ReplyDelete

Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !