HWS-template (WD34) July version available

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

Showing KPDX now. . . maybe EBBR was cached.

I attach a working version , it stretches the image to use the whole area.
You can customise to either stretch the image or keep height/width ratio

Wim


webcam_popup.php.zip (1.87 KB)

Hello,
I noticed this problem with the UV block, with the translation coming out of the rectangle, can something be done?
Thank you
site: https://stazione.meteosantangelo.it/pws07/


UV.jpg

Although the problems are minimized in this version, there will always be translation texts which do not fit. Weather-texts are often more compact in English then in other languages. In this block the room for that text is nearly at its maximum.

If you do not want to change the php script yourself, you should change the translated text and remove the word solare
It is for the visitor clear what the values are anyway.

Wim


largetext.jpg

I have installed this fine template.
My weather station is a WS-1001 clone that sends the data to WU every 16 seconds without using a computer. I have a new API key from WU and get live data from there.
w34_cron_stationcron.php runs every 5 minutes.

But I have some mystifications.

  • The current data is displayed correctly, but the max and min values ​​for both wind and temperature look mysterious.
    It appears that it is always the minimum value displayed for both max and min for temperature. What numbers are displayed for max and minimum wind I cannot figure out.

  • I selected 1 decimal for temperature display. I also get 1 decimal, but the temperature is always rounded to the nearest whole number, so the decimal always shows zero. (If I switch to Fahrenheit, a decimal will be displayed correctly).

  • If I use Chrome browser, pop-ups for displaying e.g. “Wind today” fills the whole screen and the close button does not work, so I can only go back to the main screen with the browser’s left arrow. When I use Firefox, it works normally.

Is that something that can be arranged?
There is no rush. The weather is the same, no matter what my weather station reports.

Link to template
http://weather.inaogmogens.dk

The template can not display more information than WU gives us.
Please check the debug-console here => "weather.inaogmogens.dk"
Second row shows the file-contents as loaded from WU at the left dropdown-box:
“./jsondata/wucom.txt” => last measurement =>current temp = 20 degrees
“./jsondata/wucom_day.txt” => todays high-lows
As you can see the three temp fields contain the same data, 16 degrees

You can check all the (recalculated) values we use in the template right dropdown-box: “Live data values”
I assume there is a small hick-up in the WU data as other stations are reporting normal values at the moment

- I selected 1 decimal for temperature display. I also get 1 decimal, but the temperature is always rounded to the nearest whole number, so the decimal always shows zero. (If I switch to Fahrenheit, a decimal will be displayed correctly).
The temperature WU gives us is without any decimals. That is a huge problem for all users. Also their new dashboard has the same problem. When you use the F button the template scripts do the recalculation and round it to the 1 decimal you want. But when loading the data from WU you should better use no decimals for temp.
- If I use Chrome browser, pop-ups for displaying e.g. "Wind today" fills the whole screen and the close button does not work, so I can only go back to the main screen with the browser's left arrow. When I use Firefox, it works normally. Is that something that can be arranged?
I can not reproduce that using Chrome on your website. I myself use Chrome 95% of the time and do all development and testing with it. All graphs should work the same way as they are using the same script and the same pop-up code. I attach a screenshot of the "Today" graph using Chrome. QUESTION: Is it the daily-graph or the forecast (4th pop-up) by wind?
There is no rush. The weather is the same, no matter what my weather station reports. Link to templatehttp://weather.inaogmogens.dk
Thanks for using the template, and i will check a few times why your min-max temp values are all equal.

Wim

P.S. comparing your weather-values in the WU-uploads with those on your WU-dashboard there are more errors in the upload, also the pressure min-max are both equal to the min value


Thanks for the quick response.

Temperature without decimals is OK for me. I just wondered.

The mystification with the pop-ups applies to all the links in the bottom of each field, but there is obviously a mistake in my Chrome - I just borrowed my wife’s computer, and it works correctly, so sorry for the inconvenience :oops:

Concerning maximum and minimum issues.
When I test modules that you suggest, I can see that the wucom_yday.txt file, which the program generates, writes minimum and maximum temperatures equally.

It seems to me that part of this file has been copied from wucom.txt in a way I can’t figure out.

However, I can observe that the correct maximum and minimum temperatures and wind speeds can be found in the “pristine” wucom_yday.txt file. As far as I can see, WU has actually sent them correctly.

See
http://weather.inaogmogens.dk/jsondata/wucom_yday.txt

Mogens

FOUND A SOLUTION SEE NEXT RESPONSE

Those are exact copies of the file as we get from WU
https://api.weather.com/v2/pws/observations/current?stationId=IDKFREDE2&format=json&units=m&apiKey=_API_SETTING_ => current conditions
is saved in "weather.inaogmogens.dk" to be used for 180 seconds before reloaded

https://api.weather.com/v2/pws/history/daily?stationId=IDKFREDE2&format=json&units=m&date=20190714&apiKey=_API_SETTING_ => todays data for July 14
is saved in "weather.inaogmogens.dk" to be used for 600 seconds before reloaded

https://api.weather.com/v2/pws/history/daily?stationId=IDKFREDE2&format=json&units=m&date=20190713&apiKey=_API_SETTING_ => yesterdays data for July 13
is saved in "weather.inaogmogens.dk" to be used until the next day.

However, I can observe that the correct maximum and minimum temperatures and wind speeds can be found in the "pristine" wucom_yday.txt file. As far as I can see, WU has actually sent them correctly. See [http://weather.inaogmogens.dk/jsondata/wucom_yday.txt](http://weather.inaogmogens.dk/jsondata/wucom_yday.txt)
The values on the template you are talking about are from today as generated by WeatherUnderground. Those values are generated from the database and sent to the website every time the scripts ask for it. So even if the yesterday values are correct, the todays values were and are incorrect. You can test that yourself with the link above, just fill in your api-key replacing the [b]_API_SETTING_[/b]
Mogens
RECAP: I even used another API-key and still the data from July 13 has correct values, from today, July 14, has incorrect values. Your dashboard shows correct values for today but the api data has incorrect (the same) values for all temp fields and also equal values for pressure. The time fields show that even in the browser, todays data is from just after midnight. [color=red]obsTimeLocal "2019-07-14 00:04:51"[/color] So there is definitely a problem with the database at WU, not with a script.
observations		stationID	"IDKFREDE2"
tz	"Europe/Copenhagen"
obsTimeUtc	"2019-07-13T22:04:51Z"
obsTimeLocal	"2019-07-14 00:04:51"
metric	
tempHigh	16  tempLow	16  tempAvg	16
pressureMax	1014.22  pressureMin	1014.22

When I retrieve my own and other stations I get a correct obsTimeLocal and correct values

stationID	"IVLAAMSG47"
tz	"Europe/Brussels"
obsTimeUtc	"2019-07-14T19:29:38Z"
obsTimeLocal	"2019-07-14 21:29:38"
metric
tempHigh	20  tempLow	15  tempAvg	17

When I retrieve your data but in English units (F, mph, inHg) I get correct values
https://api.weather.com/v2/pws/history/daily?stationId=IDKFREDE2&format=json&units=e&date=20190714&apiKey=_API_SETTING_

obsTimeLocal	"2019-07-14 21:29:41"
imperial
tempHigh	72   tempLow	60   tempAvg	65
pressureMax	30.01  pressureMin	29.95

Lets see if it is OK tomorrow, otherwise I have to think about some solution using English units.
You can check my test-wu-website at old link removed https://pwsdashboard.net/
It displays the data correctly as WU is delivering correct data.
For now I have no quick solution.
Wim

There seems to be an error in WU data retrievel.
It always returns the same data you first asked for the day. The whole day exactly the same data is returned
https://api.weather.com/v2/pws/history/daily?stationId=IDKFREDE2&format=json&units=m&date=20190714&apiKey=_API_SETTING_
That is why i got recent data when testing a few valid WU-ID’s, as they did not used this api earlier today.
I now tried a modified (but not in the official API-docs) api call which seems to work better, a range of dates but for today only. I think it is a 50% change that it works tonight.
https://api.weather.com/v2/pws/history/daily?stationId=IVLBRABA2&format=json&units=m&startDate=20190714&endDate=20190714&apiKey=_API_SETTING_

I adapted the script, please test it a.s.a.p.

But probably they start using a large caching server which simply does not return the data more often then 1 /day. Also for today.

Wim


w34_load_files.php.zip (4.67 KB)

Hello once again thanks for quick response.

As you probably have discovered, I have no understanding of programming, but with your explanations I understand more and more :wink:.

I have replaced w34_load_files.php with the new one.
Unfortunately, it doesn’t seem to change anything, - still the same value for min and max.

I’m almost sorry to bother you. If the error is with WU, the problem may be impossible for you to solve.

Mogens

Correction:
I tried again my wife’s computer and her computer showed the page correctly.
Now I’ve cleaned up my Chrome and it looks like the max and min are currently showing up correctly. I will watch it during the day.

The problem with pop-ups is no longer there either.

Unfortunately, still an inaccuracy.
Early in the afternoon, the temperature crept up above 20 degrees for a short while.
It can be properly seen on the Temp today pop-up.
But maximum temperature is still displayed as 19 degrees.

http://weather.inaogmogens.dk

Ye, I know.
I am on vacation until July 28. immediately thereafter I will have a new version for todays and yesterdays data.
Maybe even earlier, but one has to wait for a hours to check if a solution works also later in the day.

Wim

It’s great that you want to look at it.
But you must enjoy your vacation.
As I wrote, there is nothing urgent.