Steelseries Gauges for WD

This sorted it - see my edited post above.

EDIT: Actually I’m not sure it is 100% sorted. The red sector now changes over time as expected, but doesn’t seem to be in the right place. Maybe it’s due to an error in the tag calculation as Brian mentioned earlier…

Off topic, but as an optometrist I love your avatar!

Simon,

The clientrawlocal.txt with the changed tags can be downloaded form my site. I will add changes with the date in the description above.
A good idea, i hope to have a new download ready soon with a gauges.js with solar and additions for the lastraintipISO.

And you need to download the latest zip update from r14 for working wind direction tags.

Jacco

Thanks Jacco, I noticed your updated txt file on your site after I posted… And I already have the latest build 14 with zip update.

Regards,

I notice in "gauges-ssT.htm that a CSS file named “weatherstyle.css” is called. I didn’t find
that in the distribution; do I need it and, if so, where would I obtain it?

Thanks.

-Keith

Thank you! =D> Looking forward seeing that update. :smiley:

Keith,

I guess that the css weatherstyle is specially for cumulus. We WD users don’t have to use that :smiley:

Jacco

Jacco

The clientrawlocal.txt with the changed tags can be downloaded form my site.

There is a small typo in your clientrawlocal.txt example: BearingRangeTo10":"%maxdir10minute%% (an extra %) ;o)

OK. I was just wondering if that was why I get some odd characters in the upper left
corner of my gauges page. See attached.


Odd Chars.jpg

Thanks, I created a 3D model in Photoshop and animated it. I have to cut the frame count right down to make the file size acceptable on forums though. :frowning:

OK. I was just wondering if that was why I get some odd characters in the upper left corner of my gauges page. See attached.
When you save your file make sure you save it in ANSI format. In notepad down at bottom you can change the encoding format.

I noticed with my time of last rain tag wasn’t producing a time but I changed it to time of last rain allways and I get 5:50 AM. My date of last rain produces 2/17/2012 but when I rollover the gauge I get Last Rain: 1 Nov 5:50

I think I see a problem with the last rain date/time. Can WD produce a fixed date format for the tags, or does it vary depending on the stations locale settings? The script assumes it will be in ISO date/time format for Cumulus (yyyy-mm-dd hh:mi) but if WD produces dates in dd/mm/yyyy or mm/dd/yyyy do you normally have to specify the date format in the script and user changes it at deployment?

Mark,

It is always fixed with two tags, however there is a small bug in the time part (there’s a leading space in front), so the rain tags have to be placed without a space between them.
Is already said in this topic.

As from my site:

“LastRainTipISO”:“%dateoflastrainalways%%timeoflastrainalways%”

Jacco

I believe the date is setup by the local settings. dd/mm/yyyy in Europe and mm/dd/yyyy in USA. I’m not sure if WD can do the date with the ISO format. Brian would have to answer this.

Just download the latest customclientraw from my site. I made a mistake in the tags.
In WD we have %timeoflastrainalways% and %timeoflastrain%, the last tag gives a - when there is no rain for the day, and that is in your ccr.

Jacco

Hi…

I have (I think) solved the problem with LastRainISO in gauges.js for my locale:

Around line 706:

// mainpulate the last rain time into something more friendly var str = cumulus.LastRainTipISO.split(' '); var dt = str[0].replace(/\//g,'-').split('-'); var tm = str[2].split(':'); var today = new Date(); today.setHours(0, 0, 0, 0); var then = new Date(dt[2], dt[1] , dt[0], tm[0], tm[1], 0, 0); if (then.getDate() >= today.getDate()) { cumulus.LastRained = LANG.LastRainedT_info + ' ' + str[2]; } else if (then.getDate() + 1 >= today.getDate()) { cumulus.LastRained = LANG.LastRainedY_info + ' ' + str[2]; } else { cumulus.LastRained = then.getDate().toString() + ' ' + LANG.months[then.getMonth()] + ' ' + LANG.at + ' ' + str[2]; }

It works for me.

Yep, that will do it, what I really wanted though was a solution that will work with any WD locale - and Cumulus ISO. I think I will have to put a flag in the script to indicate the date format in use.

this works for ISO and dd/mm/yyyy but not the odd mm/dd/yyyy they insist on using in the USA :roll: :lol:

 var dt = str[0].replace(/\//g,'-').split('-');  // WD uses dd/mm/yyyy :(
...
 var then = new Date((dt[0] > 2000 ? dt[0] : dt[2]), dt[1] - 1, (dt[2] > 2000 ? dt[0] : dt[2]), tm[0], tm[1], 0, 0); // allow for ISO or dd/mm/yyyy

Thanks, that solved it. That’s odd, as I’ve never set the format before on
any pages I’ve edited with Notepad, just used the default, whatever that
is. I’ll have to remember that in the future.

-Keith

For some reason, today the script stopped responding! It doesn’t seem to load (or find) customclientraw.txt.

Here: http://www.meteothes.gr/gauges-ss/gauges-ssT.htm :roll:

The file is at the defined path and WD uploads it all the time.

I’ve just updated WD to the latest build 14.

There is also a tag in customclientrawlocal.txt (%maxgustdirdeg% ) that doesn’t exist!

Thanos

Thanos, you have
var dt = str[0].replace(‘/’,‘-’).split(‘-’);
it should be:
var dt = str[0].replace(///g,‘-’).split(‘-’);

Edit: Ah, I see I posted an incorrect code snippet above - now corrected. I missed that, sorry.