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

  1. You should only use the SQL table if you do not upload to WeatherUnderground. The data from WeatherUnderground is more extensive (more fields) and can be used for other fine scripts also.
  2. Only if you do not upload to WU you need the 5 minutes before midnight en 5 minutes after midnight cron-jobs also.

Wim

Confirming that I do not upload to WeatherUnderground.
I should be good to go then.
G400

Yes, you need the two other cron-jobs also. Wim

I updated to your new template Wim today
good job Wim
was relatively easy :slight_smile:

I do see one error, might be that my php version 5.5.38 is a bit below minimum, and that is the moon phase script
http://weather-display.com/pwsWD/

Fatal error: Class ‘Moon’ not found in /homepages/22/d75034112/htdocs/weather-display/english/pwsWD/moon_block.php on line 42

I also see Overwegend bewolkt in the current conditions ( I set to use clientraw for that)
:slight_smile:

Another Metar problem in production version: is this related to the one posted on the beta site or is it CheckWX again?

P.S. Same error on the 2220Z Metar.


I got the following on my production site http://www.hc-iom.co.uk/pwsWD/index.php
metar popup gave error 500 in IE11 and
PHP Notice: Undefined index: name in E:\xxxxxxx\x\hc-iom.co.uk-xxxxxxxxxx\xxxx\htdocs\pwsWD\metar_load_funct.php on line 61
PHP Notice: Undefined offset: 1 in E:\xxxxxxx\x\hc-iom.co.uk-xxxxxxxxxx\xxxx\htdocs\pwsWD\metar_popup.php on line 286
PHP Notice: Undefined offset: 1 in E:\xxxxxxx\x\hc-iom.co.uk-xxxxxxxxxx\xxxx\htdocs\pwsWD\metar_popup.php on line 288

in MS edge
this is the text from the metar34 file
{“results”:1,“data”:[{“wind”:{“degrees”:240,“speed_kts”:16,“speed_mph”:18,“speed_mps”:8},“temperature”:{“celsius”:6,“fahrenheit”:43},“dewpoint”:{“celsius”:2,“fahrenheit”:36},“humidity”:{“percent”:76},“barometer”:{“mb”:992.92,“hg”:29.32,“kpa”:99.29},“visibility”:{“miles”:“Greater than 6”,“miles_float”:6.21,“meters”:“10,000+”,“meters_float”:10000},“ceiling”:{“code”:“BKN”,“text”:“Broken”,“feet_agl”:2000,“meters_agl”:609.6},“elevation”:{“feet”:55.77,“meters”:17},“location”:{“coordinates”:[-4.62389,54.083302],“type”:“Point”},“icao”:“EGNS”,“observed”:“2019-03-04T21:50:00.000Z”,“raw_text”:“EGNS 042150Z 24016KT 210V270 9999 BKN020 06/02 Q0993”,“clouds”:[{“code”:“BKN”,“text”:“Broken”,“base_feet_agl”:2000,“base_meters_agl”:2000}],“flight_category”:“MVFR”}]}

looks like things have altered again, I think CheckWX need to get there act together

I’m getting that error too in Firefox and Edge.

http://ucweather.org/pwsWD/

@ALL
The format of the JSON file from the METAR provider has changed again.
Sorry, this should not have been visible for the production version. But because I knew that not all errors are removed I left full debugging code switched on. Therefor we get those errors. As I am “off the grid” for at least 3 weeks after tomorrow I have very little time left to find a solution.

FOR NOW: Start easyweather and select nearly at the bottom at the question
“Where do we get our current conditions from?” => “Use Darksky for current conditions (needs API key).”
That way your main window will not load the METAR scripts.
And do not use the “nearby” pop-up for now until i have had a chance to find out why they removed the airport name and others from the .JSON

Wim

my issue has been resolved, thanks Wim
for some reason the others folder had not been uploaded /expanded with the other folders via the WS_FTP program
so I just had to upload that folder

In your setup, the information for the “currentconditon block” comes partly from WD-clientraw (icon / text).
The rest comes from the 1 hour forecast from DarkSky

So you probably selected for DarkSky the language: “Dutch” .
A beautifull language understood in the Netherlands, Flanders (Belgium) and a few municipalities at the upper north-west of France. But it is at no use in NZ.

If you select English the forecast block and the 1 hour forecast will all be English.
But you have to wait an hour to see the changes as the forecasts are cached to stay within the limits for your DarkSky API.

Wim

METAR CHANGES for pwsWD

As other users already discovered, the layout changed again.

[ol]
[li]The airport-name is not available anymore / for now??.[/li]
[li]The date/time field layout changed from:
old: 01-03-2019 @ 07:20Z"
new: 2019-03-05T05:55:00.000Z[/li][/ol]

I attach a zip with the two changed scripts for the pwsWD users.

The updates for the beta will be posted in the other topic.

Wim


pwsWD.zip (11.7 KB)

Hi, Wim

Replaced the two files, works like a charm now!

Staccermaccer,


The cronjob has two tasks.

[ol]
[li]Loading all external files[/li]
[li]Generating one line in the daily CSV and the SQL table[/li][/ol]

I think you are running the cron-job far to fast. Once every 5 minutes is OK.
For the external files, such as forecasts, METAR a.s.o. the cache time is (far) more than 5 minutes.
The cron-job has to check every file for its last file-modified-time and load the file when it is above 80% of the allowed age.

The graphs .csv files for today (result.csv) will accept 1 minute values, but the graphs itself has not that much room to display all those values.

And every day all those values in your sql-table are discarded also and replaced with a single line in your monthly/yearly .csv file which will be only used to display those graphs.

There is no advantage in accessing an external hosted web-server every minute 24/7 for the graphs-weather-data.
And some web-hosting companies may think that it looks like a DDOS attack and block the IP-address.

Wim


I got that conditions and darksky fixed
the Dutch forecast was default in the drop down on initial setup…but I had not noticed that…I selected English :wink:

Working okay here now. Thanks, Wim.

I e-mailed CheckWX support, and they say:

“In the decoded METAR the ‘name’ is now referenced as ‘station.name’ as ‘name’ was ambiguous.
All datetimes are now in proper ISODate format as other users complained they were not consistent.”

I have reduced to every 5 minutes.

I see from crontab log file (I’m piping the output to a separate log file) that w34_cron_addtoyear.php is throwing error message: “Couldn not write headers to chartsmysql/2019_03.csv”
The strange thing is that data is written to file (2019_03.csv is attached).
Scheduled crontab jobs running w34_cron_empty.php and w34_cron_stationcron.php with the same user does work
http://weather.meisal.com


2019_03.zip (321 Bytes)

Happening with both prod and beta versions…always sucks having to rely on someone else for data and they make changes…


Mine just comes up blank. http://ucweather.org/pwsWD/

https://earthquake-report.com/ gives Error 503, no server is available to service this request

Update: it’s working again this evening!