HWS-template (WD34) July version available

This is caused by a https page (yours) loading a http page (http://weather.gc.ca/warnings/report_e.html?ab12).
The browser needs to get a “do-it” , see attached screenshot.

I will try to find out if there is a script error or otherwise why EC gives us a link with http as the same page is available as https also.
The EC script is loaded from https, but the links in the returned xml are still http.
I changed the script to translate the http link to https, so it should work OK now.

Wim


wrnWarningEC.php.zip (2.81 KB)

[quote author=wvdkuil link=topic=68132.msg548330#msg548330 date=1562701550]
. . . shortened . . .
realtime.txt is defined at: https://cumuluswiki.wxforum.net/a/Realtime.txt
The dates are in a metric order d/m/y and 24 hour times.
The separation between fields is the space character.

Your realtime file
=> http://www.tuley.online/pwsWD2/w34_module_test.php select …/pwsWD/WCT_Realtime.txt in the left bottom selector and click "List contents
=>

09/07/19 13:37:17 87.5 11 26.5 1.0 0 187 0.00 0.00 29.86 187 0 MPH 

---

[w34_livedata.php.zip|attachment](upload://vdxG0YDuDCSuoxf5D1zET80ZKzS.zip) (8.46 KB)

![ampm.jpg|702x190](upload://yZaSv5iPDFk7crh9rDyJoHFweq9.jpeg)

Problem: my July version page (url as left but /pwsnew/) layout is corrupted, but it was OK when I went to bed last night! What should I check?

It is easier to test with a more simple page: http://swanston.maui.co.uk/pwsnew/index.php?frame=test_image
It seems that you tried to move the alert-block to position 4 and in that process both the alert-block and the garden block are now in the same position. There is one missing?

In these cases I need access to the easyweather settings or even better an ftp password/userid.

Wim

Thanks for looking, Wim. I did indeed move the alert block, but it has worked perfectly for the last two days. There is now an alert for the first time, would that change anything?

In these cases I need access to the easyweather settings or even better an ftp password/userid.

PM on its way.

EDIT: I see it works OK if the alerts are put back to position 5.

Yes, but I changed the script so it can cope with it.
position 1-4 are included to speed up loading of the page.
The alertsblock is normally loaded last via jquery_GET in a separate PHP process as it can take considarable time to get the alarms.

There are 4 blocks + 1 special for the alerts. You can put the alerts in another place in w34_index2.php

w34_weather_item ('position1',$position1); include $position1; echo $end_block;
w34_weather_item ('position2',$position2); include $position2; echo $end_block;
if ($extra3used == 'wide') { 
w34_weather_item ('position3',$position3); include $position3; echo $end_block; }
w34_weather_item ('position4',$position4); include $position4; echo $end_block; 
w34_weather_item ('positionlast',$positionlast);/*  include $positionlast; */echo $end_block; 

This works also as used in http://wd34.weather-template.com/pws07/

w34_weather_item ('positionlast',$positionlast);/*  include $positionlast; */echo $end_block; 
w34_weather_item ('position1',$position1); include $position1; echo $end_block;
w34_weather_item ('position2',$position2); include $position2; echo $end_block;
if ($extra3used == 'wide') { 
w34_weather_item ('position3',$position3); include $position3; echo $end_block; }
w34_weather_item ('position4',$position4); include $position4; echo $end_block; 

Better not change the question in easyweather. I will remove the alert-box from easyweather, just to make sure.

Wim


wrnWarningEU.php.zip (13.7 KB)

Thanks, Wim.

position 1-4 are included to speed up loading of the page. The alertsblock is normally loaded [b]last[/b] via jquery_GET in a separate PHP process as it can take considarable time to get the alarms.

I should have known there was a reason. . . sorry.

There are 4 blocks + 1 special for the alerts. You can put the alerts in another place in w34_index2.php

Thanks again :slight_smile:

I don’t seem to be picking up the yellow warning for UK004 any more - even using Menu/Extras/Alerts.

Problem at EU or on your webserver?

<div id="positionlast"><!-- $wrn_lang=en  --><!-- module wrnWarningEU.php = version: 0.00 2019-05-12 -->
<!-- warnings and other info goes here  -->
<!-- 
Severe weatherdata (./jsondata/warningUK004) cache times:
        cache time   = 2019-07-10T14:19:51+01:00 from unix time 1562764791
        current time = 2019-07-10T15:39:44+01:00 from unix time 1562769584 
        difference   = 4793 (seconds)
        diff allowed = 900 (seconds) -->
<!-- Severe weatherdata loaded from http://www.meteoalarm.eu/en_UK/0/0/UK004.html  -->
<!-- ERROR Severe weatherdata empty,(http://www.meteoalarm.eu/en_UK/0/0/UK004.html)  could not be loaded  -->
<!-- upped cachetime from 900 to 1800 as no valid data was retrieved -->
<!-- 
Severe weatherdata (./jsondata/warningUK004) cache times:
        cache time   = 2019-07-10T14:19:51+01:00 from unix time 1562764791
        current time = 2019-07-10T15:40:14+01:00 from unix time 1562769614 
        difference   = 4823 (seconds)
        diff allowed = 1800 (seconds) -->
<!-- ERROR no warnings  retrieved, script ends -->
<!-- ERROR no warnings  retrieved, script ends -->
<!-- $darkskydayIcon=rain -->
<div style="padding: 4px;">
Light rain starting this evening.</div>
</div>

So i added it to my test-site http://wd34.weather-template.com/pws07/ and it displays without delay.

I attach a smal test script to see if it is in the script or in the webserver.
Unzip it and run it like http://swanston.maui.co.uk/test_curl.php
It will retrieve the data in a frame (using your browser) and by using curl on your webserver, I attach a screenshot how it should look.
Wim


test_curl.php.zip (2.2 KB)

Wim, I’m so sorry - I forgot that I need to add CURLOPT_PROXY to the script, as discussed back in April #-o

That was such a long time ago. . . :?

Oh, those good old times, I vaguely remember them,
Have fun,
Wim

I believe you’re correct. I manually edited the data file (realtime.txt), and all values look correct on display.
now to find a way to get WeatherCat to report the times without the space or in 24 hour format.

I’ll continue to look as well…

Thanks!

Ken

I changed the script and tested it with your data, all look OK.
Please check this post HWS-template (WD34) July version available - #113 by pwsdashboard - PWS Dashboard 2012 - Weather-Watch Forum

There are more weather-programs which can do “am pm time” or using a “comma” as a decimal.
So the livedata script will be adapted every time we find something new. But your “am pm”-problem should be gone when you use the livedata from that message.
Please test it,

Wim

Earthquake magnitudes to 2 decimal places are not centred. . .

I’ve replaced $magnitude with round($magnitude,1) in line 144 of earthquake_c_block.php, think that should work.


earthquake.png

Working fine now, and working even better since I changed the timezone in line 47 from Europe/Brussels to Europe/London. Now the alarms come in BST instead of CET :slight_smile:

You got a PM
Wim

YES!!! It works! Thanks for the quick fix… sorry I was delayed in getting it up and running.

Ken

Hello
I have the latest July version running at https://vancamweather.com/pwsWD/
All seems well except the current conditions block.
The sky conditions are current with KPDX metar however, I can’t figure out where the other data
within the block comes from and how to correct it.
Thanks
Larry

That pwsWD is not the July release. Seems to be the April release.
Always do a full install for the new releases, at least until the December release.

All seems well except the current conditions block. The sky conditions are current with KPDX metar however, I can't figure out where the other data within the block comes from and how to correct it. Thanks Larry
The current conditions you selected are from your METAR. The other part of the information comes from [b]the 1 hour DarkSky forecast [/b] As there is no API key the old cached information is shown. And that is in Dutch. Start easyweather-settings. Enter a DarkSky API-key Set the DarkSky language to your language And the DarkSky forecast will be available for the current conditions block.

If all is OK:
Download the latest version from http://wd34.weather-template.com/
Rename your current pwsWD website folder to pwsOLD
Upload the newly unzipped pwsWD folder
Copy the w34-settings1.php from pwsOLD to pwsWD
First run pwsWD/easyweathersetup.php and check all default values, they are blue

Succes, Wim

Wim
Thanks for the help.
Updated to current version.
2 minor issues.
When I click on “nearby” under current conditions, it shows
EBBR instead of KPDX.
When I click on webcam, the larger display is blank.
Thanks
Larry
https://vancamweather.com/pwsWD/index.php