***closed*** weather34 for WeatherDisplay (clientraw and WDapi)

It seems that you r website is not allowed to access files outside your server.
The scripts to load files from outside your server all time-out.
The sun script fails as a PHP function is not defined, first time I see that

Fatal error: Call to undefined function gregoriantojd() in /web/maui/swanston/htdocs/pwsWD/sun_block.php on line 7

It is a standard PHP function for versions 4 to 7.2 but the provider should enable that (most do)
http://php.net/manual/en/calendar.installation.php

To get these functions to work, you have to compile PHP with --enable-calendar .
Wim

Thanks, Wim, I’ll pass that on when I ask about access to outside files. Does this lack of access explain the lack of pop-up d/m/y graphs?

If so, I’ll ask my provider about that too, because the graphs on my old W34 version (at /pws, not /pwsWD) have recently stopped working as well.

The scripts at pws/ work OK.The year 2019 just started so there is not that much data. Those scripts probably used “filegetcontents” to load the data

pwsWD/ has no data at all, uses CURL to get the data.

So ask your provider what the problem with CURL is? Maybe it has to be enabled for you?

Wim

Please mail me a zip of the Spanish language file. And I will add it for others.

Wim

Great work and thanks for script at a begining of New year!
This is my page http://vreme.in.rs/knjazevac/pwsWD/
I have a problem to set Metar data from LYNI in Serbia. I set LYNI in EasyweatherSetup for WD but on main page I have data from EBBR Brussels.
I set Dark sky forecast and in main page work fine but in Extras Dark Sky forecast show for Leuven-Sluispark.
And one more question. Is there a (wide)16:9 version?

Very nice Wim…excellent work…

translated Spanish

http://www.meteotorrelavega.com/pwsWD/index.php?lang=sp

Thanks Wim, that did the trick

John

Wind run from clientraw [173] should not be converted from kts to m/s or km/h.
This data show “daily wind run (km)”

OK, I was told that all wind measurements in the clientraw are in kts and assumed the same for windrun.
Should have checked that one as it is undefined (numeric) in my own clientraw checker
I will check with Brian and report back here.

Wim

Can I get an explanation for the data that I rounded up on the picture that I attached?


PWSWD.JPG

The avatar on the left of your posts, points to an invalid website: http://www.knjazevac.co.yu/Meteo/wxindex.php

I checked your previous posts: is this the site you are discussing about: Knjaževac, Istočna Srbija Home Weather Station (wd version) ?
You can check any module and the most recent data form WeatherDisplay as used by the template here
http://vreme.in.rs/knjazevac/pwsWD/w34_module_test.php
Click on “live data values” and they are displayed in the large box below. Those are the “recalculated” values from your upload file = clientraw
If they are uploaded by WDapi there is a button to display the raw WDapi values also

    [wind_direction] => 83
    [wind_direction_avg] => 259

wind_direction comes from clientraw [3]
wind_direction_avg from clientraw [146]

For how the graphs are drawn and on which values they are based, I have to check with BrianUnderdown.

Wim

Sorry for bad link. I change that.

I think that should be

10 minute average wind direction from clientraw [176]

clientraw [146] is “Hr Wind Dir 01” that is data for wind direction 60min ago

You are right. A minor problem is that [176] is available only in recent clientraw files.
I would prefer [117], that contains the same value. I check your clientraw at: Clientraw - Script developers info
I will have to add code to check if [176] exists when using that one.
For now, you can change it in line 143 of w34_livedata.php and i will put the change in the intermediate update.

Thanks for spotting this error,
Wim

I change

$weather["wind_direction_avg"]  = $wd[117];

and

$weather["wind_run"]            = $wd[173];

I think that now work fine :slight_smile:

The line for windrun should be

	$weather["wind_run"]            = convert_speed ($wd[173],'km/h',$to);

It would not translate to miles if a visitor switched to that on your site. Check the demo site
Leuven Home Weather Station (wf version) => 19.9 mi
Leuven Home Weather Station (wf version) => 32 km
Wim

but on Leuven Home Weather Station (wf version) => 9 km

That should be 9 m/s
Thanks for spotting that bug. :oops:
Wim

but can not convert km to m/s. Should be stay

19.9 mi for us
32 km for metric
32 km for scandinavia metric

I tried to use “meter”. Have to find a solution for this , as there is for now no distance setting.Will do that a.s.a.p.

I set Dark sky forecast and in main page work fine but in Extras Dark Sky forecast show for Leuven-Sluispark.
That is an example of "extra pages " in the menu using an iframe. I used one of my own pages for that Explained here: http://wd34.weather-template.com//documentation/WD34-questions.pdf => Menu options => Display Extra links in Menu (default false) The supporting script is w34_frames.php where you setup the links to the extra page(s) you want to use.
And one more question. Is there a (wide)16:9 version?
No, not as far as i know. And as the design is strictly BrianUnderdown (weather34 on this forum) you should ask him. I am available for support of the clientraw/WDapi version.

Wim

Thank you for help!
I set DarkSky and EWN forecast to my town Knjazevac in w34_frames.php :slight_smile: