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

One can translate as one wants.
|FIRST SETUP|INSTELLINGEN|
of
|FIRST SETUP|Instellingen|
But it would be better to be more consistent, :oops:
I prefer lowercase as it reads easier. So I changed the language file for Dutch to have lowercase entries in the menu.
Wim

Should this code snippet be inserted into w34_index.php?

No this is strictly BETA.
In the beta/April release I moved the images from index.php and the frames.php to the settings. So that we can add and change it at one place without changing at multiple others.

Wim

w34_cron_stationcron.php is not executed. I can run it manually using _test.php?test=w34_cron_stationcron.php.

  1. [li]What is the URL?
    PLEASE understand that you are not the only one using these scripts and I have to support my own scripts also on four forums in multiple languages. I am not clairvoyant and can not remember every individual request[/li]
    [li]As you state that the cron-job runs from the browser, there seems to be no problem with the cronjob itself.
    So please tell me what your problem is.[/li]
    [li]Adding _test.php only adds the display of all debug info.
    Do not use that when running a job from WeatherDisplay or whatever cron-server-program you are using.
    Cron servers do not like to get large blobs of data from the jobs they start.[/li]
  2. http://wd34.weather-template.com/documentation/WDapi-stationcron-2019-01.pdf

Wim

Thank you!
Sorry to Wim that I forgot to include url :frowning:

My problem is that cron job is not executed.
I use WeeWX. WDapi is not possible with current setup.
http://weather.meisal.com

Cronjobs are started from somewhere else and only executed on your weather34/ website.
WeatherPrograms such as WeatherDisplay or Meteobridge are able to function as a cron-server themselves.
Small linux computers such as RaspBerry have built in cron-servers also.

Or you can use a free (or almost free) con-provider.
There are multiple discussions on the weather-fora about which providers can be used.
Sometimes your website provider has a free cron service also.
Some of the names I got when using Google Free cronjobs - from minutely to once a year. - cron-job.org https://www.cronjob.de/ https://www.setcron.com/

But this topic/discussion is not the right place and by hiding it here in this topic you will get far less answers than starting a topic such as" Which (free) cronjob server should I use?"

Wim

This states why the script is not executed when not using programs like WeatherDisplay.
It was not very clear anywhere that I need to create a cron job myself. At least could not find it anywhere.
With this knowledge I’m able to move forward.
Thank’s again for helping!

Ended up defining this cron task:
*/1 * * * * /usr/bin/php -q /home/weather/public_html/w34_cron_stationcron.php

I verified it is running once every minute and updates MYSQL db and csv file as expected

I assume I will also need two additional jobs running w34_cron_addtoyear.php and w34_cron_empty.php.
Correct?

  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