Having our first really good storm of the year (finally!), and the rain rate gauge is not following the actual rate properly.
Currently the rate on the VP2 console shows 0.31. testtags.php shows the same under $currentrainratehr. The gauge is showing 0.01 (sometimes it’s 0.00), and the red max triangle is the same. Periodically (a period of time up to 5 minutes or so) the gauge and triangle will jump to the proper reading, remain there for a minute or so, and then jump back to 0 or .01. Then the sequence starts all over again. During this mess $currentrainratehr in testtags.php continues to show the proper rate.
I suspect that WD is not supplying the correct value for today’s maximum rain rate. I am using the tag %maxrainratehr% which is described as as “Max rain rate,for the day, mm/hr (or in.mm)”.
I use this value to set the triangle pointer (which shows the maximum rain rate for today), and derive what the maximum value of the scale should be (the next round increment above this value).
I have not managed to catch a WD using SteelSeries when it has actually been raining to check my theory though.
If the scale is at it’s default value because the %maxrainratehr% is zero then the pointer will be limited to the scale maximum.
Rain just started again. Console, ccr, testtags.php, and gauge all show 0.07. The gauge has been holding this for over 10 minutes, which is longer than it did this morning.
Rate just dropped to 0.06. The gauge reacted correctly immediately after the drop. About 5-10 seconds later the gauge and ccr dropped to 0.00. Console and testtags continued to show 0.06.
Just as an idea,
shouldn’t most of the needed values be available directly from clientraw.txt?
And those whats not there not changes that fast anyway so testtags.php should work great for those, thats the way i do it on my current frontpage. Then should no customclientraw.txt be needed at all, and one file less to generate/upload.
Possibly, I don’t know WD, I just took a solution for WD that had already been worked on. If you can write a clientraw parser that provides the data feel free to contribute it, if all the data is there s does sounds a better solution. I guess using testtags.php would mean it would only work with sites that have PHP available.
Just like realtime.txt in Cumulus, values can be found ex here: NameBright - Domain Expired
For parser, just use jQuery’s own ajax what allready loaded in steelseries like a quick one here (yes, that 4 line-snippet loads/parses/shows temperature in block-id #toptemp):
$.ajax({url:dataurl,method:'GET',dataType:'text',cache:false,success:function(nsdata){
var ns=nsdata.split(' ');
$("#toptemp").html(ns[4]');
}});
Thats true testtags.php needs php, but almost all WD/Saratoga templates use that allreay and testtags.php are allready loaded so thats no probs…
Henkka, I’ve had problems with the JQuery ajax routine before, so I stuck with my own as it is more flexible in failure situations. Originally I deliberately did not have any JQuery in the gauges.js script so people without experience of that package could see exactly what was going on. The JQuery library was only there because the popup script used it.
I’ve had a look at the clientraw.txt and it is missing the following values that the steelseries scripts currently uses:
jQuery-ajax…
I have never had any problems with it. It also contains error-thingys (ie.what do if error), that with “re-download if error” i’m not sure about without checking tought.