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

@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!

Is there a reason my template is not auto refreshing like it used to? I’ve got it displayed on a fire tablet.
http://weather911.net/pwsWD/index.php

Sent from my Pixel 2 using Tapatalk

Sent from my Pixel 2 using Tapatalk

It works OK and refreshes OK in Chrome on my Mac.
As I have no access to a "fire tablet"I can not furthere test that.
Wim

But not picking up the metar station name in production? (It’s OK in beta.)


How can I change the update frequency when reading data from Cumulus type realtime.txt?
Currently it seems to be updating about once every minute.
Data are updated every 3-4s in realtime.txt.

I put it in on the todo list.
For now I Will be home on wendnesday night (CET) and first task is to finalize the April release.

Be aware that there are multiple independent reads of realtime data every minute, depending on the data-type.
F.I. Wind is requested faster as temp.
And your web server should be able to cope with all these requests.

I propose a factor, 1 = default speed, 2 = twice as fast, a.s.o.
Wim

Very good! I agree April release should be #1 priority

My suggestions:
Wind - default = 1/30s, 2 = 1/15s, 3 = 1/5s
Temp - default = 1/60s, 2 = 1/30s, 3 = probably not needed
Rain - default = 1/60s, 2 = 1/30s, 3 = 1/5s (nice to have during heavy rain)

My web server should not have any issues with this extra load.
G400

The orange arc corresponding to Luminance % is not easily visible in production moon block, dark theme.

(I’m not running beta, and the beta demo site is not showing the moon block, so I can’t check if it is different in beta.)


moon.png