Page 8 of 15

Re: Yet more gauges

Posted: Wed 29 Jun 2011 1:46 pm
by steve
mcrossley wrote:I see a problem with the code and your values. Your all time high pressure is 1044.9, and the code sets the scale max to 1050, but the clever gauge code decides that a 'nicer' value would be 1060. I then draw the upper red sector from 1044.9 to 1050, which now doesn't reach the end of the scale :(
Yes - that's why the higher sector looks a bit odd and appears to be showing a range of values, so it's not obvious that it's just the max value that it's indicating.

Re: Yet more gauges

Posted: Wed 29 Jun 2011 2:06 pm
by mcrossley
OK, disabling the default 'niceScale' has fixed that issue. I've also added a .trim() to the forecast as it looks like the Davis strings have leading and trailing spaces.

version 0.4 attached, its in the readme but because I know no one ever reads those! the changed files are:

realtimegaugesT.txt (its just the updated version I posted earlier)
gauges.js (fixed the bar problem for Steve, trim forecast string)
ddimgtooltip.js (fixed hard coded initial image path)

Edit: By the way folks, feel free to use my original demo page to find colour/style combos that you like and change the gauges.js code to implement your personalisation. We don't want them all looking like clones do we :lol:

Re: Yet more gauges

Posted: Wed 29 Jun 2011 2:28 pm
by steve
mcrossley wrote:fixed the bar problem for Steve
Yes, that's working.

Re: Yet more gauges

Posted: Wed 29 Jun 2011 2:58 pm
by gemini06720
mcrossley wrote:Ray (gemini), you seem to have a problem with the popup trend images, they are out of sync for some reason?
Indeed, for some reasons, a modification to the script was pointing at the wrong image... :oops:

I have made a few modifications to the texts displayed with the different graphic images...

I have been trying for the past half-hour to disable the humidity graphic image when the indoor humidity is selected but, alas, I cannot get rid of it... :(

Re: Yet more gauges

Posted: Wed 29 Jun 2011 4:12 pm
by gemini06720
OK, Mark, I now have the proper description for all the 'hover' images, including the inside and outside humidities(?)...

Re: Yet more gauges

Posted: Wed 29 Jun 2011 4:38 pm
by RayProudfoot
Hi Mark,

I've received an automated warning from my web hosting provider advising I've hit 80% of my monthly allocation of bandwidth.

David has provided some stats for me which shows a 20 fold increase in http traffic around 2pm today. I can't understand what would have caused that. Can you? Is it possible everyone reading this thread hit my site around the same time? There must have been a huge number of viewers.

I've downloaded some free web hosting monitoring software to keep an eye on things. Are these gauges quite hungry of bandwidth? Although I had the gauge display open for 3 hours it's the 2pm peak that seems strange.

Re: Yet more gauges

Posted: Wed 29 Jun 2011 5:10 pm
by mcrossley
Ray, if anything it will be the graph images that are using the bandwidth. They currently refresh every gauge refresh. You can disable the popup data via a variable in the gauges.js script. This also stops the graph downloads. This is something that needs improving.

Re: Yet more gauges

Posted: Wed 29 Jun 2011 5:52 pm
by RayProudfoot
mcrossley wrote:Ray, if anything it will be the graph images that are using the bandwidth. They currently refresh every gauge refresh. You can disable the popup data via a variable in the gauges.js script. This also stops the graph downloads. This is something that needs improving.
Hi Mark,

Being a complete novice with java I'll leave well alone for now. No doubt you'll be enhancing performance and if it helps with bandwidth all the better.

Thanks.

Re: Yet more gauges

Posted: Wed 29 Jun 2011 6:08 pm
by meteotortosa
:clap: :clap: :clap: :clap:

Now in v0.4, i can see my data

http://www.meteotortosa.cat/gauges-ss/gauges-ss.htm

but, I t'hink something is wrong

Upload an image
steelseries.jpg

Re: Yet more gauges

Posted: Wed 29 Jun 2011 6:41 pm
by mcrossley
Hi meteotortosa, I had a few values that had escaped the comma decimal conversion.

Find attached v0.5, it implements the following:

- Updated parseRealtime.js, changes decimal points to match the end users locale on popup data
- Updated gauges.js, now counts down correctly on http retries.
Popup data graphs now only downloaded every 15 mins by default. (configurable at the top of the script)
Fixed some remaining comma decimal conversions (hope that is all of them now)

Re: Yet more gauges

Posted: Wed 29 Jun 2011 6:49 pm
by mcrossley
I see there is another problem, the LCD font does not include accented characters :( But there again I guess real LCD displays don't either - so how how do you display them?

Re: Yet more gauges

Posted: Wed 29 Jun 2011 6:52 pm
by RayProudfoot
Mark,

I've downloaded the latest build and opened gauges.js to modify the forecast window and DW is reporting an error on line 918.

Here it is...

g_wind.maxValue = Math.max(Math.ceil(g_wind.maxMeasured)/10)*10, 20);

Re: Yet more gauges

Posted: Wed 29 Jun 2011 6:59 pm
by mcrossley
Ha, that will teach me to make 'just one small edit' and not test it before posting! One character out of place :evil:

Revised 0.5 zip attached.

Re: Yet more gauges

Posted: Wed 29 Jun 2011 7:19 pm
by RayProudfoot
Done it myself! 2 opening brackets and 3 closing ones.

All working now, thanks. Just so I understand what you've changed. The gauges themselves are now uploaded every 30 mins rather than every refresh period?

Re: Yet more gauges

Posted: Wed 29 Jun 2011 7:30 pm
by mcrossley
Ray, no, the gauges still update every countdown period as shown at the top of the page. The popup text also update at the same rate. This only pulls about 340 bytes from your server each time. Then every 15 minutes (by default) the graphs on the popup data are updated - this pulls approx 245 kB each time.

I've spotted a problem with the implementation (the temp graphs don't switch indoor/outdoor), but I'll wait and see what other bugs come to light before I reissue.