SteelSeries - multiple temp/hum gauges?

I have set up the SteelSeries gauges using data from MeteoHub generating the customclientraw.txt file.

But because I have a lot (13) of TH sensors, I would like to display data from them as additional gauges.

  1. Is it possible to put more than one temperature gauge on the page?
    I’ve tried to put the same gauge twice on the page using the “Altering the gauge ‘layout’ on the page” instructions, but that didn’t work.
    Only empty space was displayed, where the second gauge should be.

  2. Is it possible to make a combined T-H gauge, where temperature and humidity (from the same sensor) would be switched like the Inside/Outside on the temperature and humidity gauges?

Are these ideas real with the SteelSeries or should I forget it, because the SteelSeries are not meant for it?

Update - removed obsolete link

Yes, you can definately put more than 1 gauge on the page, but make sure you give it a different ID.

And for question 2) - Yes, what you can do with the gauges is really only limited by your skill/determination/available data. However I am really busy, so I cannot do anything for you other than offer hints when/if you get stuck.

Thank you both for your answers.

That’s good news.
I’ll look into it.
Time to study the code …

Just as Mark said, feel free to contact me if you have any problems with it and I will see if I can help you, I know Mark is really busy and Ive also played around with the gauges in the past and modified them.

Thank you for your kind offer.
When I hit “the wall” I’ll contact you.

It seems I’m stuck and I need some help.

So far I was able to create a combined temperature/humidity gauge (using if else), which can be manually switched by changing the value of the variable “prepni” (line 559 of the gauges_reduced_s.js script).
When the variable is equal to “tepl”, temperature gauges are diplayed.
When the value changes to anything else, the first two gauges change to Humidity gauges.

I was also able to create a radio button switch, with an underlying function (starting on line 1351 of the gauges_reduced_s.js script) which changes the value of the “prepni” variable.
I added alerts, which show, that the switch is working.

The problems is, I’m not able to reinitialize the gauges, after switching (in other word they don’t change).

I was trying to solve the problem with the help of Jachym, but we didn’t succeed.

Any help would be greatly appreciated, as I’m no programmer and I don’t know, how to solve this.

Update - removed obsolete links

It seems I did it!

One tiny little problem left - all is switching but the popup graphs.
No big deal but if anyone has an idea, I would be very grateful.

Solved.

If you look at the dew point gauge in the ‘standard’ gauges.js you can see how I switch the graphs.

I get the ‘new’ value for the gauge (temp or hum in your case) compare that to what is was before, if different, then swap thins around…

                    if (cache.selected !== sel) {
                        cache.selected = sel;
                        // change gauge title
                        ssGauge.setTitleString(cache.title);
                        // and graph image
                        if (config.showPopupGraphs && config.tipImgs[1][cache.popupImg] !== null) {
                            var cacheDefeat = '?' + $('#imgtip1_img').attr('src').split('?')[1];
                            $('#imgtip1_img').attr('src', config.imgPathURL + config.tipImgs[1][cache.popupImg] + cacheDefeat);
                        }
                    }

I have the graph image paths in an array that I index into (config.tipImgs[1][cache.popupImg]), but you could use any mechanism you liked here.

Thank you for your answer.
I’m using (almost) exactly this code.
The graphs do change, after the set timeout of 15 minutes but not instantly.

Update: Got an idea, have to test it …

Update 2: I’ve found a workaround.

Looks good to me :slight_smile:

Thank you :smiley:

Now some cleaning and fine tuning and I’ll call it final.

Here is the final version: http://tfanexus.besaba.com/final/

There is still some room for optimizations.
For instance I wanted to generate the 14 TH gauges with the help of

jQuery.each([ TH0, TH1, TH2, TH3, TH4, TH11, TH12, TH13, TH14, TH15, TH16, TH17, TH18, THB0 ], function( index, value ) {
singleXXXcode
});

using the “index” in imgtips and the “value” for the rest but I wasn’t able to make it work :frowning:


final.zip (278 KB)

gauge no.3 is not working

It is, there are 14 TH gauges and 1 T only, which is number 3.

Aha, ok sorry, I didnt know what each one represents and I thought they should all change.