WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: wvdkuil on March 28, 2019, 02:43:07 PM

Title: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil 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 (https://www.weerstation-herent.be/wsreports/WU_CSV_problems_readme.pdf)

History tables
This is an alternative script for the widely used Jim McMurry (http://jcweather.us/scripts.php) 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 (https://leuven-template.eu/WU_CSV_problems_readme.pdf)

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
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: saratogaWX on March 28, 2019, 02:49:42 PM
Thanks again, Wim!
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: txweather.org on March 28, 2019, 03:16:13 PM
Thank you wim!
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: MarkDM 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 (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 (http://meteoroosendaal.nl/index.php?p=62-2&lang=nl#data-area)
Meteobridge is still uploading. What can be wrong ?
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: waiukuweather on May 23, 2019, 04:32:44 PM
WU has problems with the history download
(there are other threads about that)
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: MarkDM 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 (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 (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 (http://meteoroosendaal.nl/index.php?p=62-2&lang=nl#data-area)
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil 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 (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 (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 (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  (http://www.hetweeractueel.nl/forum/weer-website-ontwikkeling-design-en-hosting/70939-wu-graph-error-veel-sites-hebben-de-zelfde-fout) 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
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: MarkDM 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
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil 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

Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: Stromseth on November 17, 2019, 06:32:41 AM
As you are a native Dutch speaker,  check the Dutch forum  here with an active topic  (http://www.hetweeractueel.nl/forum/weer-website-ontwikkeling-design-en-hosting/70939-wu-graph-error-veel-sites-hebben-de-zelfde-fout) 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
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on November 17, 2019, 06:38:46 AM
As you are a native Dutch speaker,  check the Dutch forum  here with an active topic  (http://www.hetweeractueel.nl/forum/weer-website-ontwikkeling-design-en-hosting/70939-wu-graph-error-veel-sites-hebben-de-zelfde-fout) 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
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: Stromseth 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
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil 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
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: Stromseth 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
Title: wxStartReports.php language bug?
Post by: Stromseth 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
Title: Re: wxStartReports.php language bug?
Post by: wvdkuil 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
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: lacouste on February 03, 2020, 05:33:30 PM
hello here I am contacting you for help
2 things
I have the scrpit https://meteolimoux.fr/wugraphs.php
it worked well but since I solved the problem of wunderground with the colored table this one has more and more trouble to function and sometimes does not display the graphs of the day so how to make this super script work again?
the second thing is that my host went from http to https so I can no longer manage in all the files in the folder to correct the correct path in https so that the script can work again
thank you in advance good end of the evening
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on February 04, 2020, 02:50:51 AM
. . .  shortened . . .
I have the scrpit https://meteolimoux.fr/wugraphs.php
it worked well but since I solved the problem of wunderground with the colored table this one has more and more trouble to function and sometimes does not display the graphs of the day so how to make this super script work again?
This topic you are posting in is for Leuven-scripts.
The scripts at https://meteolimoux.fr/wugraphs.php  are not written by me, they are from another author. And your version does not show anything at all.
The html is incomplete and essential scripts, such as jquery are not loaded as you forgot to change the http link to https
Quote
Mixed Content: The page at 'https://meteolimoux.fr/wugraphs.php' was loaded over HTTPS, but requested an insecure script 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'.
This request has been blocked; the content must be served over HTTPS.

At the bottom of that page it reads "WU-Graphs  v 1.8.0 © 2010 " by "Radomir Luza (http://pocasi.hovnet.cz/wxwug.php?lang=en)"

Probably there are dozens of discussions about these scripts and as far as you can check at multiple user-sites  they normally run in https and can be easily adapted to use the .CSV replacement scripts from Ken True (https://github.com/ktrue/WU-History/blob/master/README.md) or myself.

And you can always check the thank-you mail you got when you donated for these scripts at the authors download site?

Wim
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: MétéoOrsay on March 08, 2020, 02:44:09 PM
Hello,
I successfully installed the WU-History-master module and recovered all the data from WU. It has been running very well for over a month.
Looking at the data https://www.meteo-orsay.fr/custom/WU-History-master/WXDailyHistory.php?&year=2020&graphspan=year&debug=y (https://www.meteo-orsay.fr/custom/WU-History-master/WXDailyHistory.php?&year=2020&graphspan=year&debug=y), they are correct but not displayed for rain data .
Indeed, it is displayed in tenths of mm instead of mm!
Have you ever noticed this problem?
https://www.meteo-orsay.fr/custom/wsreports_new.php (https://www.meteo-orsay.fr/custom/wsreports_new.php)
Thank you in advance.

Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: MétéoOrsay on March 11, 2020, 10:52:19 AM
Hello,
I successfully installed the WU-History-master module and recovered all the data from WU. It has been running very well for over a month.
Looking at the data https://www.meteo-orsay.fr/custom/WU-History-master/WXDailyHistory.php?&year=2020&graphspan=year&debug=y (https://www.meteo-orsay.fr/custom/WU-History-master/WXDailyHistory.php?&year=2020&graphspan=year&debug=y), they are correct but not displayed for rain data .
Indeed, it is displayed in tenths of mm instead of mm!
Have you ever noticed this problem?
https://www.meteo-orsay.fr/custom/wsreports_new.php (https://www.meteo-orsay.fr/custom/wsreports_new.php)
Thank you in advance.

Hello,
After searching in the code, the WU-History-master script considers the rain data as being in cm instead of mm.
Having failed to modify this error, I changed the WU-reports script to take rain data in cm into account.

The changes are made in the files
- startReports.php - Line 29 change mm by cm for display in the table

- WSReport1.php - Line 318 change mm by cm for displaying the scale

Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: martin150 on May 13, 2020, 03:36:52 AM
Hi,
Could you please help me.
I got an script/html error loading /wuhistory/WU-History4.php

I did make all modifications but it doesnt work.
Also reports is only working 2020. When i change to an other year also error

Links
https://www.hildner.at/weather28/index.php?p=wuhistory&lang=en#data-area&debug

https://www.hildner.at/weather28/index.php?p=wsReports&lang=en#data-area

Tnx in advance!

LG
Martin
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on May 13, 2020, 04:13:11 AM
. . .
I got an script/html error loading /wuhistory/WU-History4.php
https://www.hildner.at/weather28/index.php?p=wuhistory&lang=en#data-area&debug

Script wu/WU-History4.php line 377 - 380
Code: [Select]
#--------- load the required csv from WU
$rawData        = ws_makeRequest($wu_url,$wu_test_file);
$raw            = explode ('<br>', $rawData);   ##### ! if they omit the <br> we have to change it here
#$raw            = explode ("\n", $rawData);
There were different end-of-line solutions, we are now using the \n
Change the last two lines bycommenting the line with br and uins the line with \n
Code: [Select]
#$raw            = explode ('<br>', $rawData);   ##### ! if they omit the <br> we have to change it here
$raw            = explode ("\n", $rawData);

Quote
Also reports is only working 2020. When i change to an other year also error
https://www.hildner.at/weather28/index.php?p=wsReports&lang=en#data-area
Probably  your site to went https and the links ran a short time with http.
Your webserver has sent a 301 message in plain html which the script has stored as the answer containing WU data.
Check the file:
https://www.hildner.at/weather28/wsreports/wuData/IOBERSTE7-year-2011.txt
All yearly files except this year are always used from the cache. So we have to clean the cache to get rid of the 301 erros.
Remove all yearly files (except 2020) in weather28/wsreports/wuData/ and the scripts should load the data correctly.

Thanks for using the Leuven-Template,
Best regards,
Wim
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: martin150 on May 13, 2020, 04:43:40 AM
Wow great support !!
Many tnx, i did change this /n but in another script. Now works fine!

For the reports i´ve two questions:
First i´ve already an error in the top line like:
Code: [Select]
Notice: Undefined variable: uomWrun in /home/.sites/50/site8222718/web/weather28/wsreports/wsReports1part.php on line 95
Second: When i change the year i got a standalone template and my menü is gone.
 [ You are not allowed to view attachments ]

LG Martin
PS: is there any solution for "Neighboring Stations" also from WU ??
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on May 13, 2020, 06:22:07 AM
. . .
For the reports i´ve two questions:
First i´ve already an error in the top line like:
Code: [Select]
Notice: Undefined variable: uomWrun in /home/.sites/50/site8222718/web/weather28/wsreports/wsReports1part.php on line 95
It seems you mixed the stand-alone version 4.0 into the template version 3.x which was designed to run into the template. Still nice that it runs at all.
This one error can be solved , replace the empty line 51 in your version of wsReports1part.php
Code: [Select]
$uomwrun = 'km';
Quote
Second: When i change the year i got a standalone template and my menü is gone.
Same problem of a mixed up version
Change line 245 in wsreports/wsReports1part.php from
Code: [Select]
if (isset ($SITE['ipad']))  {$extralang .= PHP_EOL.'<input type="hidden" style="padding: 0px; border: 0px; margin: 0px" name="ipad" value =" "/>'.PHP_EOL;}
to
Code: [Select]
if (isset ($SITE['ipad']) && $SITE['ipad'] == true)
 {$extralang .= PHP_EOL.'<input type="hidden" style="padding: 0px; border: 0px; margin: 0px" name="ipad" value =" "/>'.PHP_EOL;}
Quote
LG Martin
PS: is there any solution for "Neighboring Stations" also from WU ??

Originally those were simple html pages with a little js-code. WU allowed us to run those pages in an iFrame on our own sites.
They paid heavy money to develop and maintain the new improved pages and they understandably do not want those pages to be used in other sites.

Succes, Wim

Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on May 13, 2020, 10:56:05 AM
. . .
For the reports i´ve two questions:
First i´ve already an error in the top line like:
Code: [Select]
Notice: Undefined variable: uomWrun in /home/.sites/50/site8222718/web/weather28/wsreports/wsReports1part.php on line 95
Typing error, sorry for that  :oops:
This solution
Quote
replace the empty line 51 in your version of wsReports1part.php
Code: [Select]
$uomwrun = 'km';
Should have read:
replace the empty line 51 in your version of wsReports1part.php
Code: [Select]
$uomWrun = 'km'; with a capital W

Wim
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: martin150 on May 14, 2020, 03:03:12 AM
Hi
Tnx for your solutions. All working fine now. The error has gone before i did make the change, maybe about some cached datas.

As a litte thanks i did make some additions and corrections in the wulanguage-de.txt

For your use i attached the file!!

LG
Martin
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: bussez on June 06, 2020, 04:02:49 AM
Hi Wim, i am trying the standalone wsreport script with csv file upgrade, this seems to work:

http://www.meteostroncone.info/WXDailyHistory.php?ID=IUMBRIAS2&graphspan=year

but the file  http://www.meteostroncone.info/wsreports_prova/wsReports1part.php

causes error:

Fatal error: Call to undefined function ws_message() in /web/htdocs/www.meteostroncone.info/home/wsreports_prova/wsReports1part.php on line 35

thank you support!

Roberto
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on June 06, 2020, 04:38:34 AM
Hi Wim, i am trying the standalone wsreport script with csv file upgrade, this seems to work:
http://www.meteostroncone.info/WXDailyHistory.php?ID=IUMBRIAS2&graphspan=year

but the file  http://www.meteostroncone.info/wsreports_prova/wsReports1part.php
causes error: Fatal error: Call to undefined function ws_message() in /web/htdocs/www.meteostroncone.info/home/wsreports_prova/wsReports1part.php on line 35
thank you support!
Roberto
The error is caused because this wsReports1part.php is not the start-script.

The script to run is the one you changed to your station a.s.o. startReports.php
http://www.meteostroncone.info/wsreports_prova/startReports.php

Wim

P.S. Next time please tell me that you are using the scripts already from another folder
And that they seem to run correctly.   http://www.meteostroncone.info/wsreports/startReports.php
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: Eric971 on June 16, 2020, 07:43:10 AM
I have found this version coded for the WsWin software. I've downloaded the php files, but I'm too rookie to adapt them to our purpose. Do you think it is possible ?

(http://chevrerie.du.cap.chez-alice.fr/images/report.jpg)
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on June 16, 2020, 09:01:42 AM
I have found this version coded for the WsWin software. I've downloaded the php files, but I'm too rookie to adapt them to our purpose. Do you think it is possible ?

(http://chevrerie.du.cap.chez-alice.fr/images/report.jpg)
If you want to use a script you should ask the author of the scripts what is possible.
And  explain what you want, so what the purpose  is in  "adapt them to our purpose."

Succes, Wim
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: Eric971 on June 16, 2020, 09:11:18 AM
OK. Thank you.
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: Eric971 on July 31, 2020, 05:27:04 AM
Is there a way to modify the scales of legends and how could we do, please ?
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on July 31, 2020, 05:35:42 AM
Is there a way to modify the scales of legends and how could we do, please ?

What script are you talking about?
Without a link to your website and the page there is no support possible as i am not clairvoyant.

@ALL Please always include a link to the page so I can check if it is one of the WU-scripts I wrote  and what  could be done to solve the problem or question you may haver.

Thank you.
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: Eric971 on July 31, 2020, 09:59:02 AM
Sorry, I'm talking about Coloured tables scale légends.

http://chevrerie-du-cap.com/meteo/reports/ (http://chevrerie-du-cap.com/meteo/reports/)
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on July 31, 2020, 11:11:32 AM
Is there a way to modify the scales of legends and how could we do, please ?
The 'scales of legends' is mostly done in CSS => http://chevrerie-du-cap.com/meteo/reports/wsReports.css

The number of boxes with the breakdown values is done for each weather-value in wsReports1part.php starting from line 256

Succes,
Wim
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: Eric971 on July 31, 2020, 02:43:16 PM
 [tup]
Thank you very much !
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: Eric971 on August 01, 2020, 04:02:32 AM
Temp scale modified ! Cool.

Now, is there a way to convert winds and gusts scales into Beaufort scale ?
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on August 01, 2020, 04:25:35 AM
Temp scale modified ! Cool.
[tup]
Quote
Now, is there a way to convert winds and gusts scales into Beaufort scale ?
It would be "un-professional"  to convert gust-speed to Beaufort as per definition of Beafort it can only be used for wind (= measured over a period) and not to gust as that is a instantaneous value.

There is conversion for wind-speed  to m/s, kmh, mph, kts. But not to Beaufort.

So you are on your own for that.

Wim

P.S. I will not be enhancing / extending any of the Leuven scripts. Just support them as is.
These scripts have always been donation-ware but there was no year in the past were donations re-covered my external support-related costs.
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: Eric971 on August 01, 2020, 05:38:25 AM
Ok, I understand.
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on August 01, 2020, 05:56:39 AM
Looks like Yrno forecast is also changed.
Not sure if there is already a topic about.
The Leuven support forum is not readable for me anymore.
The xml has changed.
Well something to do I guess.

Please post support requests in the correct topic. In this case yr.no has nothing to do with WeatherUnderground.
=> https://support.leuven-template.eu/  list all my products and where to post your remarks.
The leuven-forum (native Dutch only) is for sponsors only. It has been that way for the past  years .

Also a screenshot or a link to your "problem-page" would be helpful.

The yr.no forecasts contain a hidden warning to the script-programmers.
Quote
NB!!! Since we have no other options to contact our users of forecast.xml, we have decided to use this method to get your attention to some major changes with our API
In the first quarter next year, forecast.xml and forecast_hour_by_hour.xml will be discontinued in favour of a newer JSON API.
Vi encourage you already now to switch to the new API.
There are a lot of changes, and you can read all the technical details in our new developer portal https://developer.yr.no

They also show a message to read that warning in the data-fields on some forecasts during the day.
That is their only way to bring this to the script-authors attention, but it looks not nice for the visitors of the websites.

The yr.no script will not be adapted as yr.no data will be replaced with data identical to met.no. The forecasts will be identical.

I read all the changes and have to decide if it is worth my time to adapt the met.no leuven-scripts before end-of-this year when yr.no and met.no forecasts in the 1.9 version will by EOL.

Wim
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: Eric971 on October 11, 2020, 04:13:07 AM
Hi,

what should i do so that zero value is not displayed, and only display empty cell for rain report ?

http://chevrerie-du-cap.com/meteo/reports/index.php?lang=fr (http://chevrerie-du-cap.com/meteo/reports/index.php?lang=fr) please select "pluie" criteria. It is rain in french.
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on October 12, 2020, 02:44:48 AM
Hi,

what should i do so that zero value is not displayed, and only display empty cell for rain report ?

http://chevrerie-du-cap.com/meteo/reports/index.php?lang=fr (http://chevrerie-du-cap.com/meteo/reports/index.php?lang=fr) please select "pluie" criteria. It is rain in french.

That is not to do, easily. Probably the easiest way is to filter the zero values for rain in the .csv and replace with empty fields.

An empty cell is used for a no-data field so without any color..
A zero for rain is different from a "no-rain-data"

Wim
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: Eric971 on October 12, 2020, 04:27:43 AM
I did not think about it. Thank you,it's the best way for me regarding my skill.
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: lacouste on January 02, 2021, 09:18:59 AM
hello everyone and happy new year above all
I noticed that since December 31, 2020 the colored table wunderground does not update any more, on the other hand with some users like this one
https://www.toutletempslaniaque.net/wxtempdetail.php
  the update is done normally I do not understand why would you have an idea
thank you, have a nice day
hello here is the link of my station with the weatherwunderground colored table program
https://www.meteolimoux.fr/
https://meteolimoux.fr/wsreports/startReports.php?lang=fr
I also transfer the subject on this forum
hello here is the link of my station with the weatherwunderground colored table program
https://www.meteolimoux.fr/
https://meteolimoux.fr/wsreports/startReports.php?lang=fr
bye
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on January 02, 2021, 09:31:06 AM
hello everyone and happy new year above all
I noticed that since December 31, 2020 the colored table wunderground does not update any more, on the other hand with some users like this one
https://www.toutletempslaniaque.net/wxtempdetail.php
  the update is done normally I do not understand why would you have an idea
thank you, have a nice day
hello here is the link of my station with the weatherwunderground colored table program
https://www.meteolimoux.fr/
https://meteolimoux.fr/wsreports/startReports.php?lang=fr
I also transfer the subject on this forum
hello here is the link of my station with the weatherwunderground colored table program
https://www.meteolimoux.fr/
https://meteolimoux.fr/wsreports/startReports.php?lang=fr
bye

PLEASE read my answer to your previous post. https://www.wxforum.net/index.php?topic=41109.msg421532#msg421532

The website you refer to https://www.toutletempslaniaque.net/wxtempdetail.php
is NOT using a Leuven script and it is NOT using the same source of the DATA
You are comparing apples to oranges, it is 100% different
French vous comparez des pommes à des oranges

Could you please be a little patient.
Not all data-sets are available on WU after midnight.
A lot of sites using this Leuven script already display the first day of data.  Some not yet.
The scripts try to refresh  twice / day  as not to overload the server  / API key.

But there are 24  timezones and nobody really knows when historical data comes available.





Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: lacouste on January 02, 2021, 11:52:19 AM
hello yes indeed in your first message on the forum I understood that the link of the station which uses the program in question had nothing to do with your script but I just made a copy / paste of the same message on l 'other forum. after January 1, I am in a hurry I agree with you but I was worried to see that January 31, 2020 had not been taken into account. so i will wait and watch it all.
I assure you that apple are apple \:D/ \:D/ \:D/I'm joking
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: Eric971 on January 03, 2021, 03:20:51 AM
Could you please be a little patient.
Not all data-sets are available on WU after midnight.
A lot of sites using this Leuven script already display the first day of data.  Some not yet.
The scripts try to refresh  twice / day  as not to overload the server  / API key.

But there are 24  timezones and nobody really knows when historical data comes available.

It could even last several days, but it finally appears.

But this time, it remains a strange problem. It is updated for the first days of January,  but the four last days of 2020 remain empty.

http://www.chevrerie-du-cap.com/meteo/reports/ (http://www.chevrerie-du-cap.com/meteo/reports/)

Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on January 03, 2021, 03:32:54 AM
Could you please be a little patient.
Not all data-sets are available on WU after midnight.
A lot of sites using this Leuven script already display the first day of data.  Some not yet.
The scripts try to refresh  twice / day  as not to overload the server  / API key.

But there are 24  timezones and nobody really knows when historical data comes available.

It could even last several days, but it finally appears.

But this time, it remains a strange problem. It is updated for the first days of January,  but the three last days of 2020 remain empty.

http://www.chevrerie-du-cap.com/meteo/reports/ (http://www.chevrerie-du-cap.com/meteo/reports/)

These scripts are still based on the old .csv format.
And yes, the last day of the previous year was left out some years ago, after the discussion of the bogus/error-values in the end-of-year roll-over with the old wu-databases.

I assume there are other scripts with even better layouts and less "strange problems"
Please find them and post the links here. I can then put this script to its EOL-coffin.

The truth is, the motivation and the free time to maintain and enhance these complex donation-ware scripts is linear equivalent to the "nill"-support the author gets from the users of the script.

Wim
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: lacouste on January 03, 2021, 04:43:01 AM
hello wim i just looked at everything is ok for me this morning the values are well displayed all is good. it is just missing on 12/31/2020 but I had the same thing on July 3 of the same year but hey, it's not a big deal in view of the well-filled table some missing values are not very serious for me I love this script. since using it I have pretty much filled out everything. I hope you will be able to leave this script active and in no way the remarks and the information which I share with you are reproaches or admonitions or criticisms. good day to you wim
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: heersje on March 07, 2021, 06:05:03 AM
I would like to raise a new issue and that is combining historic data from 2 wunderground stations. I moved last summer about 1.5 km and, maybe naively, created a new station under wunderground. My old station IVOSSEM2 and my new station ITERVU1. This results of course in a break in my WU history and therefore in the coloured table in the Leuven template (https://weer.heerschap.net/). The quick fix I try is renaming all my old files in the cache from IVOSSEM2-year-2020.txt to ITERVU1-year-2020.txt etc and changing the my_settings.php file to ITERVU1 but having an earlier starting date to ensure earlier years are selectable. The latter does not seem to work but the data for 2020 does come up (not in the 2nd half of the year but that is as  I had not changed the station name in my_settings.php after moving the station).  Renaming caches files seems too simple to be true or isn't it?

kind regards Jean-Paul 
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on March 07, 2021, 06:29:40 AM
I would like to raise a new issue and that is combining historic data from 2 wunderground stations. I moved last summer about 1.5 km and, maybe naively, created a new station under wunderground. My old station IVOSSEM2 and my new station ITERVU1. This results of course in a break in my WU history and therefore in the coloured table in the Leuven template (https://weer.heerschap.net/). The quick fix I try is renaming all my old files in the cache from IVOSSEM2-year-2020.txt to ITERVU1-year-2020.txt etc and changing the my_settings.php file to ITERVU1 but having an earlier starting date to ensure earlier years are selectable. The latter does not seem to work but the data for 2020 does come up (not in the 2nd half of the year but that is as  I had not changed the station name in my_settings.php after moving the station).  Renaming caches files seems too simple to be true or isn't it?

kind regards Jean-Paul

It is not trivial, and it was not designed this way.
All data of the stations is in ./wudata/  in the arrays.
https://weer.heerschap.net/weather28/wudata/
Backup that folder and save on your PC.

You could rename and combine those arrays => used for period data.
Rename all IVOSSEMmetric arrays to the new name.
The problem with 2020 first half year IVOSSEM and second half ITERVU1 is far more difficult. I will think how to do that.

But the detailed data / day in history can not be solved that way.
That data is dynamically loaded.

Maybe the best solution is to have one extra set of scripts for the "old" WU-ID using an override of the settings.
And the normal set of scripts for the new WU-ID

Wim
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: heersje on March 07, 2021, 07:01:14 AM
Dear Wim,

many thanks for that super rapid response. It is not a problem for me not to have the dynamic day details but would like to have the colourful annual overviews as they provide great insight in how the weather developed in the year.
So I downloaded the folder to my computer and renamed the arr files from IVOSSEM to ITERV except for 2020 in the wudata folder on the server. It does not have an immediate effect but I suppose the cache needs to be updated at one point. (or do I need to run a script?)

I do have all that missing 2020 data in MySQL and in fact I also imported it now in my new Meteobridge NanoSD. I know nothing about json but it may be possible to do an extraction of data in the right format. After all it is a text file the array so cut and past the new data in the existing IVOSSEM2-2020.arr may work?     

keeping fingers crossed!
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: wvdkuil on March 07, 2021, 07:16:36 AM
Dear Wim,

many thanks for that super rapid response. It is not a problem for me not to have the dynamic day details but would like to have the colourful annual overviews as they provide great insight in how the weather developed in the year.
So I downloaded the folder to my computer and renamed the arr files from IVOSSEM to ITERV except for 2020 in the wudata folder on the server. It does not have an immediate effect but I suppose the cache needs to be updated at one point. (or do I need to run a script?)

I do have all that missing 2020 data in MySQL and in fact I also imported it now in my new Meteobridge NanoSD. I know nothing about json but it may be possible to do an extraction of data in the right format. After all it is a text file the array so cut and past the new data in the existing IVOSSEM2-2020.arr may work?     

keeping fingers crossed!

You have to delete all previous years cached .txt files also. From the wudata/ folder and from the cache/ folder.
It is a big task.

Wim
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: heersje on March 07, 2021, 09:44:33 AM
Thanks Wim,

so I saved the text files in cache and wudata folder on my computer and subsequently deleted all of them on the server. Now I get all the days for ITERVU1 for the 2nd half of 2020 which was not visible before, However no previous years are loaded and also the first half collected as IVOSSEM2 is missing. Copying pasting that part in the cache/ITERVU1-2020.txt file shows the full year  in the color overview(minus my removal and some date no WU data may have been stored), I am not sure if that cache file once created will remain untouched. (otherwise I could try to merge the data in the 2 arr files I now have for 2020)

However, I cannot select 2019 and before from the dropdown selecter on the colour page. I left the *.arr files for those years in the wudata folder (renamed to ITERVU1xxxx) and I set my_settings.php to start from Dec 2016 but they are not taken into account.

Am I overlooking something or do I need to go to plan B?
Quote
Maybe the best solution is to have one extra set of scripts for the "old" WU-ID using an override of the settings.
I would probably address that by studying how the weather in color page extracts data from the cache and then hard code it for 2019 and before in another page using the save text files I have with the data.
I hope there is a more simple solution
Title: Re: Support of "Leuven" WeatherUnderground scripts
Post by: pimohdaimaoh on January 15, 2022, 08:57:45 PM
Thanks Wim,


Sorry for posting on a wrong thread yesterday.

anyways Its working now, I forgot to change:

for ($i = $firstYear; $i <= $lastYear; $i++) {
   $fileNames[]   = $wuData.$SITE['wuID'].'-year-'.$i.'.txt';   // IVLAAMSG47-year-2014.txt
   $wuURLs[]   = 'http://your_site_name_here/WXDailyHistory.php?ID='.$SITE['wuID'].'&month=01&day=01&year='.$i.'&format=1&graphspan=year';
}

to

$wuURLs[]   = 'http://www.pimohweather.com/WXDailyHistory.php?ID='.$SITE['wuID'].'&month=01&day=01&year='.$i.'&format=1&graphspan=year';


that is why it keeps showing errors, after changing it, it refreshes all arrays and normally shown now to my page

Regards


-Mike-