Author Topic: Issues with FTP and SteelSeriesGauges - SOLVED  (Read 3659 times)

mcrossley

  • Gale
  • ****
  • Posts: 277
  • Sorry, I'm not a WeatherCat user!
    • ICHESHIR25
    • Wilmslow Astro Weather
  • Station Details: Davis VP2 + home brew
Re: FTP Error after moving WeatherCat to another machine
« Reply #15 on: October 04, 2023, 11:00:28 AM »
Assuming you use the 123 456,78 format, then in the gauges.js script you could try this version of the extractDecimal() function - around line 3320 in my copy

Code: [Select]
        extractDecimal = function (str, errVal) {
            try {
                return (/[-+]?[0-9]+\.?[0-9]*/).exec(str.replace(',', '.').replace(' ', ''))[0];
            } catch (e) {
                // error condition
                return errVal || -9999;
            }
        },
Mark

wurzelmac

  • Storm
  • *****
  • Posts: 1434
    • ITIROLPR2
    • Wetterstation Prägraten am Großvenediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1100D | macOS Sonoma 15.0.1 | WC v330b300
FTP and SteelGauges issues
« Reply #16 on: October 04, 2023, 12:11:35 PM »
WOW - working, thank you very much. Much appreciated - really!!! Maybe you will add something in your "preferences" code to let the user choose what numbers seperator is used.

This dicussion is drifting off from its main theme a bit (  ;) ) - so I changed the title...

Thanks for all the help I got to get rid of my various issues - thanks alot!

Reinhard
Reinhard


mcrossley

  • Gale
  • ****
  • Posts: 277
  • Sorry, I'm not a WeatherCat user!
    • ICHESHIR25
    • Wilmslow Astro Weather
  • Station Details: Davis VP2 + home brew
Re: FTP Error after moving WeatherCat to another machine - SOLVED
« Reply #17 on: October 04, 2023, 07:16:05 PM »
No problem, I'll make that change to the master script - it works with the other formats too, except 123,456.78 that is still problematic.
Mark

mcrossley

  • Gale
  • ****
  • Posts: 277
  • Sorry, I'm not a WeatherCat user!
    • ICHESHIR25
    • Wilmslow Astro Weather
  • Station Details: Davis VP2 + home brew
Re: FTP Error after moving WeatherCat to another machine - SOLVED
« Reply #18 on: October 05, 2023, 09:39:01 PM »
After looking at the realtimegaugesWC.txt file, I remembered that the first thing in the file is the config tag DOTSEPARATORS$, this is supposed to make WC use machine readable number formats in the file rather than the locale format.

Is this not working anymore?
Mark

wurzelmac

  • Storm
  • *****
  • Posts: 1434
    • ITIROLPR2
    • Wetterstation Prägraten am Großvenediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1100D | macOS Sonoma 15.0.1 | WC v330b300
Re: FTP Error after moving WeatherCat to another machine - SOLVED
« Reply #19 on: October 06, 2023, 09:05:30 AM »
Mark - shame on me. I was using an older .txt file than that one that you provide on your github page. Now I replaced the older with the newer one and set the extractDecimal() function back to its origin. Seems like the pressure gauge is working good now - I will observe it and let you know. Thanks for all and sorry for bringing in some confusion because using an older file...
Reinhard


mcrossley

  • Gale
  • ****
  • Posts: 277
  • Sorry, I'm not a WeatherCat user!
    • ICHESHIR25
    • Wilmslow Astro Weather
  • Station Details: Davis VP2 + home brew
Re: FTP Error after moving WeatherCat to another machine - SOLVED
« Reply #20 on: October 06, 2023, 01:13:39 PM »
Well, it appears to be good news in that it isn't a problem with WC  :)
Mark

Blicj11

  • Storm
  • *****
  • Posts: 4061
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Sonoma 14.8.3 | WeatherCat 3.3 | Supportive Wife
Re: Issues with FTP and SteelSeriesGauges - SOLVED
« Reply #21 on: October 21, 2023, 10:54:37 PM »
Glad you have found success, Reinhard.
Blick