Customising PWS Dashboard (early versions)

:smiley:

Added Norwegian language support. Thanks, Torjan & Wim :slight_smile:

Only minor changes to report: I’ve given up on 3 rows of 4, Wim does it so much better!

Got max-min temp times showing in the small temp window; went back to the earlier sun block theme using a grey segment (and sun) for night; copied latest yellow segment idea for moon luminance, but also changed the text colour in css and went to grey for the rest of the circle; and did a lot of fiddling in metar pop-up, e.g. to get rid of brackets round units and to add a bit more info.

All this on the original January release.

Managed to get a small max-min extratemp block working, but I must be doing something wrong because it always shows °C

Salutory lesson: fiddled with w34_livedata.php last night to sort rain rate units, but I wasn’t working on the latest version of the script so the small extratemp block stopped working overnight :roll:

Recently noticed that my barometer block (original release) doesn’t switch between UK and US units properly: the main pressure reading, the max/min for the day and the trend change OK, but the dial limits and conversion at bottom left do not.

I had made a few changes to barometer_block.php, so I went back to the original (19/01 update) version and it still doesn’t work. AFAIK I haven’t made any changes to pressure values in w34_livedata.php. . .

EDIT: found the reason for that conversion problem was a small routine I added to lines 345-53 of w34_livedata.php to get max/min extratemps from a customtextout file. Now I need to understand why what I did there upset the temp_unit conditionals in barometer_block :frowning:

Can the fact that w34_livedata.php defines $weather[“temp_units”] = “C” while the conditionals are if ($weather[“temp_units”] == ‘C’) have anything to do with it. . .?

Single vs. double quotes should make no difference when used like that with simple strings.

Thanks - I just tried it and came to the same conclusion! Back to square one.

P.S. I’m sure you’ve told me that before. . . I’ll try to remember from now on :wink:

Cracked it :smiley:

Instead of a stand-alone addition to get the extratemp data (with a re-definition of $weather[“temp_units”] = “C”) I integrated it with the main WD clientraw part of w34_livedata.php. So w34_livedata.php now “explodes” clientraw.txt and customtextout.txt into separate arrays before pulling out the individual data strings.

Added max/min indoor temps. Now I know how to use the customtext file I might try to add max/min indoor temp times. . .

UPDATE: added, along with max UV :slight_smile:

Having successfully added “Weather on Mars” to the Menu links back in February, it’s taken me this long to realise that I can add my other weather pages too: WDL, FreshWDL, SS gauges and WU. #-o

Can you add a radar page like GRlevel3?

If you can get it into an iFrame you should be able to. See bottom of page 1, [color=blue]here[/color].

EDIT: re iFrame or not, see [color=blue]here[/color].

You will have realised that I’m no expert. . . :slight_smile:

Re-organised the barometer block conversion and max/min items to give a more intuitive layout. . . I think.

Now using custom tag %rainlasthourmm% to give me “rain last hour”, so I don’t get negative “rain yesterday” just after midnight.

Tag %hourrn% (and presumably tag %hourrnusa%) also works over the midnight reset. It was a “good” day to check the tags: 32.6 mm rain and still going. . .

Added max/min baro times to barometer block, too.

Had a bit of bother with that, because customtextout.txt seems to end with an unwanted CR LF that is added to the last item in the explode() array in w34_livedata.php. . .

Quick and dirty fix was to add a dummy unused tag to the end of customtext.txt, but niko pointed me in another direction: trim() the string definition in w34_livedata.php


$weather["barometer_trend"]     = convert_baro ($wd[50],$from,$to);
$weather["lowbarotime"]	        = $customtext[9];   # tag %lowbarot%
$weather["highbarotime"]	= rtrim($customtext[10]);   # tag %highbarot%

Thanks, pal!

I’m not totally convinced of the cause of the trailing space, but since you have one then trim() is your friend :wink:

Just minor fiddling. . .

Always seemed strange that rain Almanac was ordered “Year, Month, Last Hour, Yesterday”, so I changed the last two items around.

New title for small rainfall block: used to be “Annual Rainfall” but the month is in there too. (I haven’t changed all the translations, so apologies for that!)

I tried swapping Rain and Earthquake blocks, so Rain was on the bottom row with other square items, but it didn’t look right. . . swapped Webcam and Earthquake blocks instead.

Just to be persnickety :slight_smile: Why do you have a combined “UV Index|Cloudbase” footer option on 3 blocks and separate “UV Index” “Cloudbase” footer options on another.

Is it possible for the title "Swanston Grove

I haven’t managed to get the CSS right for the combined block, and I left the others so I could easily view and “Inspect” the relevant bits in the browser to see what I’d missed. Work in progress. . .

[quote]
Is it possible for the title “Swanston Grove . Edinburgh, U.K.” to be more prominent?