Author Topic: Support of "Leuven" WeatherUnderground scripts  (Read 1851 times)

0 Members and 1 Guest are viewing this topic.

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1485
    • My PWS at Leuven Belgium Europe
Support of "Leuven" WeatherUnderground scripts
« on: March 28, 2019, 02:43:07 PM »
Coloured tables
Demo: https://www.weerstation-herent.be/wsreports/_test1.php
Download: https://leuven-template.eu/leuven_download2019.php?id=reports
Readme: N/A There are only a few settings to adjust, they are at the first lines of the start-script
Known issues:  2019-11-22: The solution for missing data in WU .CSV  is now also included in the download, readme here

History tables
This is an alternative script for the widely used Jim McMurry script. My version does not contain any http-links, so that those "d*mn*d" bots can not follow the links.
Demo: https://leuven-template.eu/wuhistory/_test1.php
Download: https://leuven-template.eu/leuven_download2019.php?id=history
Readme: N/A There are only a few settings to adjust, they are at the first lines of the start-script
Known issues: 2019-11-22: The solution for missing data in WU .CSV  is now also included in the download, readme here

Both scripts are relative easy to install and can be used stand-alone, in an iframe and in the Leuven- or Saratoga-Template.

Support:
When you post questions about the scripts, please always include the URL (=correct link)  to the script on your website. That reduces the time for answering your questions.

Wim
Updates: 2019-11-24 Added readme for WU .CSV "problems" + updated download with the extra script
« Last Edit: November 24, 2019, 09:21:21 AM by wvdkuil »
Support for Leuven-Template & Scripts  at this forum
Support for the PWS_Dashboard (HWS-template) for WD a.o.  http://pwsdashboard.com/
Script sponsors https://support.leuven-template.eu/userlistScripts.php
Template sponsors https://support.leuven-template.eu/userlist.php

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7530
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Support of "Leuven" WeatherUnderground scripts
« Reply #1 on: March 28, 2019, 02:49:42 PM »
Thanks again, Wim!
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1526
    • Texas Weather
Re: Support of "Leuven" WeatherUnderground scripts
« Reply #2 on: March 28, 2019, 03:16:13 PM »
Thank you wim!

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline MarkDM

  • Member
  • *
  • Posts: 3
    • Weerstation Berlare
Re: Support of "Leuven" WeatherUnderground scripts
« Reply #3 on: May 23, 2019, 03:42:12 PM »
Since a few days I get no new graphs from WU : http://weerstation.uitbergen.net/index.php?p=62-2&lang=nl#data-area
I notice I am not alonce suffering this problem:
http://meteoroosendaal.nl/index.php?p=62-2&lang=nl#data-area
Meteobridge is still uploading. What can be wrong ?

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 786
Re: Support of "Leuven" WeatherUnderground scripts
« Reply #4 on: May 23, 2019, 04:32:44 PM »
WU has problems with the history download
(there are other threads about that)

Offline MarkDM

  • Member
  • *
  • Posts: 3
    • Weerstation Berlare
Re: Support of "Leuven" WeatherUnderground scripts
« Reply #5 on: July 28, 2019, 06:43:13 AM »
Thank you.
Yesterday I noticed that the problem is solved in Wim's website:
https://weer.sluispark.be/index.php?p=mnu_wu_graph&lang=nl#data-area
Can we find somewhere what we have to do ? At my station WU graphs are still missing...
http://weerstationberlare.be/index.php?p=62-2&lang=nl#data-area
I am not alone:
http://meteoroosendaal.nl/index.php?p=62-2&lang=nl#data-area
« Last Edit: July 28, 2019, 06:47:32 AM by MarkDM »

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1485
    • My PWS at Leuven Belgium Europe
Re: Support of "Leuven" WeatherUnderground scripts
« Reply #6 on: July 28, 2019, 03:02:27 PM »
Thank you.
Yesterday I noticed that the problem is solved in Wim's website:
https://weer.sluispark.be/index.php?p=mnu_wu_graph&lang=nl#data-area
Can we find somewhere what we have to do ? At my station WU graphs are still missing...
http://weerstationberlare.be/index.php?p=62-2&lang=nl#data-area
I am not alone:
http://meteoroosendaal.nl/index.php?p=62-2&lang=nl#data-area
As you are a native Dutch speaker,  check the Dutch forum here with an active topic about this for 7 weeks already.  You will find some solutions and the do's and dont's

Or check the numerous topics on this forum about the WU .csv problems.
Wim
Support for Leuven-Template & Scripts  at this forum
Support for the PWS_Dashboard (HWS-template) for WD a.o.  http://pwsdashboard.com/
Script sponsors https://support.leuven-template.eu/userlistScripts.php
Template sponsors https://support.leuven-template.eu/userlist.php

Offline MarkDM

  • Member
  • *
  • Posts: 3
    • Weerstation Berlare
Re: Support of "Leuven" WeatherUnderground scripts
« Reply #7 on: July 29, 2019, 02:01:36 PM »
Hello Wim,
Thank you for your reply. I did not know about that forum. It is not mentioned in the Leuven-Template support pages.
But it will help me out.
Thanks again.
Mark

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1485
    • My PWS at Leuven Belgium Europe
Re: Support of "Leuven" WeatherUnderground scripts
« Reply #8 on: November 16, 2019, 03:09:14 AM »
I got this request as a private message, but it seems better to answer it here:
Quote
Hi wim I downloaded on your site leuven the script colored table For some time I noticed that the data of the year are gone for 2019 that of the years precedent are not erased. A few days ago I had the data only from the end of October and November and nothing since the beginning of the year and since yesterday I have all the data until August 20, 2019 and since then nothing? would you have an idea of what's going on? I thank you in advance good evening

Cause:
WU is now owned by the WeatherChannel which is an IBM company.

The last months there  are severe problems with the WU database.  We use  a WU-.asp script to download data from the database in .CSV files

"Management at IBM" tell us that the .CSV will cease to exist and is not supported anymore.

But the programmers  are still working on it, hence the fluctuating periods for new requests.
But it seems they lost the whole "old" database before October 20


Backup: @ALL Important
The old years data is cached in the  wudata/ (or in the .cache/ ) folder on your server. 
Make a backup of those files, there is 1 file for each year. 
www . your website. xxx /wsreports/wuData/__WUID__-year-2018.txt
and all earlier years.

If you happen to have data until august 2019, copy that file also.

Save those files for future use on your PC at home.

Solution:
Script authors as Ken True and myself are working on solutions to access 
And yes the adapted scripts seem to work if you check my station-sites, but it need fine-tuning, documentation and more testing.

It will be  a few weeks before general availabilty.

And I still sincerely hope that WU would get their act together and make the .CSV files available, maybe using our WU_API-keys

Wim

Support for Leuven-Template & Scripts  at this forum
Support for the PWS_Dashboard (HWS-template) for WD a.o.  http://pwsdashboard.com/
Script sponsors https://support.leuven-template.eu/userlistScripts.php
Template sponsors https://support.leuven-template.eu/userlist.php

Offline Stromseth

  • Member
  • *
  • Posts: 5
    • BJFF Weather stations
Re: Support of "Leuven" WeatherUnderground scripts
« Reply #9 on: November 17, 2019, 06:32:41 AM »
As you are a native Dutch speaker,  check the Dutch forum here with an active topic about this for 7 weeks already.  You will find some solutions and the do's and dont's

Seems like that topic does not exist anymore on hetweeractueel.nl

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1485
    • My PWS at Leuven Belgium Europe
Re: Support of "Leuven" WeatherUnderground scripts
« Reply #10 on: November 17, 2019, 06:38:46 AM »
As you are a native Dutch speaker,  check the Dutch forum here with an active topic about this for 7 weeks already.  You will find some solutions and the do's and dont's

Seems like that topic does not exist anymore on hetweeractueel.nl
No they had a server-crash a few weeks ago, losing all data after 2018.
They are working to rebuild the complete site in the coming months.

If you understand  dutch  this one https://leuven-template.eu/smf/index.php?board=34.0 also list the status for different "WU-dependant" scripts.

Wim
Support for Leuven-Template & Scripts  at this forum
Support for the PWS_Dashboard (HWS-template) for WD a.o.  http://pwsdashboard.com/
Script sponsors https://support.leuven-template.eu/userlistScripts.php
Template sponsors https://support.leuven-template.eu/userlist.php

Offline Stromseth

  • Member
  • *
  • Posts: 5
    • BJFF Weather stations
Re: Support of "Leuven" WeatherUnderground scripts
« Reply #11 on: November 17, 2019, 06:39:24 AM »
But it seems they lost the whole "old" database before October 20

My problem seems to be the exact opposite  :?
wxStartReports.php daily report shows data until mid October but nothing after. The data exists as far as I can understand; downloaded / cached with WXDailyHistory.php.

wxStartReports.php version 4.00

Stian

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1485
    • My PWS at Leuven Belgium Europe
Re: Support of "Leuven" WeatherUnderground scripts
« Reply #12 on: November 17, 2019, 06:54:24 AM »
But it seems they lost the whole "old" database before October 20
My problem seems to be the exact opposite  :?
wxStartReports.php daily report shows data until mid October but nothing after. The data exists as far as I can understand; downloaded / cached with WXDailyHistory.php
wxStartReports.php version 4.00
Stian
The scripts of your version do not contain a link to WXDailyHistory.php
You should also adapt line 173 in wsreports/wsReports1part.php from
Code: [Select]
$wuURLs[] = 'https://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID='.$SITE['wuID'].'&month=01&day=01&year='.$i.'&format=1&graphspan=year'; to
Code: [Select]
$wuURLs[] = 'http://www.altevatnet.no/WXDailyHistory.php?ID='.$SITE['wuID'].'&month=01&day=01&year='.$i.'&format=1&graphspan=year'; or equivilent, depending on where you installed Ken True's version of the "Man-In-The-Middle" script.
If you did not install that WXDailyHistory.php script, you also need to set your WU-Api key and do the other things as advised in this document:
Saratoga solution: https://github.com/ktrue/WU-History/blob/master/README.md

Wim
Support for Leuven-Template & Scripts  at this forum
Support for the PWS_Dashboard (HWS-template) for WD a.o.  http://pwsdashboard.com/
Script sponsors https://support.leuven-template.eu/userlistScripts.php
Template sponsors https://support.leuven-template.eu/userlist.php

Offline Stromseth

  • Member
  • *
  • Posts: 5
    • BJFF Weather stations
Re: Support of "Leuven" WeatherUnderground scripts
« Reply #13 on: November 17, 2019, 07:32:47 AM »
The scripts of your version do not contain a link to WXDailyHistory.php

Aaaahh! Thank you so much!
Changed the $wuURLs, deleted the already downloaded data and reloaded. Now my WU-data is complete.

Really appreciate your quick and accurate response!  =D>

Stian

Offline Stromseth

  • Member
  • *
  • Posts: 5
    • BJFF Weather stations
wxStartReports.php language bug?
« Reply #14 on: November 17, 2019, 07:43:36 AM »
One more thing, sorry for spamming this topic now ...

I'm not sure if it's just me, but I had to change a few lines in wxStartReports.php to make my localization work.

Lines 81 and 82 states:
Code: [Select]
$saved_lang = $lang;
$SITE['lang'] = $lang;

I'm not sure if these two lines make sense? Both $saved_lang and $lang seems empty when wxStartReports.php is loaded.

I changed the lines to
Code: [Select]
$lang = $SITE['lang'];
$saved_lang = $lang;
and now the localization / language selection works as it should. The $lang parameter is loaded with the sitewide language code and the correct wulanguage-??.txt is loaded.

Stian

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1485
    • My PWS at Leuven Belgium Europe
Re: wxStartReports.php language bug?
« Reply #15 on: November 17, 2019, 08:19:22 AM »
One more thing, sorry for spamming this topic now ...

I'm not sure if it's just me, but I had to change a few lines in wxStartReports.php to make my localization work.

Lines 81 and 82 states:
Code: [Select]
$saved_lang = $lang;
$SITE['lang'] = $lang;

I'm not sure if these two lines make sense? Both $saved_lang and $lang seems empty when wxStartReports.php is loaded.

I changed the lines to
Code: [Select]
$lang = $SITE['lang'];
$saved_lang = $lang;
and now the localization / language selection works as it should. The $lang parameter is loaded with the sitewide language code and the correct wulanguage-??.txt is loaded.

Stian
I am not able to quickly test with a working Saratoga website. If it works for you, it is OK.
The version I tested with, years ago, always had $lang set to the selected or default language. But it could be  a misinterpretation on my side also. 

Wim
Support for Leuven-Template & Scripts  at this forum
Support for the PWS_Dashboard (HWS-template) for WD a.o.  http://pwsdashboard.com/
Script sponsors https://support.leuven-template.eu/userlistScripts.php
Template sponsors https://support.leuven-template.eu/userlist.php

 

anything