HWS-template (WD34) beta test July version

Ooops. sorry, I missed that one :oops:

New version of the wxsim script attached
Wim


forecastWXSIMblock.php.zip (2.36 KB)

It appears to have fixed the problem.

Thank you

It appears that my max/min wind gust is not working in the small display on top. 12:58 has not come yet today :slight_smile:

http://southernctwx.com/WX/index.php

Just started working…disregard!

The current conditions block has a line of untranslated text - to English:


pwsTest.JPG

Is this your HWS site: http://www.m82a1.us/pwsWD/ ?
Check the setting for the language of the DarkSky forecast. You can have that set to a different, often more local, language.
It is set to Dutch (Netherlands), should be your English.

http://www.m82a1.us/pwsWD/_test.php?test=forecastDSdaily_popup.php

===

If the language is set correctly the cached file is still valid for about an hour.
Then the next load of the Darksky forecast will remove the dutch file.

Wim

@ALL Please always post the URL to the site. Especially if you have multiple versions

Sorry, Wim. That’s the April version.

Here’s the July version: https://www.m82a1.us/pwstestWD/index.php

Even though I didn’t think I was using DarkSky, after I entered the API, the language translation worked.

Also, when using the Google Chrome browser, the menu link in the header doesn’t show. It’s fine on the April version. And it works fine in my Pale Moon browser.

Thanks

The current conditions block displays also a one-hour “forecast”. And WD does not supply that info.

Also, when using the Google Chrome browser, the menu link in the header doesn't show. It's fine on the April version. And it works fine in my Pale Moon browser. Thanks
I could not replicate that problem with my Chrome browser. See attached screenshot === In some browsers your webcam image is not shown as the link http://182.168.1.65:82/?_1559896445 should be https also.
Mixed Content: The page at 'https://www.m82a1.us/pwstestWD/index.php' was loaded over HTTPS, 
but requested an insecure image 'http://182.168.1.65:82/?_1559896445'. 
This content should also be served over HTTPS.

Wim


Hi,

Also did the upgrade to the beta version.
I do not see the option to refresh the data every xx seconds. (Nice for wind,uv,solar)

Also the metarbox is setup good, but on click nearby it gives “EBBR Brussels” and in the same windowbox earthquacke.

Without the URL to your website there is not much I can do to inspect those things.

Be aware that you use a beta version. The whole purpose of a beta program is to find remaining errors.
Do not use this version for production as in a few weeks the official release version will be available.

All blocks have different refresh-times. Those times are set in w34_blocks.php. Example

$script = 'temp_c_block.php';
$blck_ttls[$script]     = lang('Temperature').' °'.$weather['temp_units'];
$blck_rfrs[$script]     = 110; 

The temperature block is refreshed every 110 seconds.

===

The nearby metar airport code is set in easyweather-setup. You need also to set the API key for that nearly at the bottom.

Wim

I figured out the missing ‘Menu - Settings’ in the header.

I have an add-on that displays current selected stocks at the top of Chrome pages. It pushes down the page. In the April version, the pwsWD header is below the ticker bar. In the July release, while the page is pushed below the ticker bar, the ‘Menu - Settings’ links remain under the ticker bar. Here’s with/without the ticker bar.

pwsWD: https://www.m82a1.us/pwstestWD/index.php


I have no fast solution for that.
All 1276 lines of the page are correctly contained in the < body > tags
No html errors: https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.m82a1.us%2FpwstestWD%2Findex.php

To test and see what is happening, I need to know what add-on you are using.

Wim

Wim, just curious…

Why would my WXSIM forecast indicates that it is ‘Offline’ - the WXSIM forecasts are automatically produced every six (6) hours, thus, there is no reason for showing the WXSIM forecast as being offline.

Temporary web link: Tzouhalem-Maple Bay Weather

I think that will be related to “$filemtime == == Wed, 31 Dec 1969 16:00:00 -0800”, in other words it isn’t correctly reading the timestamp of the file.

“Niko hit the nail on the top”

If you run http://24.108.124.18/weather34WDbeta/w34_module_test.php
And select middle top-row => forecastWXSIMblock.php => click “Test-it” the message reads:

Warning: filemtime() [function.filemtime.html: stat failed for ../plaintext.txt in E:\htdocs\weather34WDbeta\w34_util_wxsim.php on line 41

The script can not get the filemtime = last-modified-time of the file.
This filemtime check is there so that we do not run the plaintext-parser.php multiple times when there is no new file during its 6 hour life.

The first thought, maybe windows using "" and the file starts with “…/” ??.
Second thought: running Kens script directly http://24.108.124.18/weather34WDbeta/wxsimPP/plaintext-parser.php the correct date time is found.
That date time is coming from the plaintext.txt file

But I can not access that file to check, all links do not work
http://tzwd34beta.ddns.net/../plaintext.txt
http://24.108.124.18/weather34WDbeta/../plaintext.txt
Have to study this. Problem is I do not have a windows website-server available. Will take some time.

Wim

Adapted script to test with in next post!

OK, can you test this version?
It will use the date-time from the plaintext-file as parsed by Ken’s script, only if the stat fails.

===
I also found the culprit, your plaintext.txt is on a other location then expected

$plaintextFile = '../../wxsim/plaintext.txt';       // location of the WXSIM plaintext.txt

Normally the file is in the webservers root.
That is why the file-name-location in the parser is “…/…/plaintext.txt”
And in the other scripts “…/plaintext.txt”

Change line 22 in w34_util_wxsim.php from

$plaintextFile  = '../plaintext.txt'; 

to

$plaintextFile  = '../wxsim/plaintext.txt';

Will add it to the documentation
Wim


w34_util_wxsim.php.zip (3.42 KB)

The author just released an update where sites could be blacklisted - so I now don’t have it display on my m82a1.us sites.

It’s strange that April and July menus are different…


Not strange at all, the original release contained hundreds of html “notices” / problems.
I removed them all, but had to rewrite 90% of the code.

I can probably change the code in such a way that you do not have to blacklist the template. I already changed the code, but need the extension to test with.

But that is for ‘one fo these days’ later next week.
Tomorrow it is “conformation” day for the grand children, to important for them and for me to miss that large family gathering.

Wim

Hi Wim,

I see a problem with weather alerts.
It shows the distance of a discharge (Nexstorm).
Instead of 1509 km he gives an alarm because of a thunderstorm at 1,509 km.
See red blocks.

https://www.weerstation-assen.nl/actueel-weer2.php

Edit: After refresh alarm message is gone. See picture how it looked.

Furthermore, it looks great. Many thanks!

Brgds,
Oebel


Can you please PM me the link to the NSRealtime.txt file you are using? Then I can test / check.

The comma in the distance is a number_format error, I will check that.
The alert is always given if the “lightningtimeago” is less then 500 seconds.
Both the WeatherFlow or Boltek are used for that. Boltek has priority if both devices are available.

Wim