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

It looked similar to the problem I reported in Reply #138 above (***closed*** weather34 for WeatherDisplay (clientraw and WDapi) - #139 by bitsostring - PWS Dashboard 2012 - Weather-Watch Forum).

Hi Wim,
Thank you for the hint. I will try to shorten the

[quote author=zitterbacke link=topic=67468.msg543436#msg543436 date=1549910227]
to modify the

Hi bitsostring,
Thanks for that hint, but I think I already have that version.

In my monthly temp popup, the “Low” text isn’t written correctly. Which script is this and can I fix this?


You can modify it in the language file.

check here: ***closed*** weather34 for WeatherDisplay (clientraw and WDapi) - #139 by bitsostring - PWS Dashboard 2012 - Weather-Watch Forum
Wim

Thanks Wim. One other questions. I am getting way more bandwidth than I used to now that I am using W34 template. In WD, I have upload frequency set to every 5 min and station cron every 10min. I don’t get that many visitors to my website, so wasn’t sure I should be expecting this much bandwidth


IMHO an outsider like me can not know if it is high or low. And neither what is causing the “way more” bandwidth.
Be aware that when posting questions on a forum, people tend to take a look as that is the only way to help. These questions are not private 1-1 conversations but public “cries” for help.
First: Were you already running a previous version of weather34?
To at least check what is going on, I need to have the URL’s to both your previous weather34 and the current HWS-template as it is called now.
Second: If this is your first “dynamic” website:
All versions of this template are continuously refreshing the data at the browsers of the visitor. Some parts every so many seconds, others every so many minutes. Those are not large chunks of data, but it adds up when using 24/7 an iPad as a console.
Also the scripts refresh “too old” forecasts, metars, and other data files like earthquakes. Normally that will be done when the cron-job runs. But these files can be larger. You have to inspect the …/pwsWD/jsondata/ folder for files reloaded today. And check how old they are.
All files have a different validity time, a forecast once every hour, a current condition file every run of the cron-job.

Wim

Wim,
Tried your latest Beta that includes wxsim.
I have noticed a couple of small problems.

  1. the Wx Alerts seem to work (NOAA) but I cannot seem to close the detail page. I guess its missing a “close” box.
  2. In the wxsim detail page, the precipitation amount in Imperial (US) is not picking up leading decimal. (ie shows 5in instead of 0.5in; 75in instead of 0.75in)
  3. In the same detail page (or maybe the main also?) there are no UV icons.

I had been using the last Beta from Brian with wxsim since the beginning and this is a welcome update. Thanks
s-p.me/wxsim

One has to click on the home button for that.

2) In the wxsim detail page, the precipitation amount in Imperial (US) is not picking up leading decimal. (ie shows 5in instead of 0.5in; 75in instead of 0.75in)
Can not check here (no rain this full week) and no URL to your test-site
3) In the same detail page (or maybe the main also?) there are no UV icons.
Already solved at: http://release230/pwsTEST/index.php Problem is that the icons are 00 - 013 and not 0 - 13? Is adapted in the scripts
I had been using the last Beta from Brian with wxsim since the beginning and this is a welcome update. Thanks
s-p.me/wxsim
As most script writers I am not clairvoyant. If you want to help with the beta release, please always supply an URL to the website.

Also check, if possible, if the problem is already solved at http://wd34.weather-template.com/pwsTEST/

Wim

Wim,
Thank you for your response. the site is: s-p.me/wxsim (shown on my post)
Another small item is the wunit (wind speed unit) in the detailed wxsim is not following the setting (Imperial) while it is in the main wxsim page.
You can see an example of the rain forecast decimal issue on the wxsim also (yes we do have some little rain).
The beta that I am using was downloaded on the 10 of this month.

Can you please unzip and replace attached script?
After a fresh upload of plaintext.txt it should show the UV ICON, the decimal-point in the rain values and the windunit.
All units are the ones from the plaintext file. The WXSIM units are not recalculated when switching from imperial to ISO units or vice-versa.
Wim


WXSIM-BETA.zip (7.47 KB)

I notice that the Menu in all versions still says “SELECT LANGAUGE” instead of “SELECT LANGUAGE”.

I couldn’t work out how to correct this in the language file, as you suggested in #78 above, I just edited line 137 of w34_menu.php

As most English language words/word-groups do not have to be translated there is no new translation-file for en.
The old structure is used in . . /languages/lang.en.php
You should remove the typo by adding this to the end of the file:

$lang['Select langauge'] = 'Select language';

In all other language files (f.i. Dutch) it is

 |Select langauge|Selecteer een taal|

On the left always the words from the scripts, on the right the translation.

Typing errors for the English words should be handled by the language files.
If you changes texts in the scripts as you did, the language files for the other languages will not find the correctly spelled words.

Wim

Thanks, Wim. I obviously didn’t read your earlier instructions properly. . . all OK now.

Wim,
Thanks, that did it. Great work.

Hi Wim,

Just installed your BETA test code that includes Cumulus support.

You can see my site here… http://weather.skybase.net/pwsTEST/index.php

Everything is working except for METAR retrieval. Clicking on Current conditions → “Nearby” produces the errors below …


Warning: Illegal string offset 'observed' in /var/www/html/pwsTEST/metar_load_funct.php on line 50

Warning: Illegal string offset 'raw_text' in /var/www/html/pwsTEST/metar_load_funct.php on line 51

Warning: Illegal string offset 'icao' in /var/www/html/pwsTEST/metar_load_funct.php on line 52

Warning: Illegal string offset 'name' in /var/www/html/pwsTEST/metar_load_funct.php on line 53

Warning: Illegal string offset 'barometer' in /var/www/html/pwsTEST/metar_load_funct.php on line 54

Warning: Illegal string offset 'hg' in /var/www/html/pwsTEST/metar_load_funct.php on line 54

Warning: Illegal string offset 'barometer' in /var/www/html/pwsTEST/metar_load_funct.php on line 55

Warning: Illegal string offset 'mb' in /var/www/html/pwsTEST/metar_load_funct.php on line 55

Warning: array_key_exists() expects parameter 2 to be array, string given in /var/www/html/pwsTEST/metar_load_funct.php on line 78

Warning: Illegal string offset 'clouds' in /var/www/html/pwsTEST/metar_load_funct.php on line 88

Warning: Illegal string offset 'code' in /var/www/html/pwsTEST/metar_load_funct.php on line 88

Warning: Illegal string offset 'clouds' in /var/www/html/pwsTEST/metar_load_funct.php on line 89

Warning: Illegal string offset 'text' in /var/www/html/pwsTEST/metar_load_funct.php on line 89

Warning: Illegal string offset 'dewpoint' in /var/www/html/pwsTEST/metar_load_funct.php on line 91

Warning: Illegal string offset 'celsius' in /var/www/html/pwsTEST/metar_load_funct.php on line 91

Warning: Illegal string offset 'dewpoint' in /var/www/html/pwsTEST/metar_load_funct.php on line 92

Warning: Illegal string offset 'fahrenheit' in /var/www/html/pwsTEST/metar_load_funct.php on line 92

Warning: Illegal string offset 'temperature' in /var/www/html/pwsTEST/metar_load_funct.php on line 93

Warning: Illegal string offset 'celsius' in /var/www/html/pwsTEST/metar_load_funct.php on line 93

Warning: Illegal string offset 'temperature' in /var/www/html/pwsTEST/metar_load_funct.php on line 94

Warning: Illegal string offset 'fahrenheit' in /var/www/html/pwsTEST/metar_load_funct.php on line 94

Warning: Illegal string offset 'humidity_percent' in /var/www/html/pwsTEST/metar_load_funct.php on line 95

Warning: Illegal string offset 'visibility' in /var/www/html/pwsTEST/metar_load_funct.php on line 96

Warning: Illegal string offset 'meters' in /var/www/html/pwsTEST/metar_load_funct.php on line 96

Warning: Illegal string offset 'wind' in /var/www/html/pwsTEST/metar_load_funct.php on line 97

Warning: Illegal string offset 'degrees' in /var/www/html/pwsTEST/metar_load_funct.php on line 97
Y

The data retrieved for your airport

{"results":1,"data":["YRSI Invalid Station ICAO"]}

You entered at question "Enter your nearest airport code (XXXX) . . . " an invalid code YRSI
That airport does not exist: List of airports by ICAO code: Y - Wikipedia

Wim

Doh!
I had a dyslexic moment, it should be YSRI. :oops:

I looked at that maybe ten times and didn’t see the problem :x

thanks

Tim