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

Did you het your METAR API key?
Wim

Ahhhhh sorry Wim, it’s on place i forgot to do that. Thx

Temp and Barometer block pop-up graphs for Y and M (not D) show "
Radiation" after the High/Low legend?


That is an unexpected/invalid translation in the language file for english
Add to the bottom of pwsWD/languages/lang.en.php 1 line just before the ?>

$lang['Good']= 'Good Air Quality ';

$lang['Low'] = 'Low';
?>

Wim

Thanks, Wim, all good now :slight_smile:

Wim, is there a way to force a page refresh when the page is loaded - I know I can click on the refresh button of my browser, but I would prefer to click on the link to my page and have that page loaded with fresh/up-to-date weather data (skipping any cache data).

As all data comes from PHP the browser cache will not be used for data as with html.
The server caches the data loaded from external sites. But those are not refreshed when reloading the page.
Actions when loading the page (as it is functioning now)

  1. Frame of the page with empty boxes is sent back to to the requesting browser
  2. The “update script” is loaded and it starts re-loading obsolete data form external sources (DarkSky, AQ, a.s.o.)
  3. All blocks are loaded one by one and they use the available data on the server, the blocks do not reload data themselves
  4. All blocks refresh their data at different intervals after they are loaded

Often one uses a cron-job so that all data on the server is always valid and step 2 just checks and find all data is OK.

Wim

A couple more observations on the Dark Theme viewed in Chrome. . .

  1. Your test page Sun block has a problem with “Estimated” font size - see Sun1. (I presume you have been making changes, as the block is no longer titled Sun, Moon & Space like mine - see Sun2. I prefer just Sun!)

  2. I think the webcam fits better at $webcam_height of 155px (webcam2) rather than 160px (webcam1, where it hangs over the bottom of the frame)? (I changed mine to show width 70%, too, to reproduce the 4:3 aspect ratio without stretching.)


Sun1.JPG

Sun2.JPG

webcam1.JPG

webcam2.JPG

Yes I am testing a new sun-block.php, it should always display the correct sun-position ,also when someone from another time-zone visits your site. That “Estimated” is only displayed in the “dark theme”. I removed it in the script as all text should be translated to the default language.

2. I think the webcam fits better at $webcam_height of 155px (webcam2) rather than 160px (webcam1, where it hangs over the bottom of the frame)? (I changed mine to show width 70%, too, to reproduce the 4:3 aspect ratio without stretching.)
The problem is not with the height the webcam image. The problem is a difference in the CSS between light and dark. All block-headers are displayed lower in the dark theme, just outside the band. In the light theme they are correctly place inside the grey band.
Have to find where it is specified.
Wim
FOUNDIT: weatheritem has 6px padding in dark 0px in light theme
There are more differences this pushes all content lower in the box.


Well done! I wonder why. . . (But that’s why my 5px correction made it “look” better!)

Is this related to the same issue?


I did notice that the French translation is "Luminosit

Small problem in Rain block: 0.3 mm rainfall today was at 0130 Z, so “Last Hour” should be zero.


rain.JPG

But there is no link to that page. Not in the Avatar not in the post.
As I am not clairvoyant, there is nothing i can do.
Wim


Sorry: http://swanston.maui.co.uk/pws/

You are using clientraw.txt for your “livedata”.
The http://swanston.maui.co.uk/clientraw.txt has 10 fields for rain-hour, they all contain 0.3 mm
The clientrawextra.txt has 24 fields for rain-hour, the first 9 contain zero , other 15 contain0.3 mm

Seems Brian, as the programmer of WD, has to tell me how I should calculate rain-last hour.
Probably I have to subtract the tenth = last hour value from the ninth one to get the last hour rain.
Wim

That would explain it! I did check that WD was showing “rain last hour” correctly, and SSGauges is showing “time of last rain” correctly, before I posted. . . but didn’t think to check the values in clientraw.txt.

Wim, does it use clientrawhour.txt ? The last 60 mins rain is in there by minute starting at #361 if that helps.

http://swanston.maui.co.uk/clientrawhour.txt Those 60 fields also contain 0.3 mm
361 rain total last 60 min for min 01 M 0.3 mm ( = 0.012 in )
362 rain total last 60 min for min 02 M 0.3 mm ( = 0.012 in )
363 rain total last 60 min for min 03 M 0.3 mm ( = 0.012 in )

It seems that all those “rain-minute” “rain-hour” fields all contain cumulative values, but Brian has to confirm that.
Wim

Wim’s quicker than I am with the parser! But I agree they all contain 0.3 mm. . .

[A single tip from my modified raingauge is actually 0.25 mm = 0.01 in, but WD doesn’t do mm to 2 d.p.]