Customising PWS Dashboard (early versions)

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?

Sorted :smiley:

Small change mentioned was only to display “equivalent to” rather than “equal to” for the barometer conversion. . .

All understood, it’s a nice project :smiley: I don’t need the title in flashing neon, just seems a bit over understated :wink:

Went to bold and changed the -0.05em letterspacing to +0.03em. . . better?

I like it :thumbright:

Six months in and I’ve finally worked out how to show rain to 1 d.p. for mm and 2 d.p. for inches, with trailing zeros. I’ve left rain rate/hour showing 2 d.p. for both. (This release can’t show rain rate/min without more work, and I’m not really interested anyway.)

Small YTD-MTD rainfall block has a temporary “real-estate” solution: for both mm and inches, if ($amount<100) show 2 d.p.; for (100<$amount<1000) show 1 d.p.; ($amount>1000) show 0 d.p. Seems like a workable balance?

Yes, good solution.

Starting to fiddle with the July release now. . . URL as left but change /pws/ to /pwsnew/

I really need to get the max-min Temp circles away from the edges of the small block (temp.jpg), but I’m having trouble. . .

Edit: If at first you don’t succeed. . . try again (temp2.png).


temp.JPG

temp2.png

Wim’s July version demo currently using the same format, so here’s a comparison.