Author Topic: Hover menues for steel series gauges displays odd values in metric setup  (Read 542 times)

0 Members and 1 Guest are viewing this topic.

Offline rlagreid

  • Member
  • *
  • Posts: 1
    • Torolmen
I am using the steel series gauges with a metric setup on my web site http://torolmen.no/vaerside-for-torolmen.
It all works fine except for a tiny detail, the hover menus are displaying numbers with 12 digits (see attached image).
I am not able to find out how this can be controlled.

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1088
    • Support site Leuven Template and scripts
I am using the steel series gauges with a metric setup on my web site http://torolmen.no/vaerside-for-torolmen.
It all works fine except for a tiny detail, the hover menus are displaying numbers with 12 digits (see attached image).
I am not able to find out how this can be controlled.
This is your data file used by the guages: http://www.torolmen.no/database/ss/gauge-data.txt
As you can see the numbers are already in the data file itself. 
How is that file created? By which weather-program or by a script on your server?

Wim
Code: [Select]
{
           "timeUTC":"2017,03,15,15,20,00",
              "date":"2017.03.15 16:20",
        "dateFormat":"y.m.d h:m",
 "SensorContactLost":"0",
          "tempunit":"C",
          "windunit":"m/s",
         "pressunit":"mb",
          "rainunit":"mm",
       "windrununit":"kilometer",
     "cloudbaseunit":"ft",
              "temp":"-3.05555555556",
            "tempTL":"-3.72222222222",
            "tempTH":"-2.22222222222",
           "TtempTL":"07:44",
           "TtempTH":"01:41",
         "temptrend":"-0.222222222222",
            "intemp":"3.22222222222",
               "hum":"97.0",
             "humTL":"96.0",
             "humTH":"98.0",
            "ThumTL":"07:29",
            "ThumTH":"02:14",
             "inhum":"35.0",
               "dew":"-3.46336959053",
        "dewpointTL":"-4.26536324939",
        "dewpointTH":"-2.55022355307",
       "TdewpointTL":"07:44",
       "TdewpointTH":"02:15",
            "wchill":"-11.3318462131",
          "wchillTL":"-12.8529250666",
         "TwchillTL":"07:51",
         "heatindex":"-3.05555555556",
       "heatindexTH":"-2.22222222222",
      "TheatindexTH":"01:41",
           "apptemp":"-13.0051888068",
         "apptempTL":"0",
         "apptempTH":"0",
        "TapptempTL":"",
        "TapptempTH":"",
           "humidex":"-3.05555555556",
             "press":"1006.08218",
            "pressL":"964.56982",
            "pressH":"1050.30334",
           "pressTL":"996.02576",
           "pressTH":"1006.08218",
          "TpressTL":"00:00",
          "TpressTH":"15:59",
     "presstrendval":"0.27088",
             "rfall":"0.0",
             "rrate":"0.0",
           "rrateTM":"0.0",
          "TrrateTM":"00:00",
      "hourlyrainTH":"0",
     "ThourlyrainTH":"",
    "LastRainTipISO":"2000-01-01 00:00",
           "wlatest":"10.7289599901",
            "wspeed":"",
            "windTM":"17.8815999836",
             "wgust":"13.4111999877",
           "wgustTM":"",
          "TwgustTM":"00:35",
           "bearing":"22.5",
        "avgbearing":"22.2395441077",
         "bearingTM":"9.0",
"BearingRangeFrom10":"000",
  "BearingRangeTo10":"000",
        "domwinddir":"NNE",
      "WindRoseData":[],
           "windrun":"45.5111555138",
         "Tbeaufort":"F8",
                "UV":"   N/A",
              "UVTH":"",
          "SolarRad":"",
           "SolarTM":"",
   "CurrentSolarMax":"149.785908181",
    "cloudbasevalue":"3611.83301431",
          "forecast":"forecast is not available",
           "version":"3.5.0",
             "build":"",
               "ver":"13"
}
Vantage VUE with a WLIP used for https://weer.sluispark.be/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/

Offline gjr80

  • Member
  • *
  • Posts: 18
Hi,

The gauge-data.txt template defaults to using the unit system used by your database, in most cases this is US imperial. It's easy enough to change, you could override the units in skin.conf or in weewx.conf. weewx.conf would be better as it will survive any upgrades/updates whereas skin.conf may be overwritten. In weewx.conf locate the [StdReport] [SteelSeries]] section and add a [[[Units]]] stanza as follows:

Code: [Select]
    [[SteelSeries]]
        skin = ss
        HTML_ROOT = /var/www/html/weewx/ss
        [[[Units]]]
            [[[[Groups]]]]
                group_altitude = meter
                group_pressure = hPa
                group_rain = mm
                group_rainrate = mm_per_hour
                group_temperature = degree_C
                group_speed = km_per_hour

You can change the above settings to suit, the only caveat is you need to use weeWX unit codes. A list of available codes can be found in the Units appendix to the weeWX Customization Guide http://weewx.com/docs/customizing.htm#units. Look in the Unit options column of the Unit groups, members and options table.

You will need to stop/sart weewx for the changes to take effect.

Gary
I am using the steel series gauges with a metric setup on my web site http://torolmen.no/vaerside-for-torolmen.
It all works fine except for a tiny detail, the hover menus are displaying numbers with 12 digits (see attached image).
I am not able to find out how this can be controlled.

Offline TomKeffer

  • Member
  • *
  • Posts: 20
It's easy enough to change, you could override the units in skin.conf or in weewx.conf. weewx.conf would be better as it will survive any upgrades/updates whereas skin.conf may be overwritten.

Neither is overwritten by an upgrade. The old weewx.conf file is merged into any new one, so changes are preserved. For skin.conf, the entire skin directory is left untouched.

The advantage of putting the overrides in weewx.conf is that they can be applied to every skin.

Offline gjr80

  • Member
  • *
  • Posts: 18
My apologies, I am not sure what I was reading when I answered your question. Please ignore my earlier reply it answered the wrong question, changing the number of decimal places you are seeing requires a change to the weeWX template used to produce gauge-data.txt. Try the attached gauge-data.txt template, I don't think I can attach .tmpl files here so you will need to rename the attached gauge-data.txt to gauge-data.txt.tmpl. On your weeWX machine move your existing gauge-data.txt.tmpl aside (it will be in you skins/ss directory) and copy this one in its place. There is no need to restart weeWX it will be picked up during the next report cycle.

I have submitted a PR to hopefully get the template changed in the SteelSeries Weather Gauges repo.

Gary

I am using the steel series gauges with a metric setup on my web site http://torolmen.no/vaerside-for-torolmen.
It all works fine except for a tiny detail, the hover menus are displaying numbers with 12 digits (see attached image).
I am not able to find out how this can be controlled.

Offline gjr80

  • Member
  • *
  • Posts: 18
Sorry Tom, I was vague, the upgrade I meant to refer to was upgrading an extension in which case skin.conf will get clobbered if there is a skin.conf in the extension package (noting though that the SteelSeries Weather gauges aren't (yet) packaged as an extension).

Gary

It's easy enough to change, you could override the units in skin.conf or in weewx.conf. weewx.conf would be better as it will survive any upgrades/updates whereas skin.conf may be overwritten.

Neither is overwritten by an upgrade. The old weewx.conf file is merged into any new one, so changes are preserved. For skin.conf, the entire skin directory is left untouched.

The advantage of putting the overrides in weewx.conf is that they can be applied to every skin.