Hi,

When you click alternatively on the *Outside* and *Inside* radio buttons 
the temperature gauge should alternate between displaying outside and 
inside temperature respectively. If this is not happening there is a 
problem and I suggest you look into that further, more on that later.

On an out of the box SteelSeries gauges installation you should be able to 
have the gauges default to displaying indoor temperature without the need 
to change any code. I suspect the checked entry you refer to is defining 
the radio button that is checked (set) upon page first load, the 
SteelSeries gauges also use cookies to store the user's last used display 
settings (refer next para) and and this cookie is used to return the 
display to its last state. So you can have some competition between the 
html and the cookie to setup the display.

The use of the cookie needs a bit more explanation. The SteelSeries gauges 
use a cookie to store your last used units settings and gauge display 
options. So if you are displaying temperature in C that is what should be 
displayed next time you open the page, unless of course you delete the 
cookie in the meantime. Same deal with the gauges display options, if you 
are displaying Inside temperature that is what should be displayed next 
time you open the page. Again deleting the cookie will reset this, I 
believe the default is to display outside temperature (indicated by the 
checked setting in the html). Now if another device displays your page that 
cookie won't exist on that device so the html checked defaults are used 
gain, but clicking on Inside should then cause inside temperature to be 
displayed on subsequent views by that device/user. The default display 
units (ie when no cookie exists) are similarly seeded, but not from the 
html but rather from the units used in gauge-data.txt.

Coming back to inside temperature not being displayed. The first thing I 
would look at is the data source, gauge-data.txt. What values are there for 
intemp and temp fields? Are they different? Do they display correctly? If 
the data looks OK what bout the showIndoorTempHum setting in gauges.js 
(circa line 55), is it set to True? Remember if you are using the 
SteelSeries gauges extension you will need to make any changes to gauges.js 
on your weeWX install and then restart weeWX to have the modified gauges.js 
uploaded to your web server.

If your gauges page is visible via the internet it is helpful to provide a 
link as a lot of useful info is then available to us to help in debugging 
rather than asking you 20 questions.

Gary

On Friday, 16 November 2018 05:39:55 UTC+10, Riccardo Moretti wrote:
>
> I've installed the Steel series Gauges and they seem to be working fine,
> I'd like to customise my default page to have the temperature gauge load 
> with the inside temperature loaded as default
> the examples show the temperature gauge with a radio option to be able to 
> change between either gauges, I have tried changing the checked option and 
> it does not seem to make a difference,
> it always shows the outdoor temperature by default
>
>                    <div class="gauge">
>                       <div id="tip_0">
>
>                           <canvas id="canvas_temp" class="gaugeSizeSml"  
> ></canvas>
>                           <input id="rad_temp1" type="radio" 
> name="rad_temp" value="out" onclick="gauges.doTemp(this);"><label 
> id="lab_temp1" for="rad_temp1">Outside</label>
>                           <input id="rad_temp2" type="radio" 
> name="rad_temp" value="in" *checked *onclick="gauges.doTemp(this);"><label 
> id="lab_temp2" for="rad_temp2">Inside</label>
>
>                       </div>
>
>                   </div>
>
> or is there another easy way like something like this?
>
> <canvas id="canvas_temp" class="gaugeSizeSml" onload="Inside" ></canvas>
>
>  in the gauge.js file I have found this section
>
>             // temperature
>             if (gaugeTemp) {
>                 if ($('#rad_temp1').is(':checked')) {
>                     gaugeTemp.data.title = strings.temp_title_out;
>                 } else {
>                     gaugeTemp.data.title = strings.temp_title_in;
>                 }
>                 gaugeTemp.gauge.setTitleString(gaugeTemp.data.title);
>                 if (data.ver) {gaugeTemp.update();}
>             }
> any help will be much appreciated
> Riccardo
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to