Steelseries Gauges for WD

You can try http://www.westerncawx.net/ftp

How can you run server-side code (php) on the client side(javascript)? The above code doesn’t work for me because it calls php code from within javascript. I see that you have solved this problem somehow on your site, but the method isn’t clear to me. Any hints?

From v1.6.3 you no longer have/need to edit ddimgtooltip.js - it picks up whatever you place in the g_imgPathURL and g_tipImgs array variables in gauges.js

The relevant bit of ddimgtooltips.js now looks like this:

tooltips[0]=[(g_tipImgs[0][0] !== null ? g_imgPathURL + g_tipImgs[0][0] : null), " ", style];
tooltips[1]=[(g_tipImgs[1][0] !== null ? g_imgPathURL + g_tipImgs[1][0] : null), " ", style];
tooltips[2]=[(g_tipImgs[2] !== null ? g_imgPathURL + g_tipImgs[2] : null), " ", style];
tooltips[3]=[(g_tipImgs[3] !== null ? g_imgPathURL + g_tipImgs[3] : null), " ", style];
tooltips[4]=[(g_tipImgs[4][0] !== null ? g_imgPathURL + g_tipImgs[4][0] : null), " ", style];
tooltips[5]=[(g_tipImgs[5] !== null ? g_imgPathURL + g_tipImgs[5] : null), " ", style];
tooltips[6]=[(g_tipImgs[6] !== null ? g_imgPathURL + g_tipImgs[6] : null), " ", style];
tooltips[7]=[(g_tipImgs[7] !== null ? g_imgPathURL + g_tipImgs[7] : null), " ", style];
tooltips[8]=[(g_tipImgs[8] !== null ? g_imgPathURL + g_tipImgs[8] : null), " ", style];
tooltips[9]=[(g_tipImgs[9] !== null ? g_imgPathURL + g_tipImgs[9] : null), " ", style];

The only reason to edit ddimgtooltip.js now is if you want to change the popup ‘style’ - or add more gauges :wink:
/Mark

Thanks, Mark! Success with gauges-ss_v1-6-3 by restoring the distribution ddimgtooltip.js and modifying gauges.js to use this path to the graphs:


var g_imgPathURL              = "../wxgraphs/";

,
and to use this image array:


var g_tipImgs = [["temp+hum_24hr.php", "indoor_temp_24hr.php"],       		// Temperature: outdoor, indoor
                 ["temp+dew+hum_1hr.php","temp+dew+hum_1hr.php","temp+dew+hum_1hr.php","temp+dew+hum_1hr.php","temp+dew+hum_1hr.php"],  // Temperature: dewpnt, apparent, windChill, HeatIndx, humidex
                 "rain_24hr.php",                                       // Rainfall
                 "rain_1hr.php",                                        // Rainfall rate
                 ["humidity_1hr.php", "humidity_1hr.php"],            // Humidity: outdoor, indoor
                 "baro_24hr.php",                                       // Pressure
                 "windgust_1hr.php",                                    // Wind speed
                 "winddir_1hr.php",                                     // Wind direction
                 "uv_24hr.php",                                         // UV
                 "solar_24hr.php"                                       // Solar rad
                ];

I appreciate very much your hard work and especially your patience. You can lead a horse to water (me), but you can’t make him drink (i.e. see what’s right in front of his nose.) This is the page now: http://www.gwwilkins.org/gauges-ss.php. :greenjumpers: :signthanks:

Glad you got it going Jerry.

Your page looks good, but I’ve spotted one error in my code - you are leaving the units in the ccr file, and the whilst the script should handle this, I miss handle the data a bit in the Wind Direction gauge, so it fails to display the variation in direction on your gauge - I’ll get that fixed.

Edit: Maybe you could test the fix for me?

gauges.js, line 1448, change:

if (+data.wspeed.replace(',', '.') > 0) {

to:

if (windSpd > 0) {

Actually I do not think the wind variation tags in WD are still working correctly. I just patched Jerry’s page in the debugger and watched his Wind Dir gauge.

The tags were reading 242-305, then the current value within that range.

Then there was a current reading on 330, the range tags changed to 242-330 (correct).

The next reading was 275, the range tags went back to 242-305 (wrong?) I would have expected them to reflect this new larger variation in direction and continue to read 242-330.

This sort of pattern carried on repeating, when the current value went above or below the 242-305 range.

In fact the tags seem stubbornly ‘stuck’ on 242-305.

One for Brian I think.

You’re correct, Mark. The changes don’t ‘take’ even with the modified code you suggested. For now, I’ll revert to the prior code in order to avoid a misleading gauge. I also changed the graph to winddir_24hr.php which will provide additional information once Brian fixes the tags.

Thanks!

the range tag works on average wind direction
also make sure to be using the latest version of WD (does not mention which version is being used)

Ah, thanks for clarifying that Brian.

Thanks, Brian. I think that explains it, and Mark has already confirmed it. I’m using the latest version of WD, V10.37Rb16. BTW, would you recommend using

%avdirlastimediate10%.......Average dir wind for the last immediate 10 minute period

vs.

%avdir10minute% ............average ten minute wind direction (degrees)

for the tag in customclientrawlocal.txt? Would the veer directions


%mindir10minute%............Max veer left wind direction, last 10 minute (based on 10 minute average speed)
%maxdir10minute%............Max veer right wind direction, last 10 minute (based on 10 minute average speed)

be something to look at here, or do I not understand those tags?

Thanks again for all your hard work.

Using ‘%avdirlastimediate10%…Average dir wind for the last immediate 10 minute period’ seems to have changed the range tags to much more reasonable values on my site.

I’ll see how it works out.

Thank you, thank you. I just copied and pasted your code into my page and the graphs worked.

Bill

Glad to hear it, Bill. The credit really belongs to Mark. :slight_smile:

I don’t understand. I have ticked “Create a custom clientraw file”. But it is not being uploaded. I can watch the realtimeftp and seel clientraw.txt be uploaded.

I have tried setting the frequency to the same as clientraw.txt and also to different frequencies. I have tried the upload offset to 0 and to a few seconds.

Obviously, I have restarted WD, several times actually.

In the status bar at the bottom of the Windows screen, I see three small yellow ftp icons. Should there be three?

Occasionally, a small status window opens in the status bar and shows what filess are being uploaded.

I have one of the internet file uploads set to upload the customclientraw.txt file every minute and that is how I am getting the data now. So, the customclientrawlocal.txt file is properly formatted and being found.

Is there some other configuration that either needs to be set or not set?

Thanks.

RESOLVED: I have it working now. I was pointing to the wrong place for the data. My error. BUT, should the ftp upload window show that customclientraw.txt is being uploaded? Mine does not.

Bill

Check the location of your clientraw files on the 'Web Files/Web Page Real Time FTP/WDL menu (via the pushbutton on the upper right). That’s where your custumclientrawlocal.txt goes.

I had to ‘stop’ the uploads in the realtime uploader in order to scroll through the log and find the file.

With appreciation to some great tips from a few folks here I finally have the graphs working (along with a giant headache)…

http://tiggrweather.net/wxgauges.php

Many thanks to all! :smiley:

BUT, should the ftp upload window show that customclientraw.txt is being uploaded? Mine does not.
that was an oversight this update should http://www.weather-display.com/downloadfiles/realtimeftp.zip

Thanks Brian, the ftp update now shows the upload of the customclientraw.txt.

I–and I am sure I speak for lots of people–appreciate all your support.

Bill

+1

New clientrawrealtimeftp is doing the job AND logging it. :slight_smile: